KrisLibrary
1.0.0
|
A subset of a CSpace, which establishes a constraint for a configuration to be feasible. More...
#include <CSet.h>
Public Types | |
typedef bool(* | CPredicate) (const Config &) |
Public Member Functions | |
CSet (CPredicate f) | |
virtual int | NumDimensions () const |
Returns the number of dimensions this accepts (-1) for all dimensions. | |
virtual bool | Contains (const Config &x) |
Returns true if this constraint is satisfied at configuration x. | |
virtual bool | Project (Config &x) |
virtual bool | IsSampleable () const |
If true, the Sample() function is implemented. | |
virtual void | Sample (Config &x) |
If IsSampleable is true, draws a config at random from the set. | |
virtual Optimization::NonlinearProgram * | Numeric () |
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) |
Public Attributes | |
CPredicate | test |
A subset of a CSpace, which establishes a constraint for a configuration to be feasible.
You can either create a subclass of CSet for greatest functionality, or construct a CSet with a function pointer that returns whether a Config is in or out.
|
inlinevirtual |
If possible, give the obstacle as a feasible solution to the nonlinear program g(x) <= 0, h(x) = 0.
Reimplemented in CSpaceConstraintSet, IntersectionSet, FiniteSet, SubspaceSet, NeighborhoodSet, AxisRangeSet, and BoxSet.
|
inlinevirtual |
If overloaded, return the CSpace distance from x to infeasibility. Positive means feasible, 0 means boundary, negative means infeasible.
Referenced by IntersectionSet::IsConvex().
|
inlinevirtual |
If possible, project x onto a nearby feasible configuration and return true. If not, return false.
Referenced by UnionSet::NumDimensions(), and CSpace::ProjectFeasible().