22#include <unordered_map>
76 std::vector<Road *>
GetNexts()
const;
78 std::vector<Road *>
GetPrevs()
const;
112 template <
typename T>
117 template <
typename T>
122 template <
typename T>
135 template <
typename MultiMapT>
137 if (map.find(s) == map.end()) {
138 auto it = map.lower_bound(s);
139 if (it == map.begin()) {
140 return std::make_pair(map.end(), map.end());
144 return std::make_pair(map.lower_bound(s), map.upper_bound(s));
179 std::map<LaneId, const Lane *>
GetLanesAt(
const double s)
const;
Inherit (privately) to suppress copy construction and assignment.
Describes a Cubic Polynomial so: f(x) = a + bx + cx^2 + dx^3
LaneSection & GetById(SectionId id)
std::vector< const T * > GetInfos() const
std::vector< const T * > GetInfosInRange(const double min_s, const double max_s) const
RoadId GetPredecessor() const
const std::pair< double, double > GetNearestPoint(const geom::Location &loc) const
Returns a pair containing:
std::vector< Road * > GetPrevs() const
static auto GetLessEqualRange(MultiMapT &map, double s)
Lane * GetPrevLane(const double s, const LaneId lane_id)
std::vector< Road * > _nexts
const T * GetInfo(const double s) const
Lane & GetLaneById(SectionId section_id, LaneId lane_id)
double UpperBound(double s) const
Return the upper bound "s", i.e., the end distance of the lane section at s (clamped at road's length...
LaneSectionMap _lane_sections
RoadId GetSuccessor() const
std::map< LaneId, const Lane * > GetLanesAt(const double s) const
Get all lanes at a given s
std::vector< Road * > GetNexts() const
LaneSection * GetStartSection(LaneId id)
Get the start section (from road coordinates s) given a lane id
Lane * GetNextLane(const double s, const LaneId lane_id)
auto GetLaneSections() const
const geom::CubicPolynomial & GetElevationOn(const double s) const
Lane & GetLaneByDistance(double s, LaneId lane_id)
std::vector< Road * > _prevs
auto GetLaneSectionsAt(const double s)
const std::pair< const Lane *, double > GetNearestLane(const double s, const geom::Location &loc, uint32_t type=static_cast< uint32_t >(Lane::LaneType::Any)) const
Returns a pointer to the nearest lane, given s relative to Road and a location
auto GetLaneSectionsAt(const double s) const
element::DirectedPoint GetDirectedPointIn(const double s) const
Returns a directed point on the center of the road (lane 0), with the corresponding laneOffset and el...
std::vector< Lane * > GetLanesByDistance(double s)
Get all lanes from all lane sections in a specific s
const LaneSection & GetLaneSectionById(SectionId id) const
element::DirectedPoint GetDirectedPointInNoLaneOffset(const double s) const
Returns a directed point on the center of the road (lane 0), with the corresponding laneOffset and el...
JuncId GetJunctionId() const
LaneSection * GetEndSection(LaneId id)
Get the end section (from road coordinates s) given a lane id
std::string GetName() const
const MapData * GetMap() const
LaneSection & GetLaneSectionById(SectionId id)
static auto make_map_values_iterator(It it)
Creates an iterator over non-const references to the values of a map.
static auto make_map_values_const_iterator(It it)
Creates an iterator over const references to the values of a map.
This file contains definitions of common data structures used in traffic manager.
static auto MakeListView(Iterator begin, Iterator end)