VEC
This class is used to store 1D arrays. More…
#include "VEC.h"
Public Functions
Name | |
---|---|
VEC() Constructs an empty object. |
|
VEC(const iExt length_in) Constructs an object of given size. |
|
VEC(const iReg length_in) Constructs an object of given size. |
|
VEC(const iExt length_in, const TYPE & init_value) Constructs and initialize an object of given size. |
|
VEC(const iReg length_in, const TYPE & init_value) Constructs and initialize an object of given size. |
|
~VEC() Deletes the object. |
|
VEC(const VEC & x) Copy constructor. |
|
iExt | size() const Returns the length of the object. |
TYPE * | data() Returns a pointer to the data of the object. |
const TYPE * | data() const Returns a pointer to the data of the object. |
TYPE * | begin() const Returns a pointer to the beginning of the data stored. |
TYPE * | end() const Returns a pointer to the beginning of the data stored. |
void | operator=(const VEC< TYPE > & x) Assignment operator. |
TYPE & | operator[](const iReg index_reg) const Array index operator []. |
TYPE & | operator[](const iExt index) const Array index operator []. |
void | swap(VEC< TYPE > & V) Swaps two vector instances. |
void | resize(const iExt new_length) Resizes current storage preserving already stored elements. |
void | resize(const iReg new_length_r) Resizes current storage preserving already stored elements. |
void | assign(const iExt new_length, const TYPE & value) Assign a given value to the vector’s element. |
void | overlap(const iExt new_length, TYPE *const pt_data_in) Overlaps current VEC instance with the data pointed by pt_data_in. The length of the array is assigned by the user and is responsibility of the user to ensure consistency. |
void | overlap(const iReg new_length_r, TYPE *const pt_data_in) Overlaps current VEC instance with the data pointed by pt_data_in. The length of the array is assigned by the user and is responsibility of the user to ensure consistency. |
void | assign_null() Assign null pointer. |
Detailed Description
template <typename TYPE >
class VEC;
This class is used to store 1D arrays.
class VEC.
Public Functions Documentation
function VEC
inline VEC()
Constructs an empty object.
function VEC
VEC(
const iExt length_in
)
Constructs an object of given size.
function VEC
VEC(
const iReg length_in
)
Constructs an object of given size.
function VEC
VEC(
const iExt length_in,
const TYPE & init_value
)
Constructs and initialize an object of given size.
function VEC
VEC(
const iReg length_in,
const TYPE & init_value
)
Constructs and initialize an object of given size.
function ~VEC
~VEC()
Deletes the object.
function VEC
VEC(
const VEC & x
)
Copy constructor.
function size
inline iExt size() const
Returns the length of the object.
function data
inline TYPE * data()
Returns a pointer to the data of the object.
function data
inline const TYPE * data() const
Returns a pointer to the data of the object.
function begin
inline TYPE * begin() const
Returns a pointer to the beginning of the data stored.
function end
inline TYPE * end() const
Returns a pointer to the beginning of the data stored.
function operator=
void operator=(
const VEC< TYPE > & x
)
Assignment operator.
function operator[]
TYPE & operator[](
const iReg index_reg
) const
Array index operator [].
function operator[]
TYPE & operator[](
const iExt index
) const
Array index operator [].
function swap
void swap(
VEC< TYPE > & V
)
Swaps two vector instances.
function resize
void resize(
const iExt new_length
)
Resizes current storage preserving already stored elements.
function resize
void resize(
const iReg new_length_r
)
Resizes current storage preserving already stored elements.
function assign
void assign(
const iExt new_length,
const TYPE & value
)
Assign a given value to the vector’s element.
function overlap
void overlap(
const iExt new_length,
TYPE *const pt_data_in
)
Overlaps current VEC instance with the data pointed by pt_data_in. The length of the array is assigned by the user and is responsibility of the user to ensure consistency.
function overlap
void overlap(
const iReg new_length_r,
TYPE *const pt_data_in
)
Overlaps current VEC instance with the data pointed by pt_data_in. The length of the array is assigned by the user and is responsibility of the user to ensure consistency.
function assign_null
inline void assign_null()
Assign null pointer.
Updated on 12 February 2021 at 11:59:50 CET