37 #include <qpOASES.hpp> 65 for( i=0; i<180; ++i )
66 v[i] = 2.0 * ((
real_t)rand()) / ((
real_t)RAND_MAX) - 1.0;
68 Hd->
times( 1, 1.0, v, 180, 0.0, resHn, 180);
69 Hd->
transTimes(1, 1.0, v, 180, 0.0, resHt, 180);
71 for ( i=0; i<180; ++i )
72 if (
getAbs(resHn[i] - resHt[i]) > errH)
73 errH =
getAbs(resHn[i] - resHt[i]);
75 fprintf(
stdFile,
"maximum difference in H*v vs. H'*v: %9.2e\n", errH);
#define USING_NAMESPACE_QPOASES
Interfaces matrix-vector operations tailored to symmetric sparse matrices.
Interfaces matrix-vector operations tailored to symmetric dense matrices.
returnValue transTimes(int xN, real_t alpha, const real_t *x, int xLD, real_t beta, real_t *y, int yLD) const
#define QPOASES_TEST_FOR_TOL(x, tol)
returnValue times(int xN, real_t alpha, const real_t *x, int xLD, real_t beta, real_t *y, int yLD) const