Skip to content

Commit e8018f4

Browse files
author
Benjamin Chrétien
committed
Use Eigen::Map rather than array_to_vector
1 parent 8d5b746 commit e8018f4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/tnlp.hxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ namespace roboptim
328328
if (!solver_.problem ().startingPoint ())
329329
return true;
330330

331-
Eigen::Map<Function::result_t> x_ (x, n);
331+
Eigen::Map<Function::argument_t> x_ (x, n);
332332
x_ = *solver_.problem ().startingPoint ();
333333
return true;
334334
}
@@ -552,8 +552,7 @@ namespace roboptim
552552
}
553553
else
554554
{
555-
solver_t::vector_t x_ (n);
556-
array_to_vector (x_, x);
555+
Eigen::Map<const function_t::argument_t> x_ (x, n);
557556

558557
TwiceDifferentiableFunction::hessian_t h
559558
((*costFunction_).inputSize (),

0 commit comments

Comments
 (0)