Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
Cube< eT > Class Template Reference

Dense cube class. More...

#include <Cube_bones.hpp>

Inheritance diagram for Cube< eT >:
Inheritance graph
[legend]

Classes

class  fixed
 

Public Types

typedef const eT * const_iterator
 
typedef const eT * const_slice_iterator
 
typedef eT elem_type
 the type of elements stored in the cube More...
 
typedef eT * iterator
 
typedef get_pod_type< eT >::result pod_type
 if eT is non-complex, pod_type is same as eT. otherwise, pod_type is the underlying type used by std::complex More...
 
typedef eT * slice_iterator
 

Public Member Functions

arma_inline arma_warn_unused eT & at (const uword i)
 linear element accessor (treats the cube as a vector); no bounds check. More...
 
arma_inline arma_warn_unused eT at (const uword i) const
 linear element accessor (treats the cube as a vector); no bounds check More...
 
arma_inline arma_warn_unused eT & at (const uword in_row, const uword in_col, const uword in_slice)
 element accessor; no bounds check More...
 
arma_inline arma_warn_unused eT at (const uword in_row, const uword in_col, const uword in_slice) const
 element accessor; no bounds check More...
 
iterator begin ()
 
const_iterator begin () const
 
slice_iterator begin_slice (const uword slice_num)
 
const_slice_iterator begin_slice (const uword slice_num) const
 
template<typename eT2 >
void copy_size (const Cube< eT2 > &m)
 change the cube (without preserving data) to have the same dimensions as the given cube More...
 
 Cube ()
 
 Cube (const uword in_rows, const uword in_cols, const uword in_slices)
 construct the cube to have user specified dimensions More...
 
 Cube (eT *aux_mem, const uword aux_n_rows, const uword aux_n_cols, const uword aux_n_slices, const bool copy_aux_mem=true, const bool strict=true)
 
 Cube (const eT *aux_mem, const uword aux_n_rows, const uword aux_n_cols, const uword aux_n_slices)
 
 Cube (const Cube &m)
 construct a cube from a given cube More...
 
template<typename T1 , typename T2 >
 Cube (const BaseCube< pod_type, T1 > &A, const BaseCube< pod_type, T2 > &B)
 
 Cube (const subview_cube< eT > &X)
 construct a cube from a subview_cube instance (e.g. construct a cube from a delayed subcube operation) More...
 
template<typename gen_type >
 Cube (const GenCube< eT, gen_type > &X)
 create a cube from OpCube, i.e. run the previously delayed unary operations More...
 
template<typename T1 , typename op_type >
 Cube (const OpCube< T1, op_type > &X)
 create a cube from OpCube, i.e. run the previously delayed unary operations More...
 
template<typename T1 , typename eop_type >
 Cube (const eOpCube< T1, eop_type > &X)
 create a cube from eOpCube, i.e. run the previously delayed unary operations More...
 
template<typename T1 , typename op_type >
 Cube (const mtOpCube< eT, T1, op_type > &X)
 EXPERIMENTAL. More...
 
template<typename T1 , typename T2 , typename glue_type >
 Cube (const GlueCube< T1, T2, glue_type > &X)
 create a cube from Glue, i.e. run the previously delayed binary operations More...
 
template<typename T1 , typename T2 , typename eglue_type >
 Cube (const eGlueCube< T1, T2, eglue_type > &X)
 create a cube from eGlue, i.e. run the previously delayed binary operations More...
 
template<typename T1 , typename T2 , typename glue_type >
 Cube (const mtGlueCube< eT, T1, T2, glue_type > &X)
 EXPERIMENTAL. More...
 
template<typename T1 , typename T2 >
 Cube (const BaseCube< typename Cube< eT >::pod_type, T1 > &A, const BaseCube< typename Cube< eT >::pod_type, T2 > &B)
 for constructing a complex cube out of two non-complex cubes More...
 
iterator end ()
 
const_iterator end () const
 
slice_iterator end_slice (const uword slice_num)
 
const_slice_iterator end_slice (const uword slice_num) const
 
const Cubefill (const eT val)
 fill the cube with the specified value More...
 
void impl_print (const std::string &extra_text) const
 
void impl_print (std::ostream &user_stream, const std::string &extra_text) const
 
void impl_raw_print (const std::string &extra_text) const
 
void impl_raw_print (std::ostream &user_stream, const std::string &extra_text) const
 
arma_inline arma_warn_unused bool in_range (const uword i) const
 returns true if the given index is currently in range More...
 
arma_inline arma_warn_unused bool in_range (const span &x) const
 returns true if the given start and end indices are currently in range More...
 
arma_inline arma_warn_unused bool in_range (const uword in_row, const uword in_col, const uword in_slice) const
 returns true if the given location is currently in range More...
 
arma_warn_unused bool in_range (const span &row_span, const span &col_span, const span &slice_span) const
 
template<typename T1 , typename T2 >
void init (const BaseCube< typename Cube< eT >::pod_type, T1 > &A, const BaseCube< typename Cube< eT >::pod_type, T2 > &B)
 for constructing a complex cube out of two non-complex cubes More...
 
void insert_slices (const uword slice_num, const uword N, const bool set_to_zero=true)
 
template<typename T1 >
void insert_slices (const uword row_num, const BaseCube< eT, T1 > &X)
 
arma_inline arma_warn_unused bool is_empty () const
 returns true if the cube has no elements More...
 
arma_inline arma_warn_unused bool is_finite () const
 returns true if all of the elements are finite More...
 
bool load (const std::string name, const file_type type=auto_detect, const bool print_status=true)
 load a cube from a file More...
 
bool load (std::istream &is, const file_type type=auto_detect, const bool print_status=true)
 load a cube from a stream More...
 
arma_warn_unused eT max () const
 
eT max (uword &index_of_max_val) const
 
eT max (uword &row_of_max_val, uword &col_of_max_val, uword &slice_of_max_val) const
 
arma_inline arma_warn_unused eT * memptr ()
 returns a pointer to array of eTs used by the cube More...
 
arma_inline arma_warn_unused const eT * memptr () const
 returns a pointer to array of eTs used by the cube More...
 
arma_warn_unused eT min () const
 
eT min (uword &index_of_min_val) const
 
eT min (uword &row_of_min_val, uword &col_of_min_val, uword &slice_of_min_val) const
 
const Cubeones ()
 
const Cubeones (const uword in_rows, const uword in_cols, const uword in_slices)
 
const Cubeoperator%= (const Cube &m)
 in-place element-wise cube multiplication More...
 
const Cubeoperator%= (const subview_cube< eT > &X)
 in-place element-wise cube mutiplication (using a subcube on the right-hand-side) More...
 
template<typename gen_type >
const Cubeoperator%= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator%= (const OpCube< T1, op_type > &X)
 
template<typename T1 , typename eop_type >
const Cubeoperator%= (const eOpCube< T1, eop_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator%= (const mtOpCube< eT, T1, op_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator%= (const GlueCube< T1, T2, glue_type > &X)
 
template<typename T1 , typename T2 , typename eglue_type >
const Cubeoperator%= (const eGlueCube< T1, T2, eglue_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator%= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 
template<typename gen_type >
const Cube< eT > & operator%= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cube< eT > & operator%= (const OpCube< T1, op_type > &X)
 in-place cube element-wise multiplication, with the right-hand-side operand having delayed operations More...
 
template<typename T1 , typename eop_type >
const Cube< eT > & operator%= (const eOpCube< T1, eop_type > &X)
 in-place cube element-wise multiplication, with the right-hand-side operand having delayed operations More...
 
template<typename T1 , typename op_type >
const Cube< eT > & operator%= (const mtOpCube< eT, T1, op_type > &X)
 EXPERIMENTAL. More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator%= (const GlueCube< T1, T2, glue_type > &X)
 in-place cube element-wise multiplication, with the right-hand-side operands having delayed operations More...
 
template<typename T1 , typename T2 , typename eglue_type >
const Cube< eT > & operator%= (const eGlueCube< T1, T2, eglue_type > &X)
 in-place cube element-wise multiplication, with the right-hand-side operands having delayed operations More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator%= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 EXPERIMENTAL. More...
 
subview_cube< eT > operator() (const span &row_span, const span &col_span, const span &slice_span)
 
const subview_cube< eT > operator() (const span &row_span, const span &col_span, const span &slice_span) const
 
arma_inline arma_warn_unused eT & operator() (const uword i)
 linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_NO_DEBUG is defined More...
 
arma_inline arma_warn_unused eT operator() (const uword i) const
 linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_NO_DEBUG is defined More...
 
arma_inline arma_warn_unused eT & operator() (const uword in_row, const uword in_col, const uword in_slice)
 element accessor; bounds checking not done when ARMA_NO_DEBUG is defined More...
 
arma_inline arma_warn_unused eT operator() (const uword in_row, const uword in_col, const uword in_slice) const
 element accessor; bounds checking not done when ARMA_NO_DEBUG is defined More...
 
arma_inline const Cubeoperator*= (const eT val)
 In-place multiplication of all elements of the cube with a scalar. More...
 
arma_inline const Cubeoperator++ ()
 prefix ++ More...
 
arma_inline void operator++ (int)
 postfix ++ (must not return the object by reference) More...
 
arma_inline const Cubeoperator+= (const eT val)
 In-place addition of a scalar to all elements of the cube. More...
 
const Cubeoperator+= (const Cube &m)
 in-place cube addition More...
 
const Cubeoperator+= (const subview_cube< eT > &X)
 in-place cube addition (using a subcube on the right-hand-side) More...
 
template<typename gen_type >
const Cubeoperator+= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator+= (const OpCube< T1, op_type > &X)
 
template<typename T1 , typename eop_type >
const Cubeoperator+= (const eOpCube< T1, eop_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator+= (const mtOpCube< eT, T1, op_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator+= (const GlueCube< T1, T2, glue_type > &X)
 
template<typename T1 , typename T2 , typename eglue_type >
const Cubeoperator+= (const eGlueCube< T1, T2, eglue_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator+= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 
template<typename gen_type >
const Cube< eT > & operator+= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cube< eT > & operator+= (const OpCube< T1, op_type > &X)
 in-place cube addition, with the right-hand-side operand having delayed operations More...
 
template<typename T1 , typename eop_type >
const Cube< eT > & operator+= (const eOpCube< T1, eop_type > &X)
 in-place cube addition, with the right-hand-side operand having delayed operations More...
 
template<typename T1 , typename op_type >
const Cube< eT > & operator+= (const mtOpCube< eT, T1, op_type > &X)
 EXPERIMENTAL. More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator+= (const GlueCube< T1, T2, glue_type > &X)
 in-place cube addition, with the right-hand-side operands having delayed operations More...
 
template<typename T1 , typename T2 , typename eglue_type >
const Cube< eT > & operator+= (const eGlueCube< T1, T2, eglue_type > &X)
 in-place cube addition, with the right-hand-side operands having delayed operations More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator+= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 EXPERIMENTAL. More...
 
arma_inline const Cubeoperator-- ()
 prefix – More...
 
arma_inline void operator-- (int)
 postfix – (must not return the object by reference) More...
 
arma_inline const Cubeoperator-= (const eT val)
 In-place subtraction of a scalar from all elements of the cube. More...
 
const Cubeoperator-= (const Cube &m)
 in-place cube subtraction More...
 
const Cubeoperator-= (const subview_cube< eT > &X)
 in-place cube subtraction (using a subcube on the right-hand-side) More...
 
template<typename gen_type >
const Cubeoperator-= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator-= (const OpCube< T1, op_type > &X)
 
template<typename T1 , typename eop_type >
const Cubeoperator-= (const eOpCube< T1, eop_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator-= (const mtOpCube< eT, T1, op_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator-= (const GlueCube< T1, T2, glue_type > &X)
 
template<typename T1 , typename T2 , typename eglue_type >
const Cubeoperator-= (const eGlueCube< T1, T2, eglue_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator-= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 
template<typename gen_type >
const Cube< eT > & operator-= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cube< eT > & operator-= (const OpCube< T1, op_type > &X)
 in-place cube subtraction, with the right-hand-side operand having delayed operations More...
 
template<typename T1 , typename eop_type >
const Cube< eT > & operator-= (const eOpCube< T1, eop_type > &X)
 in-place cube subtraction, with the right-hand-side operand having delayed operations More...
 
template<typename T1 , typename op_type >
const Cube< eT > & operator-= (const mtOpCube< eT, T1, op_type > &X)
 EXPERIMENTAL. More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator-= (const GlueCube< T1, T2, glue_type > &X)
 in-place cube subtraction, with the right-hand-side operands having delayed operations More...
 
template<typename T1 , typename T2 , typename eglue_type >
const Cube< eT > & operator-= (const eGlueCube< T1, T2, eglue_type > &X)
 in-place cube subtraction, with the right-hand-side operands having delayed operations More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator-= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 EXPERIMENTAL. More...
 
arma_inline const Cubeoperator/= (const eT val)
 In-place division of all elements of the cube with a scalar. More...
 
const Cubeoperator/= (const Cube &m)
 in-place element-wise cube division More...
 
const Cubeoperator/= (const subview_cube< eT > &X)
 in-place element-wise cube division (using a subcube on the right-hand-side) More...
 
template<typename gen_type >
const Cubeoperator/= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator/= (const OpCube< T1, op_type > &X)
 
template<typename T1 , typename eop_type >
const Cubeoperator/= (const eOpCube< T1, eop_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator/= (const mtOpCube< eT, T1, op_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator/= (const GlueCube< T1, T2, glue_type > &X)
 
template<typename T1 , typename T2 , typename eglue_type >
const Cubeoperator/= (const eGlueCube< T1, T2, eglue_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator/= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 
template<typename gen_type >
const Cube< eT > & operator/= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cube< eT > & operator/= (const OpCube< T1, op_type > &X)
 in-place cube element-wise division, with the right-hand-side operand having delayed operations More...
 
template<typename T1 , typename eop_type >
const Cube< eT > & operator/= (const eOpCube< T1, eop_type > &X)
 in-place cube element-wise division, with the right-hand-side operand having delayed operations More...
 
template<typename T1 , typename op_type >
const Cube< eT > & operator/= (const mtOpCube< eT, T1, op_type > &X)
 EXPERIMENTAL. More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator/= (const GlueCube< T1, T2, glue_type > &X)
 in-place cube element-wise division, with the right-hand-side operands having delayed operations More...
 
template<typename T1 , typename T2 , typename eglue_type >
const Cube< eT > & operator/= (const eGlueCube< T1, T2, eglue_type > &X)
 in-place cube element-wise division, with the right-hand-side operands having delayed operations More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator/= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 EXPERIMENTAL. More...
 
arma_inline const Cubeoperator= (const eT val)
 
const Cubeoperator= (const Cube &m)
 construct a cube from a given cube More...
 
const Cubeoperator= (const subview_cube< eT > &X)
 construct a cube from a subview_cube instance (e.g. construct a cube from a delayed subcube operation) More...
 
template<typename gen_type >
const Cubeoperator= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator= (const OpCube< T1, op_type > &X)
 
template<typename T1 , typename eop_type >
const Cubeoperator= (const eOpCube< T1, eop_type > &X)
 
template<typename T1 , typename op_type >
const Cubeoperator= (const mtOpCube< eT, T1, op_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator= (const GlueCube< T1, T2, glue_type > &X)
 
template<typename T1 , typename T2 , typename eglue_type >
const Cubeoperator= (const eGlueCube< T1, T2, eglue_type > &X)
 
template<typename T1 , typename T2 , typename glue_type >
const Cubeoperator= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 
template<typename gen_type >
const Cube< eT > & operator= (const GenCube< eT, gen_type > &X)
 
template<typename T1 , typename op_type >
const Cube< eT > & operator= (const OpCube< T1, op_type > &X)
 create a cube from OpCube, i.e. run the previously delayed unary operations More...
 
template<typename T1 , typename eop_type >
const Cube< eT > & operator= (const eOpCube< T1, eop_type > &X)
 create a cube from eOpCube, i.e. run the previously delayed unary operations More...
 
template<typename T1 , typename op_type >
const Cube< eT > & operator= (const mtOpCube< eT, T1, op_type > &X)
 EXPERIMENTAL. More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator= (const GlueCube< T1, T2, glue_type > &X)
 create a cube from Glue, i.e. run the previously delayed binary operations More...
 
template<typename T1 , typename T2 , typename eglue_type >
const Cube< eT > & operator= (const eGlueCube< T1, T2, eglue_type > &X)
 create a cube from Glue, i.e. run the previously delayed binary operations More...
 
template<typename T1 , typename T2 , typename glue_type >
const Cube< eT > & operator= (const mtGlueCube< eT, T1, T2, glue_type > &X)
 EXPERIMENTAL. More...
 
arma_inline arma_warn_unused eT & operator[] (const uword i)
 linear element accessor (treats the cube as a vector); no bounds check. More...
 
arma_inline arma_warn_unused eT operator[] (const uword i) const
 linear element accessor (treats the cube as a vector); no bounds check More...
 
bool quiet_load (const std::string name, const file_type type=auto_detect)
 load a cube from a file, without printing any error messages More...
 
bool quiet_load (std::istream &is, const file_type type=auto_detect)
 load a cube from a stream, without printing any error messages More...
 
bool quiet_save (const std::string name, const file_type type=arma_binary) const
 save the cube to a file, without printing any error messages More...
 
bool quiet_save (std::ostream &os, const file_type type=arma_binary) const
 save the cube to a stream, without printing any error messages More...
 
const Cuberandn ()
 
const Cuberandn (const uword in_rows, const uword in_cols, const uword in_slices)
 
const Cuberandu ()
 
const Cuberandu (const uword in_rows, const uword in_cols, const uword in_slices)
 
void reset ()
 
void reshape (const uword in_rows, const uword in_cols, const uword in_slices, const uword dim=0)
 change the cube to have user specified dimensions (data is preserved) More...
 
void resize (const uword in_rows, const uword in_cols, const uword in_slices)
 change the cube to have user specified dimensions (data is preserved) More...
 
bool save (const std::string name, const file_type type=arma_binary, const bool print_status=true) const
 save the cube to a file More...
 
bool save (std::ostream &os, const file_type type=arma_binary, const bool print_status=true) const
 save the cube to a stream More...
 
template<typename T1 >
void set_imag (const BaseCube< pod_type, T1 > &X)
 
template<typename T1 >
void set_imag (const BaseCube< typename Cube< eT >::pod_type, T1 > &X)
 
template<typename T1 >
void set_real (const BaseCube< pod_type, T1 > &X)
 
template<typename T1 >
void set_real (const BaseCube< typename Cube< eT >::pod_type, T1 > &X)
 
void set_size (const uword in_rows, const uword in_cols, const uword in_slices)
 change the cube to have user specified dimensions (data is not preserved) More...
 
void shed_slice (const uword slice_num)
 remove specified slice More...
 
void shed_slices (const uword in_slice1, const uword in_slice2)
 remove specified slices More...
 
arma_inline Mat< eT > & slice (const uword in_slice)
 provide the reference to the matrix representing a single slice More...
 
arma_inline const Mat< eT > & slice (const uword in_slice) const
 provide the reference to the matrix representing a single slice More...
 
arma_inline arma_warn_unused eT * slice_colptr (const uword in_slice, const uword in_col)
 returns a pointer to array of eTs used by the specified slice in the cube More...
 
arma_inline arma_warn_unused const eT * slice_colptr (const uword in_slice, const uword in_col) const
 returns a pointer to array of eTs used by the specified slice in the cube More...
 
arma_inline arma_warn_unused eT * slice_memptr (const uword slice)
 returns a pointer to array of eTs used by the specified slice in the cube More...
 
arma_inline arma_warn_unused const eT * slice_memptr (const uword slice) const
 returns a pointer to array of eTs used by the specified slice in the cube More...
 
arma_inline subview_cube< eT > slices (const uword in_slice1, const uword in_slice2)
 creation of subview_cube (subcube comprised of specified slices) More...
 
arma_inline const subview_cube< eT > slices (const uword in_slice1, const uword in_slice2) const
 creation of subview_cube (subcube comprised of specified slices) More...
 
arma_inline subview_cube< eT > subcube (const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2)
 creation of subview_cube (generic subcube) More...
 
arma_inline const subview_cube< eT > subcube (const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2) const
 creation of subview_cube (generic subcube) More...
 
subview_cube< eT > subcube (const span &row_span, const span &col_span, const span &slice_span)
 creation of subview_cube (generic subcube) More...
 
const subview_cube< eT > subcube (const span &row_span, const span &col_span, const span &slice_span) const
 creation of subview_cube (generic subcube) More...
 
const Cubezeros ()
 
const Cubezeros (const uword in_rows, const uword in_cols, const uword in_slices)
 
 ~Cube ()
 
- Public Member Functions inherited from BaseCube< eT, Cube< eT > >
arma_inline const Cube< eT > & get_ref () const
 
void print (const std::string extra_text="") const
 
void print (std::ostream &user_stream, const std::string extra_text="") const
 
void raw_print (const std::string extra_text="") const
 
void raw_print (std::ostream &user_stream, const std::string extra_text="") const
 

Public Attributes

arma_aligned const Mat< eT > **const mat_ptrs
 pointer to an array containing pointers to Mat instances (one for each slice) More...
 
arma_aligned const eT *const mem
 pointer to the memory used by the cube (memory is read-only) More...
 
const uword mem_state
 
const uword n_cols
 number of columns in each slice (read-only) More...
 
const uword n_elem
 number of elements in the cube (read-only) More...
 
const uword n_elem_slice
 DEPRECATED: do not use this member variable – it will be removed in version 3.0. More...
 
const uword n_rows
 number of rows in each slice (read-only) More...
 
const uword n_slices
 number of slices in the cube (read-only) More...
 

Protected Member Functions

void create_mat ()
 
void delete_mat ()
 
template<typename T1 , typename T2 >
void init (const BaseCube< pod_type, T1 > &A, const BaseCube< pod_type, T2 > &B)
 
void init_cold ()
 
void init_warm (const uword in_rows, const uword in_cols, const uword in_slices)
 
void steal_mem (Cube &X)
 

Protected Attributes

arma_aligned Mat< eT > * mat_ptrs_local [Cube_prealloc::mat_ptrs_size]
 
arma_aligned eT mem_local [Cube_prealloc::mem_n_elem]
 

Friends

class glue_join
 
class op_reshape
 
class op_resize
 

Detailed Description

template<typename eT>
class Cube< eT >

Dense cube class.

Definition at line 30 of file Cube_bones.hpp.

Member Typedef Documentation

template<typename eT>
typedef const eT* Cube< eT >::const_iterator

Definition at line 265 of file Cube_bones.hpp.

template<typename eT>
typedef const eT* Cube< eT >::const_slice_iterator

Definition at line 268 of file Cube_bones.hpp.

template<typename eT>
typedef eT Cube< eT >::elem_type

the type of elements stored in the cube

Definition at line 34 of file Cube_bones.hpp.

template<typename eT>
typedef eT* Cube< eT >::iterator

Definition at line 264 of file Cube_bones.hpp.

template<typename eT>
typedef get_pod_type<eT>::result Cube< eT >::pod_type

if eT is non-complex, pod_type is same as eT. otherwise, pod_type is the underlying type used by std::complex

Definition at line 35 of file Cube_bones.hpp.

template<typename eT>
typedef eT* Cube< eT >::slice_iterator

Definition at line 267 of file Cube_bones.hpp.

Constructor & Destructor Documentation

template<typename eT>
template<typename T1 , typename T2 >
Cube< eT >::Cube ( const BaseCube< pod_type, T1 > &  A,
const BaseCube< pod_type, T2 > &  B 
)
inlineexplicit

Member Function Documentation

template<typename eT>
template<typename T1 , typename T2 >
void Cube< eT >::init ( const BaseCube< pod_type, T1 > &  A,
const BaseCube< pod_type, T2 > &  B 
)
inlineprotected
template<typename eT>
template<typename gen_type >
const Cube& Cube< eT >::operator%= ( const GenCube< eT, gen_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator%= ( const OpCube< T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename eop_type >
const Cube& Cube< eT >::operator%= ( const eOpCube< T1, eop_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator%= ( const mtOpCube< eT, T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator%= ( const GlueCube< T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename eglue_type >
const Cube& Cube< eT >::operator%= ( const eGlueCube< T1, T2, eglue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator%= ( const mtGlueCube< eT, T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename gen_type >
const Cube& Cube< eT >::operator+= ( const GenCube< eT, gen_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator+= ( const OpCube< T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename eop_type >
const Cube& Cube< eT >::operator+= ( const eOpCube< T1, eop_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator+= ( const mtOpCube< eT, T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator+= ( const GlueCube< T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename eglue_type >
const Cube& Cube< eT >::operator+= ( const eGlueCube< T1, T2, eglue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator+= ( const mtGlueCube< eT, T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename gen_type >
const Cube& Cube< eT >::operator-= ( const GenCube< eT, gen_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator-= ( const OpCube< T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename eop_type >
const Cube& Cube< eT >::operator-= ( const eOpCube< T1, eop_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator-= ( const mtOpCube< eT, T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator-= ( const GlueCube< T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename eglue_type >
const Cube& Cube< eT >::operator-= ( const eGlueCube< T1, T2, eglue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator-= ( const mtGlueCube< eT, T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename gen_type >
const Cube& Cube< eT >::operator/= ( const GenCube< eT, gen_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator/= ( const OpCube< T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename eop_type >
const Cube& Cube< eT >::operator/= ( const eOpCube< T1, eop_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator/= ( const mtOpCube< eT, T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator/= ( const GlueCube< T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename eglue_type >
const Cube& Cube< eT >::operator/= ( const eGlueCube< T1, T2, eglue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator/= ( const mtGlueCube< eT, T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename gen_type >
const Cube& Cube< eT >::operator= ( const GenCube< eT, gen_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator= ( const OpCube< T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename eop_type >
const Cube& Cube< eT >::operator= ( const eOpCube< T1, eop_type > &  X)
inline
template<typename eT>
template<typename T1 , typename op_type >
const Cube& Cube< eT >::operator= ( const mtOpCube< eT, T1, op_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator= ( const GlueCube< T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename eglue_type >
const Cube& Cube< eT >::operator= ( const eGlueCube< T1, T2, eglue_type > &  X)
inline
template<typename eT>
template<typename T1 , typename T2 , typename glue_type >
const Cube& Cube< eT >::operator= ( const mtGlueCube< eT, T1, T2, glue_type > &  X)
inline
template<typename eT>
template<typename T1 >
void Cube< eT >::set_imag ( const BaseCube< pod_type, T1 > &  X)
inline
template<typename eT>
template<typename T1 >
void Cube< eT >::set_real ( const BaseCube< pod_type, T1 > &  X)
inline

Friends And Related Function Documentation

template<typename eT>
friend class glue_join
friend

Definition at line 326 of file Cube_bones.hpp.

template<typename eT>
friend class op_reshape
friend

Definition at line 327 of file Cube_bones.hpp.

template<typename eT>
friend class op_resize
friend

Definition at line 328 of file Cube_bones.hpp.

Member Data Documentation

template<typename eT>
arma_aligned const Mat<eT>** const Cube< eT >::mat_ptrs

pointer to an array containing pointers to Mat instances (one for each slice)

Definition at line 50 of file Cube_bones.hpp.

template<typename eT>
arma_aligned Mat<eT>* Cube< eT >::mat_ptrs_local[Cube_prealloc::mat_ptrs_size]
protected

Definition at line 54 of file Cube_bones.hpp.

template<typename eT>
arma_aligned const eT* const Cube< eT >::mem

pointer to the memory used by the cube (memory is read-only)

Definition at line 51 of file Cube_bones.hpp.

template<typename eT>
arma_aligned eT Cube< eT >::mem_local[Cube_prealloc::mem_n_elem]
protected

Definition at line 55 of file Cube_bones.hpp.

template<typename eT>
const uword Cube< eT >::mem_state

Definition at line 42 of file Cube_bones.hpp.

template<typename eT>
const uword Cube< eT >::n_cols

number of columns in each slice (read-only)

Definition at line 38 of file Cube_bones.hpp.

template<typename eT>
const uword Cube< eT >::n_elem

number of elements in the cube (read-only)

Definition at line 41 of file Cube_bones.hpp.

template<typename eT>
const uword Cube< eT >::n_elem_slice

DEPRECATED: do not use this member variable – it will be removed in version 3.0.

Definition at line 39 of file Cube_bones.hpp.

template<typename eT>
const uword Cube< eT >::n_rows

number of rows in each slice (read-only)

Definition at line 37 of file Cube_bones.hpp.

template<typename eT>
const uword Cube< eT >::n_slices

number of slices in the cube (read-only)

Definition at line 40 of file Cube_bones.hpp.


The documentation for this class was generated from the following files:


armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:32:00