MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / select

Method select

3rd_party/Src/ode/ode/src/mat.cpp:113–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111
112
113dMatrix dMatrix::select (int np, int *p, int nq, int *q)
114{
115 if (np < 1 || nq < 1) dDebug (0,"Matrix select, bad index array sizes");
116 dMatrix r (np,nq);
117 for (int i=0; i<np; i++) {
118 for (int j=0; j<nq; j++) {
119 if (p[i] < 0 || p[i] >= n || q[i] < 0 || q[i] >= m)
120 dDebug (0,"Matrix select, bad index arrays");
121 r.data[i*nq+j] = data[p[i]*m+q[j]];
122 }
123 }
124 return r;
125}
126
127
128dMatrix dMatrix::operator + (const dMatrix &a)

Callers 1

checkFactorizationFunction · 0.45

Calls 1

dDebugFunction · 0.85

Tested by

no test coverage detected