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

#include <secure_matrix.h>

apollo::perception::algorithm::SecureMat< T > 的协作图:

Public 成员函数

 SecureMat ()
 
size_t height ()
 
size_t width ()
 
void Reserve (const size_t reserve_height, const size_t reserve_width)
 
void Resize (const size_t resize_height, const size_t resize_width)
 
std::string ToString () const
 
const T & operator() (const size_t row, const size_t col) const
 
T & operator() (const size_t row, const size_t col)
 

详细描述

template<typename T>
class apollo::perception::algorithm::SecureMat< T >

在文件 secure_matrix.h29 行定义.

构造及析构函数说明

◆ SecureMat()

template<typename T >
apollo::perception::algorithm::SecureMat< T >::SecureMat ( )
inline

在文件 secure_matrix.h34 行定义.

34{ Reserve(max_height_, max_width_); }
void Reserve(const size_t reserve_height, const size_t reserve_width)

成员函数说明

◆ height()

template<typename T >
size_t apollo::perception::algorithm::SecureMat< T >::height ( )
inline

在文件 secure_matrix.h36 行定义.

36{ return height_; }

◆ operator()() [1/2]

template<typename T >
T & apollo::perception::algorithm::SecureMat< T >::operator() ( const size_t  row,
const size_t  col 
)
inline

在文件 secure_matrix.h79 行定义.

79 {
80 return mat_(row, col);
81 }

◆ operator()() [2/2]

template<typename T >
const T & apollo::perception::algorithm::SecureMat< T >::operator() ( const size_t  row,
const size_t  col 
) const
inline

在文件 secure_matrix.h75 行定义.

75 {
76 return mat_(row, col);
77 }

◆ Reserve()

template<typename T >
void apollo::perception::algorithm::SecureMat< T >::Reserve ( const size_t  reserve_height,
const size_t  reserve_width 
)
inline

在文件 secure_matrix.h43 行定义.

43 {
44 max_height_ = std::max(reserve_height, max_height_);
45 max_width_ = std::max(reserve_width, max_width_);
46 mat_.resize(max_height_, max_width_);
47 }

◆ Resize()

template<typename T >
void apollo::perception::algorithm::SecureMat< T >::Resize ( const size_t  resize_height,
const size_t  resize_width 
)
inline

在文件 secure_matrix.h53 行定义.

53 {
54 height_ = resize_height;
55 width_ = resize_width;
56 if (resize_height <= max_height_ && resize_width <= max_width_) {
57 return;
58 }
59 max_height_ = std::max(resize_height, max_height_);
60 max_width_ = std::max(resize_width, max_width_);
61 mat_.resize(max_height_, max_width_);
62 }

◆ ToString()

template<typename T >
std::string apollo::perception::algorithm::SecureMat< T >::ToString ( ) const
inline

在文件 secure_matrix.h64 行定义.

64 {
65 std::ostringstream oss;
66 for (size_t row = 0; row < height_; ++row) {
67 for (size_t col = 0; col < width_; ++col) {
68 oss << mat_(row, col) << "\t";
69 }
70 oss << "\n";
71 }
72 return oss.str();
73 }

◆ width()

template<typename T >
size_t apollo::perception::algorithm::SecureMat< T >::width ( )
inline

在文件 secure_matrix.h37 行定义.

37{ return width_; }

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