Apollo 10.0
自动驾驶开放平台
apollo::routing::TopoRangeManager类 参考

#include <topo_range_manager.h>

apollo::routing::TopoRangeManager 的协作图:

Public 成员函数

 TopoRangeManager ()=default
 
virtual ~TopoRangeManager ()=default
 
const std::unordered_map< const TopoNode *, std::vector< NodeSRange > > & RangeMap () const
 
const std::vector< NodeSRange > * Find (const TopoNode *node) const
 
void PrintDebugInfo () const
 
void Clear ()
 
void Add (const TopoNode *node, double start_s, double end_s)
 
void SortAndMerge ()
 

详细描述

在文件 topo_range_manager.h27 行定义.

构造及析构函数说明

◆ TopoRangeManager()

apollo::routing::TopoRangeManager::TopoRangeManager ( )
default

◆ ~TopoRangeManager()

virtual apollo::routing::TopoRangeManager::~TopoRangeManager ( )
virtualdefault

成员函数说明

◆ Add()

void apollo::routing::TopoRangeManager::Add ( const TopoNode node,
double  start_s,
double  end_s 
)

在文件 topo_range_manager.cc79 行定义.

79 {
80 NodeSRange range(start_s, end_s);
81 range_map_[node].push_back(range);
82}

◆ Clear()

void apollo::routing::TopoRangeManager::Clear ( )

在文件 topo_range_manager.cc77 行定义.

77{ range_map_.clear(); }

◆ Find()

const std::vector< NodeSRange > * apollo::routing::TopoRangeManager::Find ( const TopoNode node) const

在文件 topo_range_manager.cc58 行定义.

59 {
60 auto iter = range_map_.find(node);
61 if (iter == range_map_.end()) {
62 return nullptr;
63 } else {
64 return &(iter->second);
65 }
66}

◆ PrintDebugInfo()

void apollo::routing::TopoRangeManager::PrintDebugInfo ( ) const

在文件 topo_range_manager.cc68 行定义.

68 {
69 for (const auto& map : range_map_) {
70 for (const auto& range : map.second) {
71 AINFO << "black lane id: " << map.first->LaneId()
72 << ", start s: " << range.StartS() << ", end s: " << range.EndS();
73 }
74 }
75}
#define AINFO
Definition log.h:42

◆ RangeMap()

const std::unordered_map< const TopoNode *, std::vector< NodeSRange > > & apollo::routing::TopoRangeManager::RangeMap ( ) const

在文件 topo_range_manager.cc55 行定义.

55 {
56 return range_map_;
57}

◆ SortAndMerge()

void apollo::routing::TopoRangeManager::SortAndMerge ( )

在文件 topo_range_manager.cc84 行定义.

84 {
85 for (auto& iter : range_map_) {
86 std::vector<NodeSRange> merged_range_vec;
87 merge_block_range(iter.first, iter.second, &merged_range_vec);
88 iter.second.assign(merged_range_vec.begin(), merged_range_vec.end());
89 }
90}

该类的文档由以下文件生成: