From: Bojan N. <bo...@bn...> - 2009-03-26 15:57:38
|
This does look like to be a bug in boost on your platform/compiler combination. The std::transform takes a copy of the function (i.e., fourth) argument and boost seems to trip up when it is time to destroy it. I would try expanding out the transform code in the leastsquares code. Something as simple as below should do I think as a first check. Best, Bojan --- a/ql/math/linearleastsquaresregression.hpp +++ b/ql/math/linearleastsquaresregression.hpp @@ -106,7 +106,11 @@ Matrix A(n, m); for (i=0; i<m; ++i) - std::transform(x.begin(), x.end(), A.column_begin(i), v[i]); + for(size_t j=0; j<x.size(); ++j) + { + A[j][i]=v[i](x[j]); + } + const SVD svd(A); const Matrix& V = svd.V(); -- Bojan Nikolic || http://www.bnikolic.co.uk |