Parasol Planning Library (PPL)
GroupRoadmap< Vertex, Edge > Class Template Referencefinal

#include <GroupRoadmap.h>

Inheritance diagram for GroupRoadmap< Vertex, Edge >:
Inheritance graph
[legend]
Collaboration diagram for GroupRoadmap< Vertex, Edge >:
Collaboration graph
[legend]

Public Types

Local Types
typedef CompositeGraph< Vertex, Edge > BaseType
 
typedef GroupRoadmap< Vertex, Edge > GroupRoadmapType
 
typedef Vertex::IndividualGraph IndividualRoadmap
 
typedef IndividualRoadmap::CfgType IndividualCfg
 
typedef IndividualRoadmap::EdgeType IndividualEdge
 
typedef BaseType::EID ED
 
typedef BaseType::adj_edge_iterator adj_edge_iterator
 
typedef BaseType::edge_descriptor edge_descriptor
 
typedef BaseType::vertex_iterator vertex_iterator
 
typedef BaseType::vertex_descriptor vertex_descriptor
 
typedef STAPLGraph::const_vertex_iterator CVI
 
typedef STAPLGraph::vertex_iterator VI
 
typedef STAPLGraph::adj_edge_iterator EI
 
typedef STAPLGraph::vertex_descriptor VID
 
using STAPLGraph = stapl::sequential::graph< stapl::DIRECTED, stapl::NONMULTIEDGES, Vertex, Edge >
 
- Public Types inherited from CompositeGraph< Vertex, Edge >
typedef GenericStateGraph< Vertex, Edge > BaseType
 
typedef CompositeGraph< Vertex, Edge > CompositeGraphType
 
typedef Vertex::IndividualGraph IndividualGraph
 
typedef BaseType::EID ED
 
typedef IndividualGraph::EdgeType IndividualEdge
 
typedef BaseType::adj_edge_iterator adj_edge_iterator
 
typedef BaseType::edge_descriptor edge_descriptor
 
typedef BaseType::vertex_iterator vertex_iterator
 
typedef BaseType::vertex_descriptor vertex_descriptor
 
typedef STAPLGraph::const_vertex_iterator CVI
 
typedef STAPLGraph::vertex_iterator VI
 
typedef STAPLGraph::adj_edge_iterator EI
 
typedef STAPLGraph::vertex_descriptor VID
 
using STAPLGraph = stapl::sequential::graph< stapl::DIRECTED, stapl::NONMULTIEDGES, Vertex, Edge >
 
typedef std::function< void(VI)> VertexHook
 
typedef std::function< void(EI)> EdgeHook
 
enum class  HookType
 
- Public Types inherited from GenericStateGraph< Vertex, Edge >
enum class  HookType { AddVertex , DeleteVertex , AddEdge , DeleteEdge }
 
using STAPLGraph = stapl::sequential::graph< stapl::DIRECTED, stapl::NONMULTIEDGES, Vertex, Edge >
 
typedef STAPLGraph::vertex_descriptor VID
 
typedef STAPLGraph::edge_descriptor EID
 
typedef EID::edge_id_type EdgeID
 
typedef std::unordered_set< VIDVertexSet
 
typedef STAPLGraph::vertex_iterator VI
 
typedef STAPLGraph::adj_edge_iterator EI
 
typedef STAPLGraph::const_vertex_iterator CVI
 
typedef STAPLGraph::const_adj_edge_iterator CEI
 
typedef STAPLGraph::vertex_property VP
 
typedef STAPLGraph::edge_property EP
 
typedef Vertex CfgType
 
typedef Edge EdgeType
 
typedef stapl::sequential::vector_property_map< STAPLGraph, size_t > ColorMap
 
typedef std::function< void(VI)> VertexHook
 
typedef std::function< void(EI)> EdgeHook
 
typedef CCTracker< GenericStateGraph< Vertex, Edge > > CCTrackerType
 

Public Member Functions

Construction
template<typename MPSolution >
 GroupRoadmap (RobotGroup *const _g, MPSolution *const _solution)
 Construct a group roadmap. More...
 
Disabled Functions

Move and copy are disabled because the group cfgs and edges need to know their group roadmap pointer. To implement these, we'll need to update the pointer on every component.

 GroupRoadmap (const GroupRoadmap &)=delete
 
 GroupRoadmap (GroupRoadmap &&)=delete
 
GroupRoadmapoperator= (const GroupRoadmap &)=delete
 
GroupRoadmapoperator= (GroupRoadmap &&)=delete
 
Modifiers
virtual VID AddVertex (const Vertex &_v) noexcept override
 
virtual ED AddEdge (const VID _source, const VID _target, const Edge &_w) noexcept override
 
virtual EID AddEdge (const VID _source, const VID _target, const Edge &_w) noexcept
 
virtual std::pair< EID, EIDAddEdge (const VID _source, const VID _target, const std::pair< Edge, Edge > &_w) noexcept
 
virtual EID AddEdge (const EID _eid, const Edge &_w) noexcept
 
virtual EID AddEdge (const VID _source, const VID _target) noexcept
 
- Public Member Functions inherited from CompositeGraph< Vertex, Edge >
 CompositeGraph (RobotGroup *const _g=nullptr, std::vector< IndividualGraph * > _graphs={})
 Construct a composite graph. More...
 
 CompositeGraph (const CompositeGraph &)=delete
 
 CompositeGraph (CompositeGraph &&)=delete
 
CompositeGraphoperator= (const CompositeGraph &)=delete
 
CompositeGraphoperator= (CompositeGraph &&)=delete
 
virtual RobotGroupGetGroup ()
 Get the robot group. More...
 
virtual IndividualGraphGetIndividualGraph (const size_t _index)
 
virtual const IndividualGraphGetIndividualGraph (const size_t _index) const
 
virtual size_t GetNumRobots () const noexcept
 Get the number of robots for the group this graph is for. More...
 
virtual void Write (const std::string &_filename, Environment *_env) const override
 
virtual void WriteCompositeGraph (const std::string &_filename, Environment *const _env) const
 
std::string PrettyPrint () const
 
virtual void DeleteVertex (const VID _v) noexcept override
 
virtual void DeleteEdge (const VID _source, const VID _target) noexcept override
 
virtual void DeleteEdge (EI _iterator) noexcept override
 
virtual EID AddEdge (const VID _source, const VID _target, const Edge &_w) noexcept
 
virtual std::pair< EID, EIDAddEdge (const VID _source, const VID _target, const std::pair< Edge, Edge > &_w) noexcept
 
virtual EID AddEdge (const EID _eid, const Edge &_w) noexcept
 
virtual EID AddEdge (const VID _source, const VID _target) noexcept
 
virtual void ClearHooks () noexcept override
 
- Public Member Functions inherited from GenericStateGraph< Vertex, Edge >
 GenericStateGraph ()
 
 GenericStateGraph (Robot *const _r)
 
 GenericStateGraph (const GenericStateGraph &_r)
 
 GenericStateGraph (GenericStateGraph &&_r)
 
GenericStateGraphoperator= (const GenericStateGraph &_r)
 
GenericStateGraphoperator= (GenericStateGraph &&_r)
 
bool operator== (const GenericStateGraph &_r) const noexcept
 
bool operator!= (const GenericStateGraph &_r) const noexcept
 
virtual VID AddVertex (const VID _vid, const Vertex &_v) noexcept
 
virtual VID AddDuplicateVertex (const Vertex &_v) noexcept
 
virtual std::pair< EID, EIDAddEdge (const VID _source, const VID _target, const std::pair< Edge, Edge > &_w) noexcept
 
virtual EID AddEdge (const EID _eid, const Edge &_w) noexcept
 
virtual EID AddEdge (const VID _source, const VID _target) noexcept
 
void SetRobot (Robot *const _r) noexcept
 Set the robot pointer on all configurations in the map. More...
 
void AppendRoadmap (const GenericStateGraph &_r)
 
void SetCCTracker (StatClass *const _stats=nullptr)
 
size_t Size () const noexcept
 Get the number of vertices in the roadmap. More...
 
bool IsVertex (const VID _vid) const noexcept
 
bool IsVertex (const Vertex &_v) const noexcept
 
bool IsVertex (const Vertex &_v, CVI &_vi) const noexcept
 
bool IsEdge (const VID _source, const VID _target) const noexcept
 
template<typename T >
VID GetVID (const T &_t) const noexcept
 
VID GetVID (const VI &_t) const noexcept
 
VID GetVID (const Vertex &_t) const noexcept
 
const VertexSetGetPredecessors (const VID _vid) const noexcept
 
VID GetLastVID () const noexcept
 Get the descriptor of the last vertex added to the graph. More...
 
size_t GetTimestamp () const noexcept
 Each time the roadmap is modified, we update the timestamp. More...
 
const VertexSetGetAllVIDs () const noexcept
 Get the set of all VIDs in the roadmap. More...
 
RobotGetRobot () const noexcept
 Get the robot represented by this roadmap. More...
 
CCTrackerTypeGetCCTracker () const noexcept
 Get the connected component tracker. More...
 
template<typename T >
VPGetVertex (T &_t) noexcept
 Retrieve a reference to a vertex property by descriptor or iterator. More...
 
VPGetVertex (VI &_t) noexcept
 
VPGetVertex (VID _t) noexcept
 
template<typename T >
const VPGetVertex (T &_t) const noexcept
 
const VPGetVertex (CVI &_t) const noexcept
 
const VPGetVertex (VID _t) const noexcept
 
std::vector< VIDGetChildren (const VID _vid) const noexcept
 
size_t GetInDegree (const VID _vid) noexcept
 
std::vector< EIFindInboundEdges (const VID _vid)
 
bool GetEdge (const VID _source, const VID _target, EI &_ei) noexcept
 
bool GetEdge (const VID _source, const VID _target, CEI &_ei) const noexcept
 
EPGetEdge (const VID _source, const VID _target) noexcept
 
EPGetEdge (const EID _descriptor) noexcept
 
bool IsHook (const HookType, const std::string &_label) const
 
void InstallHook (const HookType _type, const std::string &_label, const VertexHook &_h)
 
void InstallHook (const HookType _type, const std::string &_label, const EdgeHook &_h)
 
void RemoveHook (const HookType _type, const std::string &_label)
 
void DisableHooks () noexcept
 
void EnableHooks () noexcept
 Enable the hook functions (default). More...
 

Additional Inherited Members

- Protected Member Functions inherited from GenericStateGraph< Vertex, Edge >
void ExecuteAddVertexHooks (const VI _iterator) noexcept
 
void ExecuteDeleteVertexHooks (const VI _iterator) noexcept
 
void ExecuteAddEdgeHooks (const EI _iterator) noexcept
 
void ExecuteDeleteEdgeHooks (const EI _iterator) noexcept
 
std::string ToString (const HookType &_t) const noexcept
 
- Protected Attributes inherited from CompositeGraph< Vertex, Edge >
RobotGroup *const m_group
 The robot group. More...
 
std::vector< IndividualGraph * > m_graphs
 The individual graphs. More...
 
size_t m_timestamp
 Tracks the number of changes to the graph. More...
 
- Protected Attributes inherited from GenericStateGraph< Vertex, Edge >
Robotm_robot {nullptr}
 The robot this roadmap is for. More...
 
size_t m_timestamp {0}
 Tracks the number of changes to the graph. More...
 
bool m_enableHooks {true}
 Use hook functions? More...
 
std::unordered_map< std::string, VertexHookm_addVertexHooks
 Hook functions to call when adding a vertex. More...
 
std::unordered_map< std::string, VertexHookm_deleteVertexHooks
 Hook functions to call when deleting a vertex. More...
 
std::unordered_map< std::string, EdgeHookm_addEdgeHooks
 Hook functions to call when adding an edge. More...
 
std::unordered_map< std::string, EdgeHookm_deleteEdgeHooks
 Hook functions to call when deleting an edge. More...
 
std::unique_ptr< CCTrackerTypem_ccTracker
 Tracks weak CCs within the roadmap. More...
 
std::unordered_map< VID, VertexSetm_predecessors
 
VertexSet m_allVIDs
 

Detailed Description

template<typename Vertex, typename Edge>
class GroupRoadmap< Vertex, Edge >

Represents a roadmap for a robot group.

Rather than duplicating the data for each robot, this object refers to an individual roadmap for each robot. This object however does not own the individual roadmaps - it merely points to them.

Note that VIDs in this object refer to GROUP configuration VIDs.

Member Typedef Documentation

◆ adj_edge_iterator

template<typename Vertex , typename Edge >
typedef BaseType::adj_edge_iterator GroupRoadmap< Vertex, Edge >::adj_edge_iterator

◆ BaseType

template<typename Vertex , typename Edge >
typedef CompositeGraph<Vertex, Edge> GroupRoadmap< Vertex, Edge >::BaseType

◆ CVI

template<typename Vertex , typename Edge >
typedef STAPLGraph::const_vertex_iterator GenericStateGraph< Vertex, Edge >::CVI

◆ ED

template<typename Vertex , typename Edge >
typedef BaseType::EID GroupRoadmap< Vertex, Edge >::ED

◆ edge_descriptor

template<typename Vertex , typename Edge >
typedef BaseType::edge_descriptor GroupRoadmap< Vertex, Edge >::edge_descriptor

◆ EI

template<typename Vertex , typename Edge >
typedef STAPLGraph::adj_edge_iterator GenericStateGraph< Vertex, Edge >::EI

◆ GroupRoadmapType

template<typename Vertex , typename Edge >
typedef GroupRoadmap<Vertex, Edge> GroupRoadmap< Vertex, Edge >::GroupRoadmapType

◆ IndividualCfg

template<typename Vertex , typename Edge >
typedef IndividualRoadmap::CfgType GroupRoadmap< Vertex, Edge >::IndividualCfg

◆ IndividualEdge

template<typename Vertex , typename Edge >
typedef IndividualRoadmap::EdgeType GroupRoadmap< Vertex, Edge >::IndividualEdge

◆ IndividualRoadmap

template<typename Vertex , typename Edge >
typedef Vertex::IndividualGraph GroupRoadmap< Vertex, Edge >::IndividualRoadmap

◆ STAPLGraph

template<typename Vertex , typename Edge >
using GenericStateGraph< Vertex, Edge >::STAPLGraph = stapl::sequential::graph<stapl::DIRECTED, stapl::NONMULTIEDGES, Vertex, Edge>

◆ vertex_descriptor

template<typename Vertex , typename Edge >
typedef BaseType::vertex_descriptor GroupRoadmap< Vertex, Edge >::vertex_descriptor

◆ vertex_iterator

template<typename Vertex , typename Edge >
typedef BaseType::vertex_iterator GroupRoadmap< Vertex, Edge >::vertex_iterator

◆ VI

template<typename Vertex , typename Edge >
typedef STAPLGraph::vertex_iterator GenericStateGraph< Vertex, Edge >::VI

◆ VID

template<typename Vertex , typename Edge >
typedef STAPLGraph::vertex_descriptor GenericStateGraph< Vertex, Edge >::VID

Constructor & Destructor Documentation

◆ GroupRoadmap() [1/3]

template<typename Vertex , typename Edge >
template<typename MPSolution >
GroupRoadmap< Vertex, Edge >::GroupRoadmap ( RobotGroup *const  _g,
MPSolution *const  _solution 
)

Construct a group roadmap.

◆ GroupRoadmap() [2/3]

template<typename Vertex , typename Edge >
GroupRoadmap< Vertex, Edge >::GroupRoadmap ( const GroupRoadmap< Vertex, Edge > &  )
delete

◆ GroupRoadmap() [3/3]

template<typename Vertex , typename Edge >
GroupRoadmap< Vertex, Edge >::GroupRoadmap ( GroupRoadmap< Vertex, Edge > &&  )
delete

Member Function Documentation

◆ AddEdge() [1/5]

template<typename Vertex , typename Edge >
GenericStateGraph< Vertex, Edge >::EID GenericStateGraph< Vertex, Edge >::AddEdge
noexcept

Import the base-class version for this (required because we've overridden one of the overloads).

◆ AddEdge() [2/5]

template<typename Vertex , typename Edge >
GenericStateGraph< Vertex, Edge >::EID GenericStateGraph< Vertex, Edge >::AddEdge
noexcept

Import the base-class version for this (required because we've overridden one of the overloads).

◆ AddEdge() [3/5]

template<typename Vertex , typename Edge >
GenericStateGraph< Vertex, Edge >::EID GenericStateGraph< Vertex, Edge >::AddEdge
noexcept

Import the base-class version for this (required because we've overridden one of the overloads).

◆ AddEdge() [4/5]

template<typename Vertex , typename Edge >
GroupRoadmap< Vertex, Edge >::ED GroupRoadmap< Vertex, Edge >::AddEdge ( const VID  _source,
const VID  _target,
const Edge &  _w 
)
overridevirtualnoexcept

Add an edge from source to target.

Parameters
_sourceThe source vertex.
_targetThe target vertex.
_wThe edge property.

Reimplemented from CompositeGraph< Vertex, Edge >.

◆ AddEdge() [5/5]

template<typename Vertex , typename Edge >
std::pair< typename GenericStateGraph< Vertex, Edge >::EID, typename GenericStateGraph< Vertex, Edge >::EID > GenericStateGraph< Vertex, Edge >::AddEdge
noexcept

Import the base-class version for this (required because we've overridden one of the overloads).

◆ AddVertex()

template<typename Vertex , typename Edge >
GroupRoadmap< Vertex, Edge >::VID GroupRoadmap< Vertex, Edge >::AddVertex ( const Vertex &  _v)
overridevirtualnoexcept

Add a new unique vertex to the graph. If it already exists, a warning will be printed to cerr.

Parameters
_vThe vertex to add.
Returns
A new VID of the added vertex, or the VID of the existing vertex.

Reimplemented from CompositeGraph< Vertex, Edge >.

◆ operator=() [1/2]

template<typename Vertex , typename Edge >
GroupRoadmap& GroupRoadmap< Vertex, Edge >::operator= ( const GroupRoadmap< Vertex, Edge > &  )
delete

◆ operator=() [2/2]

template<typename Vertex , typename Edge >
GroupRoadmap& GroupRoadmap< Vertex, Edge >::operator= ( GroupRoadmap< Vertex, Edge > &&  )
delete

The documentation for this class was generated from the following file: