Apollo 11.0
自动驾驶开放平台
apollo::perception::algorithm::PtCluster< T, d > 模板类 参考

#include <i_struct_s.h>

apollo::perception::algorithm::PtCluster< T, d > 的协作图:

Public 类型

typedef T * iterator
 
typedef const T * const_iterator
 
typedef T & reference
 
typedef const T & const_reference
 

Public 成员函数

unsigned int ClustersizeInByte () const
 
unsigned int NrPoints () const
 
bool Initialized () const
 
const T * ConstData () const
 
T * Data ()
 
void CleanUp ()
 
 PtCluster ()
 
 PtCluster (unsigned int n)
 
 PtCluster (const T *data, unsigned int n)
 
 PtCluster (const PtCluster< T, d > &c)
 
PtCluster & operator= (const PtCluster< T, d > &c)
 
virtual ~PtCluster ()
 
T * operator[] (unsigned int i)
 
const T * operator[] (unsigned int i) const
 
reference operator() (unsigned int i, unsigned int j)
 
const_reference operator() (unsigned int i, unsigned int j) const
 
iterator Begin ()
 
iterator End ()
 
const_iterator Begin () const
 
const_iterator End () const
 

静态 Public 成员函数

static unsigned int NrPointElement ()
 
static unsigned int PointsizeInByte ()
 

Protected 属性

T * data_
 
unsigned int nr_points_
 

详细描述

template<typename T, unsigned int d>
class apollo::perception::algorithm::PtCluster< T, d >

在文件 i_struct_s.h 第 37 行定义.

成员类型定义说明

◆ const_iterator

template<typename T , unsigned int d>
typedef const T* apollo::perception::algorithm::PtCluster< T, d >::const_iterator

在文件 i_struct_s.h 第 40 行定义.

◆ const_reference

template<typename T , unsigned int d>
typedef const T& apollo::perception::algorithm::PtCluster< T, d >::const_reference

在文件 i_struct_s.h 第 42 行定义.

◆ iterator

template<typename T , unsigned int d>
typedef T* apollo::perception::algorithm::PtCluster< T, d >::iterator

在文件 i_struct_s.h 第 39 行定义.

◆ reference

template<typename T , unsigned int d>
typedef T& apollo::perception::algorithm::PtCluster< T, d >::reference

在文件 i_struct_s.h 第 41 行定义.

构造及析构函数说明

◆ PtCluster() [1/4]

template<typename T , unsigned int d>
apollo::perception::algorithm::PtCluster< T, d >::PtCluster ( )

◆ PtCluster() [2/4]

template<typename T , unsigned int d>
apollo::perception::algorithm::PtCluster< T, d >::PtCluster ( unsigned int  n)
explicit

在文件 i_struct_s.h 第 129 行定义.

129 : data_(nullptr), nr_points_(n) {
130 if (n != 0) {
131 data_ = IAllocAligned<T>(n * d, 4);
132 if (!data_ || !IVerifyAlignment(data_, 4)) {
133 nr_points_ = 0;
135 }
136 }
137}
int IVerifyAlignment(const T *mem, int alignment_power=4)
Definition i_alloc.h:150

◆ PtCluster() [3/4]

template<typename T , unsigned int d>
apollo::perception::algorithm::PtCluster< T, d >::PtCluster ( const T *  data,
unsigned int  n 
)

在文件 i_struct_s.h 第 140 行定义.

141 : data_(nullptr), nr_points_(n) {
142 if (data && n) {
143 data_ = IAllocAligned<T>(n * d, 4);
144 if (data_ && IVerifyAlignment(data_, 4)) {
145 ICopy(data, data_, n * d);
146 } else {
147 nr_points_ = 0;
149 }
150 }
151}
void ICopy(const T *src, T *dst, int n)
Definition i_blas.h:27

◆ PtCluster() [4/4]

template<typename T , unsigned int d>
apollo::perception::algorithm::PtCluster< T, d >::PtCluster ( const PtCluster< T, d > &  c)
inline

在文件 i_struct_s.h 第 65 行定义.

65 : data_(nullptr), nr_points_(0) {
66 if (c.NrPoints()) {
67 nr_points_ = c.NrPoints();
68 data_ = IAllocAligned<T>(nr_points_ * d, 4);
69 assert(data_ != nullptr && IVerifyAlignment(data_, 4));
70 ICopy(c.ConstData(), data_, nr_points_ * d);
71 }
72 }

◆ ~PtCluster()

template<typename T , unsigned int d>
virtual apollo::perception::algorithm::PtCluster< T, d >::~PtCluster ( )
inlinevirtual

在文件 i_struct_s.h 第 87 行定义.

成员函数说明

◆ Begin() [1/2]

template<typename T , unsigned int d>
iterator apollo::perception::algorithm::PtCluster< T, d >::Begin ( )
inline

在文件 i_struct_s.h 第 111 行定义.

111{ return data_; }

◆ Begin() [2/2]

template<typename T , unsigned int d>
const_iterator apollo::perception::algorithm::PtCluster< T, d >::Begin ( ) const
inline

在文件 i_struct_s.h 第 115 行定义.

115{ return data_; }

◆ CleanUp()

template<typename T , unsigned int d>
void apollo::perception::algorithm::PtCluster< T, d >::CleanUp ( )

在文件 i_struct_s.h 第 154 行定义.

154 {
156 nr_points_ = 0;
157}

◆ ClustersizeInByte()

template<typename T , unsigned int d>
unsigned int apollo::perception::algorithm::PtCluster< T, d >::ClustersizeInByte ( ) const
inline

在文件 i_struct_s.h 第 48 行定义.

48 {
49 return (d * sizeof(T) * nr_points_);
50 }

◆ ConstData()

template<typename T , unsigned int d>
const T * apollo::perception::algorithm::PtCluster< T, d >::ConstData ( ) const
inline

在文件 i_struct_s.h 第 56 行定义.

56{ return (data_); }

◆ Data()

template<typename T , unsigned int d>
T * apollo::perception::algorithm::PtCluster< T, d >::Data ( )
inline

在文件 i_struct_s.h 第 58 行定义.

58{ return (data_); }

◆ End() [1/2]

template<typename T , unsigned int d>
iterator apollo::perception::algorithm::PtCluster< T, d >::End ( )
inline

在文件 i_struct_s.h 第 113 行定义.

113{ return data_ + (nr_points_ * d); }

◆ End() [2/2]

template<typename T , unsigned int d>
const_iterator apollo::perception::algorithm::PtCluster< T, d >::End ( ) const
inline

在文件 i_struct_s.h 第 117 行定义.

117{ return data_ + (nr_points_ * d); }

◆ Initialized()

template<typename T , unsigned int d>
bool apollo::perception::algorithm::PtCluster< T, d >::Initialized ( ) const
inline

在文件 i_struct_s.h 第 54 行定义.

54{ return (nr_points_ > 0); }

◆ NrPointElement()

template<typename T , unsigned int d>
static unsigned int apollo::perception::algorithm::PtCluster< T, d >::NrPointElement ( )
inlinestatic

在文件 i_struct_s.h 第 44 行定义.

44{ return (d); }

◆ NrPoints()

template<typename T , unsigned int d>
unsigned int apollo::perception::algorithm::PtCluster< T, d >::NrPoints ( ) const
inline

在文件 i_struct_s.h 第 52 行定义.

52{ return (nr_points_); }

◆ operator()() [1/2]

template<typename T , unsigned int d>
reference apollo::perception::algorithm::PtCluster< T, d >::operator() ( unsigned int  i,
unsigned int  j 
)
inline

在文件 i_struct_s.h 第 101 行定义.

101 {
102 assert(i < nr_points_ && j < d);
103 return data_[i * d + j];
104 }

◆ operator()() [2/2]

template<typename T , unsigned int d>
const_reference apollo::perception::algorithm::PtCluster< T, d >::operator() ( unsigned int  i,
unsigned int  j 
) const
inline

在文件 i_struct_s.h 第 106 行定义.

106 {
107 assert(i < nr_points_ && j < d);
108 return data_[i * d + j];
109 }

◆ operator=()

template<typename T , unsigned int d>
PtCluster & apollo::perception::algorithm::PtCluster< T, d >::operator= ( const PtCluster< T, d > &  c)
inline

在文件 i_struct_s.h 第 74 行定义.

74 {
75 if (this != &c) {
76 if (this->nr_points_ != c.NrPoints()) {
78 data_ = IAllocAligned<T>(this->nr_points_ * d, 4);
79 assert(data_ != nullptr && IVerifyAlignment(data_, 4));
80 this->nr_points_ = c.NrPoints();
81 }
82 ICopy(c.ConstData(), data_, this->nr_points_ * d);
83 }
84 return (*this);
85 }

◆ operator[]() [1/2]

template<typename T , unsigned int d>
T * apollo::perception::algorithm::PtCluster< T, d >::operator[] ( unsigned int  i)
inline

在文件 i_struct_s.h 第 89 行定义.

89 {
90 assert(i < nr_points_);
91 assert(data_ != nullptr);
92 return (data_ + i * d);
93 }

◆ operator[]() [2/2]

template<typename T , unsigned int d>
const T * apollo::perception::algorithm::PtCluster< T, d >::operator[] ( unsigned int  i) const
inline

在文件 i_struct_s.h 第 95 行定义.

95 {
96 assert(i < nr_points_);
97 assert(data_ != nullptr);
98 return (data_ + i * d);
99 }

◆ PointsizeInByte()

template<typename T , unsigned int d>
static unsigned int apollo::perception::algorithm::PtCluster< T, d >::PointsizeInByte ( )
inlinestatic

在文件 i_struct_s.h 第 46 行定义.

46{ return (d * sizeof(T)); }

类成员变量说明

◆ data_

template<typename T , unsigned int d>
T* apollo::perception::algorithm::PtCluster< T, d >::data_
protected

在文件 i_struct_s.h 第 121 行定义.

◆ nr_points_

template<typename T , unsigned int d>
unsigned int apollo::perception::algorithm::PtCluster< T, d >::nr_points_
protected

在文件 i_struct_s.h 第 122 行定义.


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