![]() |
Parasol Planning Library (PPL)
|
#include <CompositeState.h>
Public Types | |
Local Types | |
typedef size_t | VID |
A VID in an individual graph. More... | |
typedef std::vector< VID > | VIDSet |
A set of VIDs from indiv. graphs. More... | |
typedef GraphType::CfgType | CfgType |
The indiv. graph vertex type. More... | |
typedef CompositeEdge< GraphType > | CompositeEdgeType |
typedef CompositeGraph< CompositeState, CompositeEdgeType > | GroupGraphType |
typedef GraphType | IndividualGraph |
Public Member Functions | |
Construction | |
CompositeState (GroupGraphType *const _groupGraph=nullptr) | |
CompositeState (RobotGroup *const _group) | |
Equality | |
virtual bool | operator== (const CompositeState &_other) const noexcept |
virtual bool | operator!= (const CompositeState &_other) const noexcept |
Robots | |
Access the robots within this composite state. | |
virtual size_t | GetNumRobots () const noexcept |
Get the number of robots in this composite state. More... | |
virtual const std::vector< Robot * > & | GetRobots () const noexcept |
Get the full vector of robot pointers. More... | |
virtual Robot * | GetRobot (const size_t _index) const |
Graph Accessors | |
These functions provide access to the related group graph (if any) and descriptors for individual states. | |
virtual GroupGraphType * | GetGroupGraph () const noexcept |
Get the group graph this composite state is with respect to. More... | |
virtual void | SetGroupGraph (GroupGraphType *_newGraph) |
Set the composite graph that this composite state exists within. More... | |
virtual VID | GetVID (const size_t _index) const noexcept |
virtual VID | GetVID (Robot *const _robot) const |
Individual States | |
These functions manage the individual states that comprise this composite state. | |
virtual void | SetRobotCfg (Robot *const _robot, const VID _vid) |
virtual void | SetRobotCfg (const size_t _index, const VID _vid) |
virtual void | SetRobotCfg (Robot *const _robot, CfgType &&_cfg) |
virtual void | SetRobotCfg (const size_t _index, CfgType &&_cfg) |
virtual CfgType & | GetRobotCfg (Robot *const _robot) |
virtual CfgType & | GetRobotCfg (const size_t _index) |
virtual const CfgType & | GetRobotCfg (Robot *const _robot) const |
virtual const CfgType & | GetRobotCfg (const size_t _index) const |
void | ClearLocalCfgs () |
Clear the Local Cfg information. More... | |
Protected Member Functions | |
Helpers | |
virtual void | VerifyIndex (const size_t _robotIndex) const noexcept |
virtual bool | IsLocalCfg (const size_t _robotIndex) const noexcept |
virtual void | InitializeLocalCfgs () noexcept |
Initialize the set of local configurations if not already done. More... | |
Protected Attributes | |
Internal State | |
GroupGraphType * | m_groupMap {nullptr} |
The group graph. More... | |
RobotGroup * | m_group {nullptr} |
The robot group for this state. More... | |
VIDSet | m_vids |
The individual VIDs in this aggregate state. More... | |
std::vector< CfgType > | m_localCfgs |
Individual states not in a map. More... | |
An aggregate state which represents a state for each robot in a robot group. 'GraphType' represents the individual graph type for a single robot.
typedef GraphType::CfgType CompositeState< GraphType >::CfgType |
The indiv. graph vertex type.
typedef CompositeEdge<GraphType> CompositeState< GraphType >::CompositeEdgeType |
typedef CompositeGraph<CompositeState, CompositeEdgeType> CompositeState< GraphType >::GroupGraphType |
typedef GraphType CompositeState< GraphType >::IndividualGraph |
typedef size_t CompositeState< GraphType >::VID |
A VID in an individual graph.
typedef std::vector<VID> CompositeState< GraphType >::VIDSet |
A set of VIDs from indiv. graphs.
|
explicit |
Construct a composite state.
_groupGraph | The composite graph to which this state belongs. |
|
explicit |
Construct a composite state.
_group | The robot group to which this state belongs if it is not in a graph. |
void CompositeState< GraphType >::ClearLocalCfgs |
Clear the Local Cfg information.
|
virtualnoexcept |
Get the group graph this composite state is with respect to.
|
virtualnoexcept |
Get the number of robots in this composite state.
|
virtual |
Get the robot pointer for a group member by index.
_index | The desired index. |
|
virtual |
Get the individual state (cfg) for a robot in the group.
_index | The index of the robot. |
|
virtual |
Get the individual state (cfg) for a robot in the group.
_index | The index of the robot. |
|
virtual |
Get the individual state (cfg) for a robot in the group.
_robot | The robot which the state refers to. |
|
virtual |
Get the individual state (cfg) for a robot in the group.
_robot | The robot which the state refers to. |
|
virtualnoexcept |
Get the full vector of robot pointers.
|
virtualnoexcept |
Get the VID for a particular robot.
_index | The index (within the group) of the robot. |
|
virtual |
Get the VID for a particular robot.
_robot | The a robot within the group. |
|
protectedvirtualnoexcept |
Initialize the set of local configurations if not already done.
|
protectedvirtualnoexcept |
Return whether the cfg for the robot is local to the group cfg, or if it's in an individual roadmap already.
|
virtualnoexcept |
Check if the current and given composite states are unequal.
_other | The given composite state. |
|
virtualnoexcept |
Check if the current and given composite states are equal.
_other | The given composite state. |
|
virtual |
Set the composite graph that this composite state exists within.
|
virtual |
Set the individual state (cfg) for a robot to a graph copy of a state.
_index | The robot's group index which the state refers to. |
_vid | The state descriptor. |
|
virtual |
Set the individual state (cfg) for a robot to a graph copy of a state.
_index | The robot's group index which the state refers to. |
_vid | The state descriptor. |
|
virtual |
Set the individual state (cfg) for a robot to a graph copy of a state.
_robot | The robot which the state refers to. |
_vid | The state descriptor. |
|
virtual |
Set the individual state (cfg) for a robot to a graph copy of a state.
_robot | The robot which the state refers to. |
_vid | The state descriptor. |
|
inlineprotectedvirtualnoexcept |
Verify that an index is valid. Throw an exception if not.
_robotIndex | The (group) index to verify. |
|
protected |
The robot group for this state.
|
protected |
The group graph.
|
protected |
Individual states not in a map.
|
protected |
The individual VIDs in this aggregate state.