fix adolc unit test for dynamic sizes

This commit is contained in:
Gael Guennebaud 2009-05-12 07:38:46 +00:00
parent f5b5571a5a
commit 159c99a288

View File

@ -107,8 +107,8 @@ struct TestFunc1
template<typename Func> void adolc_forward_jacobian(const Func& f) template<typename Func> void adolc_forward_jacobian(const Func& f)
{ {
typename Func::InputType x = Func::InputType::Random(); typename Func::InputType x = Func::InputType::Random();
typename Func::ValueType y, yref; typename Func::ValueType y(f.values()), yref(f.values());
typename Func::JacobianType j, jref; typename Func::JacobianType j(f.values(),f.inputs()), jref(f.values(),f.inputs());
jref.setZero(); jref.setZero();
yref.setZero(); yref.setZero();