dl
dl::Vector2< T > 模板类 参考

#include <dl_vector2.h>

Public 成员函数

 Vector2 ()
 空构造
 
 Vector2 (const Size &size)
 以指定大小构造
 
 Vector2 (const Size &size, const T *p)
 以指定大小构造,并传入指针赋值初始化
 
 Vector2 (const Vector2 &b)
 复制构造 todo
 
void Resize (const Size &size)
 调整为指定大小
 
std::span< T > operator[] (std::size_t j)
 返回第j行
 
const std::span< T > operator[] (std::size_t j) const
 返回第j行
 
const T & Get (size_t j, size_t i) const
 返回第j行 第i个
 
T & GetRef (size_t j, size_t i)
 
T * GetPointer (size_t j, size_t i)
 返回元素地址,失败返回空
 
T * GetPointer (const SizeT &xy)
 
void Set (size_t j, size_t i, const T &v)
 
void Fill (const T &v)
 填充值
 
void PushBack (std::vector< T > &vec)
 插入行
 
bool IsEmpty () const
 
const std::byte * GetBuffer () const
 
T * GetData ()
 
const T * GetData () const
 
unsigned GetWidth () const
 
unsigned GetHeight () const
 
Size GetSize () const
 
unsigned GetSizeMul () const
 
size_t GetSizeByte ()
 
auto begin ()
 
auto end ()
 

静态 Public 成员函数

static Vector2 RotateRightAngle1 (const Vector2 &v)
 

详细描述

template<typename T>
class dl::Vector2< T >

在文件 dl_vector2.h 第 29 行定义.

构造及析构函数说明

◆ Vector2() [1/4]

template<typename T>
dl::Vector2< T >::Vector2 ( )
inline

空构造

在文件 dl_vector2.h 第 35 行定义.

◆ Vector2() [2/4]

template<typename T>
dl::Vector2< T >::Vector2 ( const Size & size)
inline

以指定大小构造

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

◆ Vector2() [3/4]

template<typename T>
dl::Vector2< T >::Vector2 ( const Size & size,
const T * p )
inline

以指定大小构造,并传入指针赋值初始化

在文件 dl_vector2.h 第 50 行定义.

◆ Vector2() [4/4]

template<typename T>
dl::Vector2< T >::Vector2 ( const Vector2< T > & b)
inline

复制构造 todo

在文件 dl_vector2.h 第 62 行定义.

成员函数说明

◆ begin()

template<typename T>
auto dl::Vector2< T >::begin ( )
inline

在文件 dl_vector2.h 第 204 行定义.

◆ end()

template<typename T>
auto dl::Vector2< T >::end ( )
inline

在文件 dl_vector2.h 第 208 行定义.

◆ Fill()

template<typename T>
void dl::Vector2< T >::Fill ( const T & v)
inline

填充值

在文件 dl_vector2.h 第 143 行定义.

◆ Get()

template<typename T>
const T & dl::Vector2< T >::Get ( size_t j,
size_t i ) const
inline

返回第j行 第i个

注解
与传统[]访问一致,先访问行

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

◆ GetBuffer()

template<typename T>
const std::byte * dl::Vector2< T >::GetBuffer ( ) const
inline

在文件 dl_vector2.h 第 163 行定义.

◆ GetData() [1/2]

template<typename T>
T * dl::Vector2< T >::GetData ( )
inline

在文件 dl_vector2.h 第 168 行定义.

◆ GetData() [2/2]

template<typename T>
const T * dl::Vector2< T >::GetData ( ) const
inline

在文件 dl_vector2.h 第 173 行定义.

◆ GetHeight()

template<typename T>
unsigned dl::Vector2< T >::GetHeight ( ) const
inline

在文件 dl_vector2.h 第 183 行定义.

◆ GetPointer() [1/2]

template<typename T>
T * dl::Vector2< T >::GetPointer ( const SizeT & xy)
inline

在文件 dl_vector2.h 第 128 行定义.

◆ GetPointer() [2/2]

template<typename T>
T * dl::Vector2< T >::GetPointer ( size_t j,
size_t i )
inline

返回元素地址,失败返回空

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

◆ GetRef()

template<typename T>
T & dl::Vector2< T >::GetRef ( size_t j,
size_t i )
inline

在文件 dl_vector2.h 第 112 行定义.

◆ GetSize()

template<typename T>
Size dl::Vector2< T >::GetSize ( ) const
inline

在文件 dl_vector2.h 第 188 行定义.

◆ GetSizeByte()

template<typename T>
size_t dl::Vector2< T >::GetSizeByte ( )
inline

在文件 dl_vector2.h 第 199 行定义.

◆ GetSizeMul()

template<typename T>
unsigned dl::Vector2< T >::GetSizeMul ( ) const
inline

在文件 dl_vector2.h 第 194 行定义.

◆ GetWidth()

template<typename T>
unsigned dl::Vector2< T >::GetWidth ( ) const
inline

在文件 dl_vector2.h 第 178 行定义.

◆ IsEmpty()

template<typename T>
bool dl::Vector2< T >::IsEmpty ( ) const
inline

在文件 dl_vector2.h 第 161 行定义.

◆ operator[]() [1/2]

template<typename T>
std::span< T > dl::Vector2< T >::operator[] ( std::size_t j)
inline

返回第j行

在文件 dl_vector2.h 第 81 行定义.

◆ operator[]() [2/2]

template<typename T>
const std::span< T > dl::Vector2< T >::operator[] ( std::size_t j) const
inline

返回第j行

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

◆ PushBack()

template<typename T>
void dl::Vector2< T >::PushBack ( std::vector< T > & vec)
inline

插入行

注解
会使 y+1

在文件 dl_vector2.h 第 153 行定义.

◆ Resize()

template<typename T>
void dl::Vector2< T >::Resize ( const Size & size)
inline

调整为指定大小

注解
保留原有值 todo

在文件 dl_vector2.h 第 72 行定义.

◆ RotateRightAngle1()

template<typename T>
static Vector2 dl::Vector2< T >::RotateRightAngle1 ( const Vector2< T > & v)
inlinestatic

在文件 dl_vector2.h 第 213 行定义.

◆ Set()

template<typename T>
void dl::Vector2< T >::Set ( size_t j,
size_t i,
const T & v )
inline

在文件 dl_vector2.h 第 133 行定义.


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