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

◆ weight()

Weight PointArray::weight ( const RealVector & a) const
inline

Definition at line 154 of file NAG.hpp.

155 {
156 Weight w = 0;
157 auto n = mWeights.size();
158 assert(n == a.size());
159 for (int i = 0; i < n; ++i) w += mWeights[i] * a[i];
160 return w;
161 }
double Weight
Definition NAG.hpp:115
RealVector mWeights
Definition NAG.hpp:181

References mWeights.

Referenced by lookup(), and lookup_or_append().