Implements the base class for constraint handling. More...
#include <shark/ObjectiveFunctions/AbstractConstraintHandler.h>
Inheritance diagram for shark::AbstractConstraintHandler< SearchPointType >:Public Types | |
| enum | Feature { CAN_PROVIDE_CLOSEST_FEASIBLE = 1, IS_BOX_CONSTRAINED = 2, CAN_GENERATE_RANDOM_POINT = 4 } |
| typedef TypedFlags< Feature > | Features |
| typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
Public Member Functions | |
| const Features & | features () const |
| virtual void | updateFeatures () |
| virtual | ~AbstractConstraintHandler () |
| bool | canProvideClosestFeasible () const |
| Returns whether this function can calculate the closest feasible to an infeasible point. More... | |
| bool | isBoxConstrained () const |
| Returns whether this function is an instance of BoxConstraintHandler. More... | |
| bool | canGenerateRandomPoint () const |
| Returns whether this function is an instance of BoxConstraintHandler. More... | |
| virtual void | generateRandomPoint (SearchPointType &startingPoint) const |
| If supported, generates a random point inside the feasible region. More... | |
| virtual bool | isFeasible (SearchPointType const &) const =0 |
| Returns true if the point is in the feasible Region. More... | |
| virtual void | closestFeasible (SearchPointType &) const |
Protected Attributes | |
| Features | m_features |
Implements the base class for constraint handling.
A constraint handler provides information about the feasible region of a constrained optimization problem. In the minimum it checks whether a point is feasible, or what the next fasible point would be.
Definition at line 47 of file AbstractConstraintHandler.h.
| typedef TypedFeatureNotAvailableException<Feature> shark::AbstractConstraintHandler< SearchPointType >::FeatureNotAvailableException |
Definition at line 54 of file AbstractConstraintHandler.h.
| typedef TypedFlags<Feature> shark::AbstractConstraintHandler< SearchPointType >::Features |
Definition at line 54 of file AbstractConstraintHandler.h.
| enum shark::AbstractConstraintHandler::Feature |
| Enumerator | |
|---|---|
| CAN_PROVIDE_CLOSEST_FEASIBLE | The constraint handler can provide a close feasible point to an infeasible one. |
| IS_BOX_CONSTRAINED | The constraint handler is an instance of BoxConstraintHandler. |
| CAN_GENERATE_RANDOM_POINT | The ConstraintHandler can generate a random point inside the feasible region. |
Definition at line 49 of file AbstractConstraintHandler.h.
|
inlinevirtual |
Definition at line 56 of file AbstractConstraintHandler.h.
|
inline |
Returns whether this function is an instance of BoxConstraintHandler.
Definition at line 68 of file AbstractConstraintHandler.h.
Referenced by shark::AbstractObjectiveFunction< SearchSpaceType, ResultT >::announceConstraintHandler().
|
inline |
Returns whether this function can calculate the closest feasible to an infeasible point.
Definition at line 59 of file AbstractConstraintHandler.h.
Referenced by shark::AbstractObjectiveFunction< SearchSpaceType, ResultT >::announceConstraintHandler().
|
inlinevirtual |
Reimplemented in shark::BoxConstraintHandler< Vector >, and shark::BoxConstraintHandler< SearchPointType >.
Definition at line 81 of file AbstractConstraintHandler.h.
|
inline |
Definition at line 54 of file AbstractConstraintHandler.h.
|
inlinevirtual |
If supported, generates a random point inside the feasible region.
Reimplemented in shark::BoxConstraintHandler< Vector >, and shark::BoxConstraintHandler< SearchPointType >.
Definition at line 73 of file AbstractConstraintHandler.h.
|
inline |
Returns whether this function is an instance of BoxConstraintHandler.
Definition at line 64 of file AbstractConstraintHandler.h.
|
pure virtual |
Returns true if the point is in the feasible Region.
This function must be implemented by a ConstraintHandler
Implemented in shark::BoxConstraintHandler< Vector >, and shark::BoxConstraintHandler< SearchPointType >.
Referenced by shark::AbstractConstraintHandler< Vector >::generateRandomPoint().
|
inlinevirtual |
Definition at line 54 of file AbstractConstraintHandler.h.
|
protected |