我想知道是否有办法将以下code的输出存储到增强矩阵或向量中 .
size_t num_of_steps = integrate_const( make_dense_output< rosenbrock4< double > >( 1.0e-6 , 1.0e-6 ) ,
make_pair( stiff_system() , stiff_system_jacobi() ) ,
x , 0.0 , 50.0 , 0.01 ,cout << phoenix::arg_names::arg2 << " " << phoenix::arg_names::arg1[0] << "\n" );
上面的第94-97行将cout <<“”<< endl语句作为参数传递给函数 . 这些语句打印结果 . 我没有找到通过修改这些传递的语句来存储结果的方法 .
1 回答
向量x在不同的时间存储状态值,因此简单的赋值语句就像
其中a [0]是您要存储输出的矢量,将起作用 .