GridDecomposition.h
100 void computeGridNeighborsSub(const std::vector<int> &coord, std::vector<int> &neighbors, int dim,
void sampleFromRegion(int rid, RNG &rng, std::vector< double > &coord) const override
Samples a projected coordinate from a given region.
Definition: GridDecomposition.cpp:109
int getNumRegions() const override
Returns the number of regions in this Decomposition.
Definition: GridDecomposition.h:160
void coordToGridCoord(const std::vector< double > &coord, std::vector< int > &gridCoord) const
Converts a decomposition space coordinate to a grid coordinate.
Definition: GridDecomposition.cpp:211
void getNeighbors(int rid, std::vector< int > &neighbors) const override
Stores a given region's neighbors into a given vector.
Definition: GridDecomposition.cpp:53
double getRegionVolume(int) override
Returns the volume of a given region in this Decomposition.
Definition: GridDecomposition.h:165
void computeGridNeighbors(int rid, std::vector< int > &neighbors) const
Computes the neighbors of the given region in a n-dimensional grid.
Definition: GridDecomposition.cpp:117
virtual const base::RealVectorBounds & getRegionBounds(int rid) const
Helper method to return the bounds of a given region.
Definition: GridDecomposition.cpp:226
int coordToRegion(const std::vector< double > &coord) const
Converts a decomposition space coordinate to the ID of the region that contains iit.
Definition: GridDecomposition.cpp:191
void regionToGridCoord(int rid, std::vector< int > &coord) const
Converts a given region to a coordinate in the grid.
Definition: GridDecomposition.cpp:165
int gridCoordToRegion(const std::vector< int > &coord) const
Converts the given grid coordinate to its corresponding region ID.
Definition: GridDecomposition.cpp:176
int locateRegion(const base::State *s) const override
Returns the index of the region containing a given State. Most often, this is obtained by first calli...
Definition: GridDecomposition.cpp:102
GridDecomposition(int len, int dim, const base::RealVectorBounds &b)
Constructor. Creates a GridDecomposition as a hypercube with a given dimension, side length,...
Definition: GridDecomposition.cpp:45
void computeGridNeighborsSub(const std::vector< int > &coord, std::vector< int > &neighbors, int dim, std::vector< int > &candidate) const
Definition: GridDecomposition.cpp:126