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

Function dMakeRandomMatrix

3rd_party/Src/ode/ode/src/misc.cpp:97–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96
97void dMakeRandomMatrix (dReal *A, int n, int m, dReal range)
98{
99 int i,j;
100 int skip = dPAD(m);
101 dSetZero (A,n*skip);
102 for (i=0; i<n; i++) {
103 for (j=0; j<m; j++) A[i*skip+j] = (dRandReal()*REAL(2.0)-REAL(1.0))*range;
104 }
105}
106
107
108void dClearUpperTriangle (dReal *A, int n)

Callers 2

dTestSolveLCPFunction · 0.85
dTestMatrixComparisonFunction · 0.85

Calls 2

dSetZeroFunction · 0.85
dRandRealFunction · 0.85

Tested by 1

dTestMatrixComparisonFunction · 0.68