详细描述
template<class T>
class shogun::CArray3< T >
Template class Array3 implements a dense three dimensional array.
Note that depending on compile options everything will be inlined, such that this is as high performance 3d-array implementation without error checking.
在文件Array3.h第28行定义。
所有成员的列表。
公有成员 |
| CArray3 () |
| CArray3 (int32_t dim1, int32_t dim2, int32_t dim3) |
| CArray3 (T *p_array, int32_t dim1, int32_t dim2, int32_t dim3, bool p_free_array=true, bool p_copy_array=false) |
| CArray3 (const T *p_array, int32_t dim1, int32_t dim2, int32_t dim3) |
virtual | ~CArray3 () |
void | set_name (const char *p_name) |
void | get_array_size (int32_t &dim1, int32_t &dim2, int32_t &dim3) |
int32_t | get_dim1 () |
int32_t | get_dim2 () |
int32_t | get_dim3 () |
void | zero () |
void | set_const (T const_elem) |
T * | get_array () |
void | set_array (T *p_array, int32_t dim1, int32_t dim2, int32_t dim3, bool p_free_array, bool copy_array=false) |
bool | resize_array (int32_t dim1, int32_t dim2, int32_t dim3) |
T | get_element (int32_t idx1, int32_t idx2, int32_t idx3) const |
bool | set_element (T p_element, int32_t idx1, int32_t idx2, int32_t idx3) |
const T & | element (int32_t idx1, int32_t idx2, int32_t idx3) const |
T & | element (int32_t idx1, int32_t idx2, int32_t idx3) |
T & | element (T *p_array, int32_t idx1, int32_t idx2, int32_t idx3) |
T & | element (T *p_array, int32_t idx1, int32_t idx2, int32_t idx3, int32_t p_dim1_size, int32_t p_dim2_size) |
CArray3< T > & | operator= (const CArray3< T > &orig) |
void | display_size () const |
void | display_array () const |
virtual const char * | get_name () |
保护属性 |
int32_t | dim1_size |
int32_t | dim2_size |
int32_t | dim3_size |
构造及析构函数文档
CArray3 |
( |
int32_t |
dim1, |
|
|
int32_t |
dim2, |
|
|
int32_t |
dim3 |
|
) |
| |
constructor
- 参数:
-
dim1 | dimension 1 |
dim2 | dimension 2 |
dim3 | dimension 3 |
在文件Array3.h第43行定义。
CArray3 |
( |
T * |
p_array, |
|
|
int32_t |
dim1, |
|
|
int32_t |
dim2, |
|
|
int32_t |
dim3, |
|
|
bool |
p_free_array = true , |
|
|
bool |
p_copy_array = false |
|
) |
| |
constructor
- 参数:
-
p_array | another array |
dim1 | dimension 1 |
dim2 | dimension 2 |
dim3 | dimension 3 |
p_free_array | if array must be freed |
p_copy_array | if array must be copied |
在文件Array3.h第57行定义。
CArray3 |
( |
const T * |
p_array, |
|
|
int32_t |
dim1, |
|
|
int32_t |
dim2, |
|
|
int32_t |
dim3 |
|
) |
| |
constructor
- 参数:
-
p_array | another array |
dim1 | dimension 1 |
dim2 | dimension 2 |
dim3 | dimension 3 |
在文件Array3.h第72行定义。
成员函数文档
void display_array |
( |
) |
const |
void display_size |
( |
) |
const |
const T& element |
( |
int32_t |
idx1, |
|
|
int32_t |
idx2, |
|
|
int32_t |
idx3 |
|
) |
| const |
get array element at index
- 参数:
-
idx1 | index 1 |
idx2 | index 2 |
idx3 | index 3 |
- 返回:
- array element at index
在文件Array3.h第209行定义。
T& element |
( |
T * |
p_array, |
|
|
int32_t |
idx1, |
|
|
int32_t |
idx2, |
|
|
int32_t |
idx3, |
|
|
int32_t |
p_dim1_size, |
|
|
int32_t |
p_dim2_size |
|
) |
| |
get element of given array at given index
- 参数:
-
p_array | another array |
idx1 | index 1 |
idx2 | index 2 |
idx3 | index 3 |
p_dim1_size | size of dimension 1 |
p_dim2_size | size of dimension 2 |
- 返回:
- element of given array at given index
在文件Array3.h第259行定义。
T& element |
( |
int32_t |
idx1, |
|
|
int32_t |
idx2, |
|
|
int32_t |
idx3 |
|
) |
| |
get array element at index
- 参数:
-
idx1 | index 1 |
idx2 | index 2 |
idx3 | index 3 |
- 返回:
- array element at index
在文件Array3.h第224行定义。
T& element |
( |
T * |
p_array, |
|
|
int32_t |
idx1, |
|
|
int32_t |
idx2, |
|
|
int32_t |
idx3 |
|
) |
| |
get element of given array at given index
- 参数:
-
p_array | another array |
idx1 | index 1 |
idx2 | index 2 |
idx3 | index 3 |
- 返回:
- array element at index
在文件Array3.h第240行定义。
get the array call get_array just before messing with it DO NOT call any [],resize/delete functions after get_array(), the pointer may become invalid !
- 返回:
- the array
重载CArray< T >。
在文件Array3.h第137行定义。
void get_array_size |
( |
int32_t & |
dim1, |
|
|
int32_t & |
dim2, |
|
|
int32_t & |
dim3 |
|
) |
| |
return total array size (including granularity buffer)
- 参数:
-
dim1 | dimension 1 will be stored here |
dim2 | dimension 2 will be stored here |
dim3 | dimension 3 will be stored here |
在文件Array3.h第95行定义。
T get_element |
( |
int32_t |
idx1, |
|
|
int32_t |
idx2, |
|
|
int32_t |
idx3 |
|
) |
| const |
get array element at index
- 参数:
-
idx1 | index 1 |
idx2 | index 2 |
idx3 | index 3 |
- 返回:
- array element at index
在文件Array3.h第178行定义。
virtual const char* get_name |
( |
) |
[virtual] |
operator overload for array assignment
- 参数:
-
- 返回:
- new array
在文件Array3.h第275行定义。
bool resize_array |
( |
int32_t |
dim1, |
|
|
int32_t |
dim2, |
|
|
int32_t |
dim3 |
|
) |
| |
resize array
- 参数:
-
dim1 | new dimension 1 |
dim2 | new dimension 2 |
dim3 | new dimension 3 |
- 返回:
- if resizing was successful
在文件Array3.h第163行定义。
void set_array |
( |
T * |
p_array, |
|
|
int32_t |
dim1, |
|
|
int32_t |
dim2, |
|
|
int32_t |
dim3, |
|
|
bool |
p_free_array, |
|
|
bool |
copy_array = false |
|
) |
| |
set the array pointer and free previously allocated memory
- 参数:
-
p_array | another array |
dim1 | dimension 1 |
dim2 | dimensino 2 |
dim3 | dimensino 3 |
p_free_array | if array must be freed |
copy_array | if array must be copied |
在文件Array3.h第148行定义。
void set_const |
( |
T |
const_elem ) |
|
bool set_element |
( |
T |
p_element, |
|
|
int32_t |
idx1, |
|
|
int32_t |
idx2, |
|
|
int32_t |
idx3 |
|
) |
| |
set array element at index 'index'
- 参数:
-
p_element | array element |
idx1 | index 1 |
idx2 | index 2 |
idx3 | index 3 |
- 返回:
- if setting was successful
在文件Array3.h第194行定义。
void set_name |
( |
const char * |
p_name ) |
|
成员数据文档
该类的文档由以下文件生成: