#include <field_proto.hpp>
Public Types | |
typedef oT | object_type |
Public Member Functions | |
~field () | |
field () | |
field (const field &x) | |
construct a field from a given field | |
const field & | operator= (const field &x) |
construct a field from a given field | |
field (const subview_field< oT > &x) | |
construct a field from subview_field (e.g. construct a field from a delayed subfield operation) | |
const field & | operator= (const subview_field< oT > &x) |
construct a field from subview_field (e.g. construct a field from a delayed subfield operation) | |
field (const u32 n_elem_in) | |
construct the field with the specified number of elements, assuming a column-major layout | |
field (const u32 n_rows_in, const u32 n_cols_in) | |
construct the field with the specified dimensions | |
void | set_size (const u32 n_obj_in) |
change the field to have the specified number of elements, assuming a column-major layout (data is not preserved) | |
void | set_size (const u32 n_rows_in, const u32 n_cols_in) |
change the field to have the specified dimensions (data is not preserved) | |
arma_inline oT & | operator[] (const u32 i) |
linear element accessor (treats the field as a vector); no bounds check | |
arma_inline const oT & | operator[] (const u32 i) const |
linear element accessor (treats the field as a vector); no bounds check | |
arma_inline oT & | operator() (const u32 i) |
linear element accessor (treats the field as a vector); bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline const oT & | operator() (const u32 i) const |
linear element accessor (treats the field as a vector); bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline oT & | at (const u32 row, const u32 col) |
element accessor; no bounds check | |
arma_inline const oT & | at (const u32 row, const u32 col) const |
element accessor; no bounds check | |
arma_inline oT & | operator() (const u32 row, const u32 col) |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined | |
arma_inline const oT & | operator() (const u32 row, const u32 col) const |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined | |
subview_field< oT > | row (const u32 row_num) |
creation of subview_field (row of a field) | |
const subview_field< oT > | row (const u32 row_num) const |
creation of subview_field (row of a field) | |
subview_field< oT > | col (const u32 col_num) |
creation of subview_field (column of a field) | |
const subview_field< oT > | col (const u32 col_num) const |
creation of subview_field (column of a field) | |
subview_field< oT > | rows (const u32 in_row1, const u32 in_row2) |
creation of subview_field (subfield comprised of specified rows) | |
const subview_field< oT > | rows (const u32 in_row1, const u32 in_row2) const |
creation of subview_field (subfield comprised of specified rows) | |
subview_field< oT > | cols (const u32 in_col1, const u32 in_col2) |
creation of subview_field (subfield comprised of specified columns) | |
const subview_field< oT > | cols (const u32 in_col1, const u32 in_col2) const |
creation of subview_field (subfield comprised of specified columns) | |
subview_field< oT > | subfield (const u32 in_row1, const u32 in_col1, const u32 in_row2, const u32 in_col2) |
creation of subview_field (subfield with arbitrary dimensions) | |
const subview_field< oT > | subfield (const u32 in_row1, const u32 in_col1, const u32 in_row2, const u32 in_col2) const |
creation of subview_field (generic submatrix) | |
void | print (const std::string extra_text="") const |
print contents of the field, optionally preceding with a user specified line of text | |
void | fill (const oT &x) |
fill the field with an object | |
void | reset () |
void | reset_objects () |
void | save (const std::string name, const file_type type=arma_binary) const |
void | load (const std::string name, const file_type type=auto_detect) |
Public Attributes | |
const u32 | n_rows |
number of rows in the field (read-only) | |
const u32 | n_cols |
number of columns in the field (read-only) | |
const u32 | n_elem |
number of elements in the field (read-only) | |
Private Member Functions | |
void | init (const field< oT > &x) |
construct a field from a given field | |
void | init (const u32 n_rows_in, const u32 n_cols_in) |
internal field construction; if the requested size is small enough, memory from the stack is used. otherwise memory is allocated via 'new' | |
void | delete_objects () |
void | create_objects () |
Private Attributes | |
arma_aligned oT ** | mem |
pointer to memory used by the object | |
arma_aligned oT * | mem_local [16] |
Internal memory, to avoid calling the 'new' operator for small amounts of memory. | |
Friends | |
class | field_aux |
class | subview_field< oT > |
Definition at line 25 of file field_proto.hpp.
typedef oT field< oT >::object_type |
Definition at line 29 of file field_proto.hpp.
friend class field_aux [friend] |
Definition at line 106 of file field_proto.hpp.
friend class subview_field< oT > [friend] |
Definition at line 107 of file field_proto.hpp.
number of rows in the field (read-only)
Definition at line 31 of file field_proto.hpp.
Referenced by field< oT >::at(), field< oT >::col(), field< oT >::cols(), subview_field< oT >::extract(), field< oT >::init(), diskio::load_field_std_string(), field< oT >::operator()(), subview_field< oT >::operator=(), field< oT >::row(), field< oT >::rows(), diskio::save_field_arma_binary(), diskio::save_field_std_string(), field< oT >::subfield(), and field< oT >::~field().
number of columns in the field (read-only)
Definition at line 32 of file field_proto.hpp.
Referenced by field< oT >::col(), field< oT >::cols(), subview_field< oT >::extract(), field< oT >::init(), diskio::load_field_std_string(), field< oT >::operator()(), subview_field< oT >::operator=(), field< oT >::row(), field< oT >::rows(), diskio::save_field_arma_binary(), diskio::save_field_std_string(), field< oT >::subfield(), and field< oT >::~field().
number of elements in the field (read-only)
Definition at line 33 of file field_proto.hpp.
Referenced by field< oT >::create_objects(), field< oT >::delete_objects(), field< oT >::fill(), field< oT >::init(), diskio::load_field_arma_binary(), field< oT >::operator()(), field_aux::reset_objects(), diskio::save_field_arma_binary(), diskio::save_field_ppm_binary(), and field< oT >::~field().
pointer to memory used by the object
Definition at line 38 of file field_proto.hpp.
Referenced by field< oT >::at(), field< oT >::create_objects(), field< oT >::delete_objects(), field< oT >::init(), field< oT >::operator()(), field< oT >::operator[](), field_aux::reset_objects(), and field< oT >::~field().
Internal memory, to avoid calling the 'new' operator for small amounts of memory.
Definition at line 40 of file field_proto.hpp.
Referenced by field< oT >::init(), and field< oT >::~field().