[Yanl-develop] Boost.Lambda and std::tr1::array
Brought to you by:
karstenahnert
|
From: Karsten A. <kar...@gm...> - 2009-11-28 19:04:54
|
Hi,
lambda expression in the observer will not work immediately if the
container_type is std::tr1::array. But you can do the following:
array< double , 3 > x = {{ 1.0 , 10.0 , 0.5 }};
integrate_const_steps( rk4 , lorenz , t , dt , x , 10000 ,
cout << _1 << "\t" << ret<double&>(_2[0]) << "\t"
ret<double&>(_2[1]) << "\t"
ret<double&>(_2[2]) << "\n" );
See the attached source file for a comparison with the std::vector.
Best regards,
Karsten
|