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

2维vector 更多...

#include <dl_vector2.h>

Public 类型

using Size = Array<Index, 2>
 
using PointU = Size
 

Public 成员函数

 Vector2 ()
 空构造
 
 Vector2 (const Size &size)
 以指定大小构造
 
 Vector2 (const Size &size, const T *p)
 以指定大小构造,并传入指针赋值初始化
 
 Vector2 (const Vector2 &b)
 复制构造 todo
 
void Resize (const Size &size)
 调整为指定大小
 
Vector2operator= (const Vector2 &b)
 
std::span< Toperator[] (Index j)
 返回第j行
 
const std::span< Toperator[] (Index j) const
 返回第j行
 
const TGet (Index j, Index i) const
 返回第j行 第i个
 
const TGet (const PointU &xy) const
 
TGetRef (Index j, Index i)
 
TGetRef (const PointU &xy)
 
TGetPointer (Index j, Index i)
 返回元素地址,失败返回空
 
TGetPointer (const PointU &xy)
 
TGetPointerOffset (const PointU &xy, const Point &offset)
 
void Set (Index j, Index i, const T &v)
 
void Fill (const T &v)
 填充值
 
void Clear ()
 
void CopyCross (const Vector2 &b)
 从b拷贝重复的面积
 
void PushBack (std::vector< T > &vec)
 插入行
 
bool IsEmpty () const
 
const std::byte * GetBuffer () const
 
TGetData ()
 
const TGetData () const
 
Index GetWidth () const
 
Index GetHeight () const
 
Size GetSize () const
 
Index GetSizeMul () const
 
Index GetSizeByte ()
 
auto begin ()
 
auto end ()
 
void reserve (size_t i)
 
void emplace_back (T &&t)
 
size_t size () const
 

静态 Public 成员函数

static Vector2 RotateRightAngle1 (const Vector2 &v)
 

详细描述

template<typename T, typename Index = unsigned>
class dl::Vector2< T, Index >

2维vector

在文件 dl_vector2.h30 行定义.

成员类型定义说明

◆ PointU

template<typename T, typename Index = unsigned>
using dl::Vector2< T, Index >::PointU = Size

在文件 dl_vector2.h34 行定义.

◆ Size

template<typename T, typename Index = unsigned>
using dl::Vector2< T, Index >::Size = Array<Index, 2>

在文件 dl_vector2.h33 行定义.

构造及析构函数说明

◆ Vector2() [1/4]

template<typename T, typename Index = unsigned>
dl::Vector2< T, Index >::Vector2 ( )
inline

空构造

在文件 dl_vector2.h38 行定义.

◆ Vector2() [2/4]

template<typename T, typename Index = unsigned>
dl::Vector2< T, Index >::Vector2 ( const Size & size)
inline

以指定大小构造

在文件 dl_vector2.h45 行定义.

◆ Vector2() [3/4]

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

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

在文件 dl_vector2.h53 行定义.

◆ Vector2() [4/4]

template<typename T, typename Index = unsigned>
dl::Vector2< T, Index >::Vector2 ( const Vector2< T, Index > & b)
inline

复制构造 todo

在文件 dl_vector2.h65 行定义.

成员函数说明

◆ begin()

template<typename T, typename Index = unsigned>
auto dl::Vector2< T, Index >::begin ( )
inline

在文件 dl_vector2.h255 行定义.

◆ Clear()

template<typename T, typename Index = unsigned>
void dl::Vector2< T, Index >::Clear ( )
inline

在文件 dl_vector2.h180 行定义.

◆ CopyCross()

template<typename T, typename Index = unsigned>
void dl::Vector2< T, Index >::CopyCross ( const Vector2< T, Index > & b)
inline

从b拷贝重复的面积

注解
其余地方不变

在文件 dl_vector2.h190 行定义.

◆ emplace_back()

template<typename T, typename Index = unsigned>
void dl::Vector2< T, Index >::emplace_back ( T && t)
inline

在文件 dl_vector2.h267 行定义.

◆ end()

template<typename T, typename Index = unsigned>
auto dl::Vector2< T, Index >::end ( )
inline

在文件 dl_vector2.h259 行定义.

◆ Fill()

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

填充值

在文件 dl_vector2.h175 行定义.

◆ Get() [1/2]

template<typename T, typename Index = unsigned>
const T & dl::Vector2< T, Index >::Get ( const PointU & xy) const
inline

在文件 dl_vector2.h129 行定义.

◆ Get() [2/2]

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

返回第j行 第i个

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

在文件 dl_vector2.h123 行定义.

◆ GetBuffer()

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

在文件 dl_vector2.h214 行定义.

◆ GetData() [1/2]

template<typename T, typename Index = unsigned>
T * dl::Vector2< T, Index >::GetData ( )
inline

在文件 dl_vector2.h219 行定义.

◆ GetData() [2/2]

template<typename T, typename Index = unsigned>
const T * dl::Vector2< T, Index >::GetData ( ) const
inline

在文件 dl_vector2.h224 行定义.

◆ GetHeight()

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

在文件 dl_vector2.h234 行定义.

◆ GetPointer() [1/2]

template<typename T, typename Index = unsigned>
T * dl::Vector2< T, Index >::GetPointer ( const PointU & xy)
inline

在文件 dl_vector2.h153 行定义.

◆ GetPointer() [2/2]

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

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

在文件 dl_vector2.h146 行定义.

◆ GetPointerOffset()

template<typename T, typename Index = unsigned>
T * dl::Vector2< T, Index >::GetPointerOffset ( const PointU & xy,
const Point & offset )
inline

在文件 dl_vector2.h157 行定义.

◆ GetRef() [1/2]

template<typename T, typename Index = unsigned>
T & dl::Vector2< T, Index >::GetRef ( const PointU & xy)
inline

在文件 dl_vector2.h139 行定义.

◆ GetRef() [2/2]

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

在文件 dl_vector2.h133 行定义.

◆ GetSize()

template<typename T, typename Index = unsigned>
Size dl::Vector2< T, Index >::GetSize ( ) const
inline

在文件 dl_vector2.h239 行定义.

◆ GetSizeByte()

template<typename T, typename Index = unsigned>
Index dl::Vector2< T, Index >::GetSizeByte ( )
inline

在文件 dl_vector2.h250 行定义.

◆ GetSizeMul()

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

在文件 dl_vector2.h245 行定义.

◆ GetWidth()

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

在文件 dl_vector2.h229 行定义.

◆ IsEmpty()

template<typename T, typename Index = unsigned>
bool dl::Vector2< T, Index >::IsEmpty ( ) const
inline

在文件 dl_vector2.h212 行定义.

◆ operator=()

template<typename T, typename Index = unsigned>
Vector2 & dl::Vector2< T, Index >::operator= ( const Vector2< T, Index > & b)
inline

在文件 dl_vector2.h84 行定义.

◆ operator[]() [1/2]

template<typename T, typename Index = unsigned>
std::span< T > dl::Vector2< T, Index >::operator[] ( Index j)
inline

返回第j行

在文件 dl_vector2.h98 行定义.

◆ operator[]() [2/2]

template<typename T, typename Index = unsigned>
const std::span< T > dl::Vector2< T, Index >::operator[] ( Index j) const
inline

返回第j行

在文件 dl_vector2.h106 行定义.

◆ PushBack()

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

插入行

注解
会使 y+1

在文件 dl_vector2.h204 行定义.

◆ reserve()

template<typename T, typename Index = unsigned>
void dl::Vector2< T, Index >::reserve ( size_t i)
inline

在文件 dl_vector2.h263 行定义.

◆ Resize()

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

调整为指定大小

注解
保留原有值

在文件 dl_vector2.h74 行定义.

◆ RotateRightAngle1()

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

在文件 dl_vector2.h276 行定义.

◆ Set()

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

在文件 dl_vector2.h165 行定义.

◆ size()

template<typename T, typename Index = unsigned>
size_t dl::Vector2< T, Index >::size ( ) const
inline

在文件 dl_vector2.h271 行定义.


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