Apollo 11.0
自动驾驶开放平台
apollo::perception::algorithm::PlaneFitPointCandIndices结构体 参考

#include <i_ground.h>

apollo::perception::algorithm::PlaneFitPointCandIndices 的协作图:

Public 成员函数

 PlaneFitPointCandIndices ()
 
void Reserve (unsigned int size)
 
void Clear ()
 
void PushIndex (int i)
 
int Prune (unsigned int min_nr_samples, unsigned int max_nr_samples)
 
unsigned int Size () const
 
int & operator[] (unsigned int i)
 
int & operator[] (int i)
 
const int & operator[] (unsigned int i) const
 
const int & operator[] (int i) const
 

Public 属性

std::vector< int > indices
 
int random_seed
 

详细描述

在文件 i_ground.h 第 216 行定义.

构造及析构函数说明

◆ PlaneFitPointCandIndices()

apollo::perception::algorithm::PlaneFitPointCandIndices::PlaneFitPointCandIndices ( )
inline

成员函数说明

◆ Clear()

void apollo::perception::algorithm::PlaneFitPointCandIndices::Clear ( )
inline

在文件 i_ground.h 第 219 行定义.

◆ operator[]() [1/4]

int & apollo::perception::algorithm::PlaneFitPointCandIndices::operator[] ( int  i)
inline

在文件 i_ground.h 第 229 行定义.

229 {
230 assert(i >= 0 && i < static_cast<int>(indices.size()));
231 return indices.at(i);
232 }

◆ operator[]() [2/4]

const int & apollo::perception::algorithm::PlaneFitPointCandIndices::operator[] ( int  i) const
inline

在文件 i_ground.h 第 237 行定义.

237 {
238 assert(i >= 0 && i < static_cast<int>(indices.size()));
239 return indices.at(i);
240 }

◆ operator[]() [3/4]

int & apollo::perception::algorithm::PlaneFitPointCandIndices::operator[] ( unsigned int  i)
inline

在文件 i_ground.h 第 225 行定义.

225 {
226 assert(i >= 0 && i < indices.size());
227 return indices.at(i);
228 }

◆ operator[]() [4/4]

const int & apollo::perception::algorithm::PlaneFitPointCandIndices::operator[] ( unsigned int  i) const
inline

在文件 i_ground.h 第 233 行定义.

233 {
234 assert(i >= 0 && i < indices.size());
235 return indices.at(i);
236 }

◆ Prune()

int apollo::perception::algorithm::PlaneFitPointCandIndices::Prune ( unsigned int  min_nr_samples,
unsigned int  max_nr_samples 
)

在文件 i_ground.cc 第 69 行定义.

70 {
71 assert(min_nr_samples < max_nr_samples);
72 unsigned int size = static_cast<unsigned int>(indices.size());
73 unsigned int half = 0;
74 if (size > max_nr_samples) {
75 IRandomizedShuffle1(indices.data(), static_cast<int>(indices.size()),
77 // IRandomSample(indices.Data(), max_nr_samples, static_cast<int>Size,
78 // random_seed);
79 // for (int i = 0; i < max_nr_samples; ++i) {
80 // int j = indices[i];
81 // // i <= j forever;
82 // indices[i] = indices[j];
83 // }
84 indices.resize(max_nr_samples);
85 } else {
86 if (size > min_nr_samples) {
87 half = size >> 1;
88 while (half > min_nr_samples) {
89 half = half >> 1;
90 }
91 size = half << 1;
92 IRandomizedShuffle1(indices.data(), static_cast<int>(indices.size()),
94 indices.resize(size);
95 }
96 }
97 return static_cast<int>(indices.size());
98}
void IRandomizedShuffle1(T *A, int n, int *s)
Definition i_rand.h:110

◆ PushIndex()

void apollo::perception::algorithm::PlaneFitPointCandIndices::PushIndex ( int  i)
inline

在文件 i_ground.h 第 220 行定义.

220{ indices.push_back(i); }

◆ Reserve()

void apollo::perception::algorithm::PlaneFitPointCandIndices::Reserve ( unsigned int  size)
inline

在文件 i_ground.h 第 218 行定义.

218{ indices.reserve(size); }

◆ Size()

unsigned int apollo::perception::algorithm::PlaneFitPointCandIndices::Size ( ) const
inline

在文件 i_ground.h 第 222 行定义.

222 {
223 return static_cast<unsigned int>(indices.size());
224 }

类成员变量说明

◆ indices

std::vector<int> apollo::perception::algorithm::PlaneFitPointCandIndices::indices

在文件 i_ground.h 第 241 行定义.

◆ random_seed

int apollo::perception::algorithm::PlaneFitPointCandIndices::random_seed

在文件 i_ground.h 第 242 行定义.


该结构体的文档由以下文件生成: