KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
Tabular2DSet Class Reference

A 2D set that includes some marked regions on a grid. More...

#include <Tabular.h>

Inheritance diagram for Tabular2DSet:
BoxSet Meshing::AreaGridTemplate< bool > CSet

Public Member Functions

 Tabular2DSet (const Array2D< bool > &valid, const Vector2 &bmin, const Vector2 &bmax)
 
 Tabular2DSet (int m, int n, const Vector2 &bmin, const Vector2 &bmax)
 
virtual int NumDimensions () const
 Returns the number of dimensions this accepts (-1) for all dimensions.
 
virtual bool Contains (const Config &x)
 
virtual bool Project (Config &x)
 
virtual bool IsSampleable () const
 If true, the Sample() function is implemented.
 
virtual void Sample (Config &x)
 
- Public Member Functions inherited from BoxSet
 BoxSet (Real xmin, Real xmax, int d=1)
 
 BoxSet (const Vector &bmin, const Vector &bmax)
 
virtual bool IsConvex () const
 If true, the feasible set is convex with respect to the CSpace's interpolation function.
 
virtual Real ObstacleDistance (const Config &x)
 
virtual Optimization::NonlinearProgramNumeric ()
 
- Public Member Functions inherited from CSet
 CSet (CPredicate f)
 
virtual bool Contains (const Config &x)
 Returns true if this constraint is satisfied at configuration x.
 
virtual bool Project (Config &x)
 
virtual void Sample (Config &x)
 If IsSampleable is true, draws a config at random from the set.
 
virtual Real ObstacleDistance (const Config &x)
 
- Public Member Functions inherited from Meshing::AreaGridTemplate< bool >
bool IsEmpty () const
 
void Resize (int m, int n)
 
void ResizeByResolution (const Vector2 &res)
 
void MakeSimilar (const AreaGridTemplate< T2 > &grid)
 
bool IsSimilar (const AreaGridTemplate< T2 > &grid) const
 
void GetCell (int i, int j, AABB2D &cell) const
 
void GetCell (const IntPair &index, AABB2D &cell) const
 
void GetCellCenter (int i, int j, Vector2 &center) const
 
Vector2 GetCellSize () const
 
void GetIndex (const Vector2 &pt, int &i, int &j) const
 
void GetIndex (const Vector2 &pt, IntPair &index) const
 
void GetIndexAndParams (const Vector2 &pt, IntPair &index, Vector2 &params) const
 
void GetIndexRange (const AABB2D &range, IntPair &imin, IntPair &imax) const
 
void GetCenter (const IntPair &index, Vector2 &center) const
 
void SetValue (int i, int j, const bool &v)
 
void SetValue (const Vector2 &pt, const bool &v)
 
bool GetValue (int i, int j) const
 
bool GetValue (const Vector2 &pt) const
 
bool BilinearInterpolate (const Vector2 &pt) const
 Computes the trilinear interpolation of the field at pt, assuming values are sampled exactly at cell centers.
 
bool Average (const AABB2D &range) const
 Average value of the range. Each cell's value is weighted by the volume overlap with range.
 
void ResampleBilinear (const MyT &grid)
 Resamples the given volume grid onto the current grid, taking trilinear interpolation at cell centers.
 
void ResampleAverage (const MyT &grid)
 Resamples the given volume grid onto the current grid, taking averages over grid cells.
 
void Gradient_ForwardDifference (const IntPair &index, Vector2 &grad) const
 Returns the gradient estimated using forward differencing.
 
void Gradient_CenteredDifference (const IntPair &index, Vector2 &grad) const
 Returns the gradient estimated using centered differencing.
 
void Gradient (const Vector2 &pt, Vector2 &grad) const
 
void Add (const MyT &grid)
 
void Add (boolval)
 
void Subtract (const MyT &grid)
 
void Multiply (const MyT &grid)
 
void Multiply (boolval)
 
void Max (const MyT &grid)
 
void Max (boolval)
 
void Min (const MyT &grid)
 
void Min (boolval)
 
iterator getIterator () const
 

Public Attributes

bool calculatedValidIndices
 
std::vector< IntPairvalidIndices
 
- Public Attributes inherited from BoxSet
Vector bmin
 
Vector bmax
 
- Public Attributes inherited from CSet
CPredicate test
 
- Public Attributes inherited from Meshing::AreaGridTemplate< bool >
Array2D< bool > value
 
AABB2D bb
 

Additional Inherited Members

- Public Types inherited from CSet
typedef bool(* CPredicate) (const Config &)
 
- Public Types inherited from Meshing::AreaGridTemplate< bool >
typedef AreaGridTemplate< bool > MyT
 
typedef AreaGridIterator< bool > iterator
 

Detailed Description

A 2D set that includes some marked regions on a grid.

Basically an adaptor from AreaGridTemplate to the CSpace methods.


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