65 inline 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);
66 inline Cube(
const eT* aux_mem,
const uword aux_n_rows,
const uword aux_n_cols,
const uword aux_n_slices);
75 inline const Cube& operator=(
const Cube& m);
76 inline const Cube& operator+=(
const Cube& m);
77 inline const Cube& operator-=(
const Cube& m);
78 inline const Cube& operator%=(
const Cube& m);
79 inline const Cube& operator/=(
const Cube& m);
81 template<
typename T1,
typename T2>
107 inline void shed_slice(
const uword slice_num);
109 inline void shed_slices(
const uword in_slice1,
const uword in_slice2);
111 inline void insert_slices(
const uword slice_num,
const uword N,
const bool set_to_zero =
true);
113 template<
typename T1>
206 inline void impl_print(
const std::string& extra_text)
const;
207 inline void impl_print(std::ostream& user_stream,
const std::string& extra_text)
const;
209 inline void impl_raw_print(
const std::string& extra_text)
const;
210 inline void impl_raw_print(std::ostream& user_stream,
const std::string& extra_text)
const;
212 inline void set_size(
const uword in_rows,
const uword in_cols,
const uword in_slices);
216 template<
typename eT2>
inline void copy_size(
const Cube<eT2>& m);
218 inline const Cube& fill(
const eT val);
242 inline eT
min(
uword& index_of_min_val)
const;
243 inline eT
max(
uword& index_of_max_val)
const;
245 inline eT
min(
uword& row_of_min_val,
uword& col_of_min_val,
uword& slice_of_min_val)
const;
246 inline eT
max(
uword& row_of_max_val,
uword& col_of_max_val,
uword& slice_of_max_val)
const;
249 inline bool save(
const std::string name,
const file_type type =
arma_binary,
const bool print_status =
true)
const;
250 inline bool save( std::ostream& os,
const file_type type =
arma_binary,
const bool print_status =
true)
const;
252 inline bool load(
const std::string name,
const file_type type =
auto_detect,
const bool print_status =
true);
253 inline bool load( std::istream& is,
const file_type type =
auto_detect,
const bool print_status =
true);
270 inline iterator begin();
271 inline const_iterator begin()
const;
273 inline iterator end();
274 inline const_iterator end()
const;
276 inline slice_iterator begin_slice(
const uword slice_num);
277 inline const_slice_iterator begin_slice(
const uword slice_num)
const;
279 inline slice_iterator end_slice(
const uword slice_num);
280 inline const_slice_iterator end_slice(
const uword slice_num)
const;
283 template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
288 static const uword fixed_n_elem = fixed_n_rows * fixed_n_cols * fixed_n_slices;
302 template<
typename T1>
305 template<
typename T1>
308 template<
typename T1,
typename T2>
315 inline void init_cold();
316 inline void init_warm(
const uword in_rows,
const uword in_cols,
const uword in_slices);
318 template<
typename T1,
typename T2>
321 inline void steal_mem(
Cube& X);
323 inline void delete_mat();
324 inline void create_mat();
333 #ifdef ARMA_EXTRA_CUBE_PROTO 334 #include ARMA_INCFILE_WRAP(ARMA_EXTRA_CUBE_PROTO) 345 template<
typename T>
arma_inline static void prefix_pp(
Cube< std::complex<T> >& x);
348 template<
typename T>
arma_inline static void postfix_pp(
Cube< std::complex<T> >& x);
351 template<
typename T>
arma_inline static void prefix_mm(
Cube< std::complex<T> >& x);
354 template<
typename T>
arma_inline static void postfix_mm(
Cube< std::complex<T> >& x);
359 template<
typename T,
typename T1>
inline static void set_real(
Cube< std::complex<T> >& out,
const BaseCube< T,T1>& X);
360 template<
typename T,
typename T1>
inline static void set_imag(
Cube< std::complex<T> >& out,
const BaseCube< T,T1>& X);
fixed(const BaseCube< pod_type, T1 > &A, const BaseCube< pod_type, T2 > &B)
support class for generator functions (eg. zeros, randu, randn, ...)
const Cube & operator=(const eT val)
eT elem_type
the type of elements stored in the cube
arma_aligned const Mat< eT > **const mat_ptrs
pointer to an array containing pointers to Mat instances (one for each slice)
arma_inline arma_warn_unused bool is_finite(const eT x, const typename arma_scalar_only< eT >::result *junk=0)
arma_inline const Op< T1, op_max > max(const Base< typename T1::elem_type, T1 > &X, const uword dim=0)
Delayed 'maximum values' operation. The dimension, along which the maxima are found, is set via 'dim'. For dim = 0, the maximum value of each column is found (i.e. searches by traversing across rows). For dim = 1, the maximum value of each row is found (i.e. searches by traversing across columns). The default is dim = 0.
arma_inline const Op< T1, op_min > min(const Base< typename T1::elem_type, T1 > &X, const uword dim=0)
Delayed 'minimum values' operation. The dimension, along which the minima are found, is set via 'dim'. For dim = 0, the minimum value of each column is found (i.e. searches by traversing across rows). For dim = 1, the minimum value of each row is found (i.e. searches by traversing across columns). The default is dim = 0.
const uword n_cols
number of columns in each slice (read-only)
const Op< T1, op_reshape > reshape(const Base< typename T1::elem_type, T1 > &X, const uword in_n_rows, const uword in_n_cols, const uword dim=0)
const Cube & operator=(const BaseCube< eT, T1 > &A)
static const uword mat_ptrs_size
static const uword mem_n_elem
void init(const BaseCube< pod_type, T1 > &A, const BaseCube< pod_type, T2 > &B)
Armadillo binary format, with information about matrix type and size.
arma_aligned const eT *const mem
pointer to the memory used by the cube (memory is read-only)
arma_inline const Gen< vec::elem_type, gen_ones_full > ones(const uword n_elem)
Analog of the Op class, intended for cubes.
Analog of the Base class, intended for cubes.
fixed(const BaseCube< eT, T1 > &A)
const uword n_elem
number of elements in the cube (read-only)
const eT * const_iterator
arma_inline const derived & get_ref() const
const eT * const_slice_iterator
arma_inline const Gen< vec::elem_type, gen_zeros > zeros(const uword n_elem)
Generate a vector with all elements set to zero.
arma_inline const Cube & operator=(const eT val)
analog of the Glue class, intended for Cube objects
Automatically detect the file type (file must be one of the following types)
const uword n_slices
number of slices in the cube (read-only)
const uword n_elem_slice
DEPRECATED: do not use this member variable – it will be removed in version 3.0. ...
const uword n_rows
number of rows in each slice (read-only)
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:...
const Op< T1, op_resize > resize(const Base< typename T1::elem_type, T1 > &X, const uword in_n_rows, const uword in_n_cols)