Apollo 10.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 第 214 行定义.

构造及析构函数说明

◆ PlaneFitPointCandIndices()

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

成员函数说明

◆ Clear()

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

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

◆ operator[]() [1/4]

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

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

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

◆ operator[]() [2/4]

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

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

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

◆ operator[]() [3/4]

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

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

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

◆ operator[]() [4/4]

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

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

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

◆ Prune()

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

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

68 {
69 assert(min_nr_samples < max_nr_samples);
70 unsigned int size = static_cast<unsigned int>(indices.size());
71 unsigned int half = 0;
72 if (size > max_nr_samples) {
73 IRandomizedShuffle1(indices.data(), static_cast<int>(indices.size()),
75 // IRandomSample(indices.Data(), max_nr_samples, static_cast<int>Size,
76 // random_seed);
77 // for (int i = 0; i < max_nr_samples; ++i) {
78 // int j = indices[i];
79 // // i <= j forever;
80 // indices[i] = indices[j];
81 // }
82 indices.resize(max_nr_samples);
83 } else {
84 if (size > min_nr_samples) {
85 half = size >> 1;
86 while (half > min_nr_samples) {
87 half = half >> 1;
88 }
89 size = half << 1;
90 IRandomizedShuffle1(indices.data(), static_cast<int>(indices.size()),
92 indices.resize(size);
93 }
94 }
95 return static_cast<int>(indices.size());
96}
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 第 218 行定义.

218{ indices.push_back(i); }

◆ Reserve()

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

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

216{ indices.reserve(size); }

◆ Size()

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

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

220 {
221 return static_cast<unsigned int>(indices.size());
222 }

类成员变量说明

◆ indices

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

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

◆ random_seed

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

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


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