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;
std::vector< const T * > GetInfos() const
std::vector< Road * > _nexts
Describes a Cubic Polynomial so: f(x) = a + bx + cx^2 + dx^3.
const std::pair< double, double > GetNearestPoint(const geom::Location &loc) const
Returns a pair containing:
static auto make_map_values_iterator(It it)
Creates an iterator over non-const references to the values of a map.
std::vector< const T * > GetInfosInRange(const double min_s, const double max_s) const
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.
RoadId GetSuccessor() const
std::vector< Lane * > GetLanesByDistance(double s)
Get all lanes from all lane sections in a specific s.
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...
std::vector< Road * > GetNexts() const
std::vector< Road * > _prevs
Lane * GetNextLane(const double s, const LaneId lane_id)
const geom::CubicPolynomial & GetElevationOn(const double s) const
Lane * GetPrevLane(const double s, const LaneId lane_id)
This file contains definitions of common data structures used in traffic manager. ...
LaneSection * GetEndSection(LaneId id)
Get the end section (from road coordinates s) given a lane id.
static auto GetLessEqualRange(MultiMapT &map, double s)
auto GetLaneSectionsAt(const double s)
const T * GetInfo(const double s) const
auto GetLaneSections() const
Inherit (privately) to suppress copy construction and assignment.
auto GetLaneSectionsAt(const double s) const
Lane & GetLaneByDistance(double s, LaneId lane_id)
static auto make_map_values_const_iterator(It it)
Creates an iterator over const references to the values of a map.
const LaneSection & GetLaneSectionById(SectionId id) const
Lane & GetLaneById(SectionId section_id, LaneId lane_id)
LaneSectionMap _lane_sections
LaneSection & GetLaneSectionById(SectionId id)
JuncId GetJunctionId() const
RoadId GetPredecessor() const
std::map< LaneId, const Lane * > GetLanesAt(const double s) const
Get all lanes at a given s.
LaneSection * GetStartSection(LaneId id)
Get the start section (from road coordinates s) given a lane id.
std::string GetName() 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...
const MapData * GetMap() const
static auto MakeListView(Iterator begin, Iterator end)
LaneSection & GetById(SectionId id)
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< Road * > GetPrevs() const