37 #include <qpOASES.hpp> 73 for( i=0; i<180; ++i )
74 v[i] = 2.0 * ((
real_t)rand()) / ((
real_t)RAND_MAX) - 1.0;
76 H ->
times(1, 1.0, v, 180, 0.0, resHs, 180);
77 Hd->
times(1, 1.0, v, 180, 0.0, resHd, 180);
79 A ->
times(1, 1.0, v, 180, 0.0, resAs, 91);
80 Ad->
times(1, 1.0, v, 180, 0.0, resAd, 91);
83 for ( i=0; i<180; ++i )
84 if (
getAbs(resHs[i] - resHd[i]) > errH)
85 errH =
getAbs(resHs[i] - resHd[i]);
87 fprintf(
stdFile,
"maximum difference in H*v: %9.2e\n", errH);
90 for ( i=0; i<91; ++i )
91 if (
getAbs(resAs[i] - resAd[i]) > errA)
92 errA =
getAbs(resAs[i] - resAd[i]);
94 fprintf(
stdFile,
"maximum difference in A*v: %9.2e\n", errA);
#define USING_NAMESPACE_QPOASES
Interfaces matrix-vector operations tailored to symmetric sparse matrices.
Interfaces matrix-vector operations tailored to symmetric dense matrices.
virtual returnValue times(int xN, real_t alpha, const real_t *x, int xLD, real_t beta, real_t *y, int yLD) const
Interfaces matrix-vector operations tailored to general dense matrices.
Interfaces matrix-vector operations tailored to general sparse matrices.
#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