Fawkes API
Fawkes Development Version
|
Constraint to block edges close to clusters. More...
#include "clusters_block_constraint.h"
Public Member Functions | |
NavGraphClustersBlockConstraint (const char *name, NavGraphClustersThread *parent) | |
Constructor. More... | |
virtual | ~NavGraphClustersBlockConstraint () |
Virtual empty destructor. More... | |
virtual bool | compute (void) throw () |
Perform compuations before graph search and to indicate re-planning. More... | |
virtual bool | blocks (const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to) throw () |
Check if constraint blocks an edge. More... | |
![]() | |
NavGraphEdgeConstraint (const std::string &name) | |
Constructor. More... | |
NavGraphEdgeConstraint (const char *name) | |
Constructor. More... | |
virtual | ~NavGraphEdgeConstraint () |
Virtual empty destructor. More... | |
std::string | name () |
Get name of constraint. More... | |
bool | operator== (const std::string &name) const |
Check if constraint matches name. More... | |
Additional Inherited Members | |
![]() | |
std::string | name_ |
Name of constraint. More... | |
Constraint to block edges close to clusters.
Definition at line 31 of file clusters_block_constraint.h.
NavGraphClustersBlockConstraint::NavGraphClustersBlockConstraint | ( | const char * | name, |
NavGraphClustersThread * | parent | ||
) |
Constructor.
name | constraint name |
parent | parent to call for blocked edges |
Definition at line 33 of file clusters_block_constraint.cpp.
|
virtual |
Virtual empty destructor.
Definition at line 41 of file clusters_block_constraint.cpp.
|
virtual |
Check if constraint blocks an edge.
This method must be implemented by constraint classes. It is called to determine if an edge should be considered blocked and therefore cannot be expanded during path search.
Note that the nodes may be passed in either ordering, therefore you should not rely on a particular order, not even for directed nodes!
Further note that the method may not throw an exception. Handle this internally appropriately.
from | node from which the edge originates |
to | node to which the edge leads |
Implements fawkes::NavGraphEdgeConstraint.
Definition at line 55 of file clusters_block_constraint.cpp.
|
virtual |
Perform compuations before graph search and to indicate re-planning.
The compute method is called on all constraints just before a path search is performed and to check if re-planning should be tried.
It can be used for example to cache results for the coming search run. The search guarantees that for each complete search run compute() is called once and only once and that no two search runs overlap, i.e., compute() will not be called while another search is still running.
Constraints must indicate whether any change has occured during computation or since the last compute() call through the return value. This is used to determine if re-planning should be attempted.
Reimplemented from fawkes::NavGraphEdgeConstraint.
Definition at line 47 of file clusters_block_constraint.cpp.
References NavGraphClustersThread::blocked_edges().