52 size_t Size() const noexcept;
55 bool Empty() const noexcept;
61 const std::vector<
VID>&
VIDs() const noexcept;
64 const std::pair<std::vector<
VID>,std::vector<
size_t>>
VIDsWaiting() const noexcept;
69 const std::vector<
Cfg>&
Cfgs() const;
103 Path operator+(const
Path& _p) const;
107 Path& operator+=(const std::vector<
VID>& _vids);
111 Path operator+(const std::vector<
VID>& _vids) const;
139 std::pair<std::pair<
size_t,
size_t>,std::pair<
size_t,
size_t>>
149 void AssertSameMap(const
Path& _p) const noexcept;
156 std::vector<
VID> m_vids;
157 std::vector<
size_t> m_waitingTimesteps;
159 mutable std::vector<
Cfg> m_cfgs;
160 mutable
bool m_cfgsCached{
false};
162 mutable double m_length{0};
163 mutable bool m_lengthCached{
false};
165 size_t m_finalWaitTimeSteps{0};
167 mutable size_t m_timesteps{0};
168 mutable bool m_timestepsCached{
false};
Definition: GenericStateGraph.h:67
STAPLGraph::vertex_descriptor VID
Definition: GenericStateGraph.h:83
Definition: MPLibrary.h:47
double Length() const
Get the total edge weight.
Definition: Path.cpp:45
std::vector< size_t > GetWaitTimes()
Get the wait time at each vertex index in the path.
Definition: Path.cpp:248
std::pair< std::pair< size_t, size_t >, std::pair< size_t, size_t > > GetEdgeAtTimestep(size_t _timestep)
Definition: Path.cpp:255
void ResetTimeSteps()
Reset the number of timesteps to 0.
Definition: Path.cpp:143
const std::vector< Cfg > & Cfgs() const
Definition: Path.cpp:84
size_t TimeSteps() const
Definition: Path.cpp:101
void SetFinalWaitTimeSteps(const size_t &_timeSteps)
Definition: Path.cpp:221
RoadmapType * GetRoadmap() const noexcept
Get the roadmap used by this path.
Definition: Path.cpp:24
void Clear()
Clear all data in the path.
Definition: Path.cpp:203
void SetWaitTimes(std::vector< size_t > _waitTimes)
Definition: Path.cpp:235
const std::vector< VID > & VIDs() const noexcept
Get the VIDs in the path.
Definition: Path.cpp:70
size_t Size() const noexcept
Get the number of cfgs in the path.
Definition: Path.cpp:31
GenericStateGraph< Cfg, DefaultWeight< Cfg > > RoadmapType
Definition: Path.h:30
const std::pair< std::vector< VID >, std::vector< size_t > > VIDsWaiting() const noexcept
Get the VIDs and timesteps waiting in the path.
Definition: Path.cpp:77
void SetTimeSteps(size_t _timesteps)
Hardcode number of timesteps in the path.
Definition: Path.cpp:135
const std::vector< Cfg > FullCfgs(MPLibrary *const _lib) const
Definition: Path.cpp:289
bool Empty() const noexcept
Check if the path is empty.
Definition: Path.cpp:38
const std::vector< Cfg > FullCfgsWithWait(MPLibrary *const _lib) const
Definition: Path.cpp:314
RoadmapType::VID VID
Definition: Path.h:31
Path(RoadmapType *const _r=nullptr)
Definition: Path.cpp:11
const size_t GetFinalWaitTimeSteps() const
Get the number of timesteps to wait after traversal of the path.
Definition: Path.cpp:228
Robot * GetRobot() const noexcept
Get the robot which travels this path.
Definition: Path.cpp:17
void FlushCache()
Clear cached data, but leave the VIDs.
Definition: Path.cpp:212