Macaulay2 Engine
Loading...
Searching...
No Matches

◆ PointArray() [2/2]

PointArray::PointArray ( Weight epsilon,
int n )
inline

Definition at line 120 of file NAG.hpp.

120 : mEpsilon(epsilon)
121 {
122 double s = 0;
123 for (int i = 0; i < n; i++)
124 {
125 double r = rand();
126 s += r;
127 mWeights.push_back(r);
128 }
129 for (int i = 0; i < n; i++) mWeights[i] /= s;
130 }
Weight mEpsilon
Definition NAG.hpp:180
RealVector mWeights
Definition NAG.hpp:181
void size_t s
Definition m2-mem.cpp:271

References mEpsilon, mWeights, and s.