@@ -69,7 +69,7 @@ bool EiquadprogFast::add_constraint(MatrixXd &R, MatrixXd &J, VectorXd &d,
6969 columns. The i - 1 element of d has to be updated to h. */
7070 cc = d (j - 1 );
7171 ss = d (j);
72- h = distance (cc, ss);
72+ h = utils:: distance (cc, ss);
7373 if (h == 0.0 )
7474 continue ;
7575 d (j) = 0.0 ;
@@ -161,7 +161,7 @@ void EiquadprogFast::delete_constraint(MatrixXd &R, MatrixXd &J, VectorXi &A,
161161 for (j = qq; j < iq; j++) {
162162 cc = R (j, j);
163163 ss = R (j + 1 , j);
164- h = distance (cc, ss);
164+ h = utils:: distance (cc, ss);
165165 if (h == 0.0 )
166166 continue ;
167167 cc = cc / h;
@@ -259,7 +259,7 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
259259
260260 c2 = m_J.trace ();
261261#ifdef EIQGUADPROG_TRACE_SOLVER
262- print_matrix (" m_J" , m_J, nVars);
262+ utils:: print_matrix (" m_J" , m_J, nVars);
263263#endif
264264
265265 /* c1 * c2 is an estimate for cond(Hess) */
@@ -287,7 +287,7 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
287287 f_value = 0.5 * g0.dot (x);
288288#ifdef EIQGUADPROG_TRACE_SOLVER
289289 std::cerr << " Unconstrained solution: " << f_value << std::endl;
290- print_vector (" x" , x, nVars);
290+ utils:: print_vector (" x" , x, nVars);
291291#endif
292292 STOP_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_1_UNCONSTR_MINIM);
293293
@@ -303,10 +303,10 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
303303 update_r (R, r, d, iq);
304304
305305#ifdef EIQGUADPROG_TRACE_SOLVER
306- print_matrix (" R" , R, iq);
307- print_vector (" z" , z, nVars);
308- print_vector (" r" , r, iq);
309- print_vector (" d" , d, nVars);
306+ utils:: print_matrix (" R" , R, iq);
307+ utils:: print_vector (" z" , z, nVars);
308+ utils:: print_vector (" r" , r, iq);
309+ utils:: print_vector (" d" , d, nVars);
310310#endif
311311
312312 /* compute full step length t2: i.e.,
@@ -391,7 +391,7 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
391391 START_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_1);
392392
393393#ifdef EIQGUADPROG_TRACE_SOLVER
394- print_vector (" x" , x, nVars);
394+ utils:: print_vector (" x" , x, nVars);
395395#endif
396396 /* step 1: choose a violated constraint */
397397 for (i = nEqCon; i < iq; i++) {
@@ -419,7 +419,7 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
419419#endif
420420 STOP_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_1_2);
421421#ifdef EIQGUADPROG_TRACE_SOLVER
422- print_vector (" s" , s, nIneqCon);
422+ utils:: print_vector (" s" , s, nIneqCon);
423423#endif
424424
425425 STOP_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_1);
@@ -466,7 +466,7 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
466466
467467#ifdef EIQGUADPROG_TRACE_SOLVER
468468 std::cerr << " Trying with constraint " << ip << std::endl;
469- print_vector (" np" , np, nVars);
469+ utils:: print_vector (" np" , np, nVars);
470470#endif
471471 STOP_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_2);
472472
@@ -487,11 +487,11 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
487487 update_r (R, r, d, iq);
488488#ifdef EIQGUADPROG_TRACE_SOLVER
489489 std::cerr << " Step direction z" << std::endl;
490- print_vector (" z" , z, nVars);
491- print_vector (" r" , r, iq + 1 );
492- print_vector (" u" , u, iq + 1 );
493- print_vector (" d" , d, nVars);
494- print_vector (" A" , A, iq + 1 );
490+ utils:: print_vector (" z" , z, nVars);
491+ utils:: print_vector (" r" , r, iq + 1 );
492+ utils:: print_vector (" u" , u, iq + 1 );
493+ utils:: print_vector (" d" , d, nVars);
494+ utils:: print_vector (" A" , A, iq + 1 );
495495#endif
496496 STOP_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_2A);
497497
@@ -544,9 +544,9 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
544544 delete_constraint (R, m_J, A, u, nEqCon, iq, l);
545545#ifdef EIQGUADPROG_TRACE_SOLVER
546546 std::cerr << " in dual space: " << f_value << std::endl;
547- print_vector (" x" , x, nVars);
548- print_vector (" z" , z, nVars);
549- print_vector (" A" , A, iq + 1 );
547+ utils:: print_vector (" x" , x, nVars);
548+ utils:: print_vector (" z" , z, nVars);
549+ utils:: print_vector (" A" , A, iq + 1 );
550550#endif
551551 STOP_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_2C);
552552 goto l2a;
@@ -562,25 +562,25 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
562562
563563#ifdef EIQGUADPROG_TRACE_SOLVER
564564 std::cerr << " in both spaces: " << f_value << std::endl;
565- print_vector (" x" , x, nVars);
566- print_vector (" u" , u, iq + 1 );
567- print_vector (" r" , r, iq + 1 );
568- print_vector (" A" , A, iq + 1 );
565+ utils:: print_vector (" x" , x, nVars);
566+ utils:: print_vector (" u" , u, iq + 1 );
567+ utils:: print_vector (" r" , r, iq + 1 );
568+ utils:: print_vector (" A" , A, iq + 1 );
569569#endif
570570
571571 if (t == t2) {
572572#ifdef EIQGUADPROG_TRACE_SOLVER
573573 std::cerr << " Full step has taken " << t << std::endl;
574- print_vector (" x" , x, nVars);
574+ utils:: print_vector (" x" , x, nVars);
575575#endif
576576 /* full step has taken */
577577 /* add constraint ip to the active set*/
578578 if (!add_constraint (R, m_J, d, iq, R_norm)) {
579579 iaexcl (ip) = 0 ;
580580 delete_constraint (R, m_J, A, u, nEqCon, iq, ip);
581581#ifdef EIQGUADPROG_TRACE_SOLVER
582- print_matrix (" R" , R, nVars);
583- print_vector (" A" , A, iq);
582+ utils:: print_matrix (" R" , R, nVars);
583+ utils:: print_vector (" A" , A, iq);
584584#endif
585585 for (i = 0 ; i < nIneqCon; i++)
586586 iai (i) = static_cast <VectorXi::Scalar>(i);
@@ -595,8 +595,8 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
595595 } else
596596 iai (ip) = -1 ;
597597#ifdef EIQGUADPROG_TRACE_SOLVER
598- print_matrix (" R" , R, nVars);
599- print_vector (" A" , A, iq);
598+ utils:: print_matrix (" R" , R, nVars);
599+ utils:: print_vector (" A" , A, iq);
600600#endif
601601 STOP_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_2C);
602602 goto l1;
@@ -609,10 +609,10 @@ EiquadprogFast_status EiquadprogFast::solve_quadprog(
609609
610610#ifdef EIQGUADPROG_TRACE_SOLVER
611611 std::cerr << " Partial step has taken " << t << std::endl;
612- print_vector (" x" , x, nVars);
613- print_matrix (" R" , R, nVars);
614- print_vector (" A" , A, iq);
615- print_vector (" s" , s, nIneqCon);
612+ utils:: print_vector (" x" , x, nVars);
613+ utils:: print_matrix (" R" , R, nVars);
614+ utils:: print_vector (" A" , A, iq);
615+ utils:: print_vector (" s" , s, nIneqCon);
616616#endif
617617 STOP_PROFILER_EIQUADPROG_FAST (EIQUADPROG_FAST_STEP_2C);
618618
0 commit comments