According to www.cplusplus.com/reference/algorithm/transform/, "The function allows for the destination range to be the same as one of the input ranges to make transformations in place."
Davor On May 5, 2010 12:45:03 pm Douglas Bates wrote: > I haven't seen in any of the descriptions of the std::transform > template whether it can modify values in place. For example, can I > perform the equivalent of the > > x <- x * mult > > operation in R, where x and mult are both numeric n-dimensional > vectors, as > > std::transform(x.begin(), x.end(), mult.begin(), x.begin(), > std::multiplies<double>()); > > in Rcpp-based C++? > _______________________________________________ > Rcpp-devel mailing list > [email protected] > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-dev > el > _______________________________________________ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
