Macaulay2 Engine
Loading...
Searching...
No Matches
PointArray Class Reference

Container of numerical points equipped with an $\varepsilon$-tolerance and a random weight vector used to bucket approximately equal points. More...

#include <NAG.hpp>

Public Types

using RealVector = std::vector<double>
using Weight = double

Public Member Functions

 PointArray (Weight epsilon, const RealVector &weights)
 PointArray (Weight epsilon, int n)
virtual ~PointArray ()
int lookup_or_append (const RealVector &a)
int lookup (const RealVector &a) const
Weight weight (const RealVector &a) const
bool are_same (const RealVector &a, const RealVector &b) const
void text_out (buffer &o) const

Private Member Functions

decltype(mMap) ::const_iterator left (Weight key) const
decltype(mMap) ::const_iterator right (Weight key) const

Private Attributes

std::map< Weight, intmMap
std::vector< RealVectormPoints
Weight mEpsilon
RealVector mWeights

Detailed Description

Container of numerical points equipped with an $\varepsilon$-tolerance and a random weight vector used to bucket approximately equal points.

Note
AI-generated documentation. Verify against the source before relying on it.

A point hashes to the integer rounding of $\sum w_i x_i / \varepsilon$, so points within mEpsilon of each other land in the same bucket and can be deduplicated. The RealVector mWeights either comes from the caller or is filled by the (epsilon, n) constructor with normalised random numbers. Used by the path-tracker to recognise coincident endpoints.

Definition at line 111 of file NAG.hpp.


The documentation for this class was generated from the following file: