![]() |
Parasol Planning Library (PPL)
|
#include <CompositeEdge.h>
Public Types | |
Local Types | |
typedef GraphType::CfgType | IndividualCfg |
typedef GraphType::EdgeType | IndividualEdge |
typedef double | EdgeWeight |
typedef stapl::edge_descriptor_impl< size_t > | ED |
typedef CompositeState< GraphType > | CompositeStateType |
typedef CompositeGraph< CompositeStateType, CompositeEdge > | GroupGraphType |
typedef std::vector< CompositeStateType > | CompositePath |
Public Member Functions | |
Construction | |
CompositeEdge (GroupGraphType *const &_g=nullptr, const double _w=0.0, const CompositePath &_intermediates=CompositePath()) | |
CompositeEdge (RobotGroup *const &_g, const double _w=0.0, const CompositePath &_intermediates=CompositePath()) | |
Ordering and Equality | |
virtual bool | operator== (const CompositeEdge &_w) const noexcept |
virtual bool | operator!= (const CompositeEdge &_w) const noexcept |
virtual bool | operator< (const CompositeEdge &_other) const noexcept |
Graph Edge Weight | |
virtual EdgeWeight | GetWeight () const noexcept |
Get the numeric weight for this edge. More... | |
virtual void | SetWeight (const EdgeWeight _w) noexcept |
Misc. Interface Functions | |
void | SetGroupGraph (GroupGraphType *const &_g) |
virtual void | Clear () noexcept |
Reset the states of this object. More... | |
CompositePath & | GetIntermediates () noexcept |
Get the composite state intermediates. More... | |
const CompositePath & | GetIntermediates () const noexcept |
Get the composite state intermediates. More... | |
const size_t | GetNumIntermediates () noexcept |
Get the number of composite intermediates along this edge. More... | |
void | SetIntermediates (const CompositePath &_cfgs) |
Set the composite state intermediates. More... | |
virtual void | Write (std::ostream &_os) const |
Individual Local Plans | |
virtual void | SetEdge (Robot *const _robot, const ED _ed) |
void | SetEdge (const size_t _robot, IndividualEdge &&_edge) |
void | SetEdge (Robot *const _robot, IndividualEdge &&_edge) |
virtual IndividualEdge * | GetEdge (Robot *const _robot) |
virtual const IndividualEdge * | GetEdge (Robot *const _robot) const |
virtual IndividualEdge * | GetEdge (const size_t _robotIndex) |
virtual const IndividualEdge * | GetEdge (const size_t _robotIndex) const |
std::vector< IndividualEdge > & | GetLocalEdges () noexcept |
Get a vector of local edges in the plan. More... | |
void | ClearLocalEdges () noexcept |
Clear all local edges in the plan. More... | |
virtual std::vector< ED > & | GetEdgeDescriptors () noexcept |
virtual size_t | GetNumRobots () const noexcept |
Get the number of robots given in this group local plan. More... | |
virtual std::unordered_set< Robot * > | GetActiveRobots () |
virtual void | SetTimeSteps (size_t _timesteps) |
Set the number of timesteps along this composite edge. More... | |
virtual size_t | GetTimeSteps () const |
Get the number of timesteps along this composite edge. More... | |
Stapl graph interface | |
virtual CompositeEdge | operator+ (const CompositeEdge &_other) const |
virtual double | Weight () const noexcept |
Get the weight of the plan. More... | |
Protected Attributes | |
Internal State | |
GroupGraphType * | m_groupMap {nullptr} |
The composite graph that this edge is in. More... | |
RobotGroup * | m_group {nullptr} |
The robot group that this edge belongs to. More... | |
double | m_weight {std::numeric_limits<double>::infinity()} |
The edge weight. More... | |
CompositePath | m_intermediates |
Composite state intermediates. More... | |
std::vector< ED > | m_edges |
Descriptors of the individual edges. More... | |
std::vector< IndividualEdge > | m_localEdges |
Note that any edges added to m_localEdges must be valid and complete. More... | |
size_t | m_timesteps |
The number of timesteps along this edge. More... | |
Iteration | |
typedef std::vector< ED >::iterator | iterator |
typedef std::vector< ED >::const_iterator | const_iterator |
virtual iterator | begin () noexcept |
virtual iterator | end () noexcept |
virtual const_iterator | begin () const noexcept |
virtual const_iterator | end () const noexcept |
A composite edge for multiple robots, which is composed of an individual edge for each robot. 'GraphType' refers to the individual robot graph type.
typedef std::vector<CompositeStateType> CompositeEdge< GraphType >::CompositePath |
typedef CompositeState<GraphType> CompositeEdge< GraphType >::CompositeStateType |
typedef std::vector<ED>::const_iterator CompositeEdge< GraphType >::const_iterator |
typedef stapl::edge_descriptor_impl<size_t> CompositeEdge< GraphType >::ED |
typedef double CompositeEdge< GraphType >::EdgeWeight |
typedef CompositeGraph<CompositeStateType, CompositeEdge> CompositeEdge< GraphType >::GroupGraphType |
typedef GraphType::CfgType CompositeEdge< GraphType >::IndividualCfg |
typedef GraphType::EdgeType CompositeEdge< GraphType >::IndividualEdge |
typedef std::vector<ED>::iterator CompositeEdge< GraphType >::iterator |
CompositeEdge< GraphType >::CompositeEdge | ( | GroupGraphType *const & | _g = nullptr , |
const double | _w = 0.0 , |
||
const CompositePath & | _intermediates = CompositePath() |
||
) |
Constructs a CompositeEdge.
_g | The group roadmap in which this edge exists. |
_w | The weight of the plan. Defaults to 0.0. |
_intermediates | The intermediates along the edge. Defaults to CompositePath(). |
CompositeEdge< GraphType >::CompositeEdge | ( | RobotGroup *const & | _g, |
const double | _w = 0.0 , |
||
const CompositePath & | _intermediates = CompositePath() |
||
) |
Constructs a CompositeEdge.
_g | The robot group to which this edge exists. |
_w | The weight of the plan. Defaults to 0.0. |
_intermediates | The intermediates along the edge. Defaults to CompositePath(). |
|
virtualnoexcept |
|
virtualnoexcept |
|
virtualnoexcept |
Reset the states of this object.
Reimplemented in GroupLocalPlan< GraphType >.
|
noexcept |
Clear all local edges in the plan.
|
virtualnoexcept |
|
virtualnoexcept |
|
virtual |
Get a vector of the robots who move along this composite edge (i.e. the individual source vertex differs from the target vertex).
|
virtual |
Get the individual edge for a robot.
_robotIndex | The group index of the robot which the edge refers to. |
|
virtual |
Get the individual edge for a robot.
_robotIndex | The group index of the robot which the edge refers to. |
|
virtual |
Get the individual edge for a robot.
_robot | The robot which the edge refers to. |
|
virtual |
Get the individual edge for a robot.
_robot | The robot which the edge refers to. |
|
virtualnoexcept |
Get a vector of individual edge descriptors. An edge descriptor will be invalid if an individual edge is local.
|
noexcept |
Get the composite state intermediates.
|
noexcept |
Get the composite state intermediates.
|
noexcept |
Get a vector of local edges in the plan.
|
noexcept |
Get the number of composite intermediates along this edge.
|
virtualnoexcept |
Get the number of robots given in this group local plan.
|
virtual |
Get the number of timesteps along this composite edge.
|
virtualnoexcept |
Get the numeric weight for this edge.
|
virtualnoexcept |
Check if the given edge is unequal to the current.
_w | The given edge. |
|
virtual |
Add two composite edges. This only adds weights, it doesn't take intermediates into account.
|
inlinevirtualnoexcept |
Check if the given edge is less than the current.
_other | The given edge. |
|
virtualnoexcept |
Check if the given edge is equal to the current.
_w | The given edge. |
void CompositeEdge< GraphType >::SetEdge | ( | const size_t | _robot, |
IndividualEdge && | _edge | ||
) |
Set the individual edge for a robot to a local copy of an edge.
_robot | The robot which the edge refers to. |
_edge | The edge. |
|
virtual |
Set the individual edge for a robot to a graph copy of an edge.
_robot | The robot which the edge refers to. |
_ed | The edge descriptor. |
void CompositeEdge< GraphType >::SetEdge | ( | Robot *const | _robot, |
IndividualEdge && | _edge | ||
) |
Set the individual edge for a robot to a local copy of an edge.
_robot | The robot which the edge refers to. |
_edge | The edge. |
void CompositeEdge< GraphType >::SetGroupGraph | ( | GroupGraphType *const & | _g | ) |
Set the composite graph that this composite edge lies within.
_g | The composite graph to associate the edge with. |
void CompositeEdge< GraphType >::SetIntermediates | ( | const CompositePath & | _cfgs | ) |
Set the composite state intermediates.
|
virtual |
Set the number of timesteps along this composite edge.
|
virtualnoexcept |
Set the numeric weight for this edge.
_w | The numeric weight. |
|
virtualnoexcept |
Get the weight of the plan.
|
virtual |
Write an edge to an output stream.
_os | The output stream to write to. |
|
protected |
Descriptors of the individual edges.
|
protected |
The robot group that this edge belongs to.
|
protected |
The composite graph that this edge is in.
|
protected |
Composite state intermediates.
|
protected |
Note that any edges added to m_localEdges must be valid and complete.
Edges which are not in a map.
|
protected |
The number of timesteps along this edge.
|
protected |
The edge weight.