Hello everyone,<br><br>I am testing my code and find something that I hope someone can conform for me. Thanks in advance. It seems to me that<br><br>NumericVector x = as<NumericVector>(x_); ( Btw, this is exactly the same as NumericVector x(x_), both resulting in a shallow copy, isn't it? ) produces a shallow copy, while<br>
vector<double> x = as< vector<double> >(x_); produces a deep copy.<br><br>Is it because for NumvericVector the as() function returns the address of x_? But why does it work differently for vector<double>?<br>
<br>Thank you for your answer.<br><br>Best,<br>Zhongyi<br>