#include <field_bones.hpp>
Classes | |
class | const_iterator |
class | iterator |
Public Types | |
typedef oT | object_type |
Public Member Functions | |
arma_inline oT & | at (const uword i) |
linear element accessor (treats the field as a vector); no bounds check More... | |
arma_inline const oT & | at (const uword i) const |
linear element accessor (treats the field as a vector); no bounds check More... | |
arma_inline oT & | at (const uword row, const uword col) |
element accessor; no bounds check More... | |
arma_inline const oT & | at (const uword row, const uword col) const |
element accessor; no bounds check More... | |
iterator | begin () |
const_iterator | begin () const |
subview_field< oT > | col (const uword col_num) |
creation of subview_field (column of a field) More... | |
const subview_field< oT > | col (const uword col_num) const |
creation of subview_field (column of a field) More... | |
subview_field< oT > | cols (const uword in_col1, const uword in_col2) |
creation of subview_field (subfield comprised of specified columns) More... | |
const subview_field< oT > | cols (const uword in_col1, const uword in_col2) const |
creation of subview_field (subfield comprised of specified columns) More... | |
template<typename oT2 > | |
void | copy_size (const field< oT2 > &x) |
change the field to have the specified dimensions (data is not preserved) More... | |
iterator | end () |
const_iterator | end () const |
field () | |
field (const field &x) | |
construct a field from a given field More... | |
field (const subview_field< oT > &x) | |
construct a field from subview_field (e.g. construct a field from a delayed subfield operation) More... | |
field (const uword n_elem_in) | |
field (const uword n_rows_in, const uword n_cols_in) | |
construct the field with the specified dimensions More... | |
void | fill (const oT &x) |
fill the field with an object More... | |
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 |
returns true if the given location is currently in range More... | |
arma_inline arma_warn_unused bool | in_range (const span &row_span, const uword in_col) const |
arma_inline arma_warn_unused bool | in_range (const uword in_row, const span &col_span) const |
arma_inline arma_warn_unused bool | in_range (const span &row_span, const span &col_span) const |
arma_inline bool | is_empty () const |
returns true if the field has no objects More... | |
bool | load (const std::string name, const file_type type=auto_detect, const bool print_status=true) |
bool | load (std::istream &is, const file_type type=auto_detect, const bool print_status=true) |
arma_inline oT & | operator() (const uword i) |
linear element accessor (treats the field as a vector); bounds checking not done when ARMA_NO_DEBUG is defined More... | |
arma_inline const oT & | operator() (const uword i) const |
linear element accessor (treats the field as a vector); bounds checking not done when ARMA_NO_DEBUG is defined More... | |
arma_inline oT & | operator() (const uword row, const uword col) |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined More... | |
arma_inline const oT & | operator() (const uword row, const uword col) const |
element accessor; bounds checking not done when ARMA_NO_DEBUG is defined More... | |
subview_field< oT > | operator() (const span &row_span, const span &col_span) |
const subview_field< oT > | operator() (const span &row_span, const span &col_span) const |
field_injector< field > | operator<< (const injector_end_of_row &x) |
field_injector< field > | operator<< (const oT &val) |
const field & | operator= (const field &x) |
construct a field from a given field More... | |
const field & | operator= (const subview_field< oT > &x) |
construct a field from subview_field (e.g. construct a field from a delayed subfield operation) More... | |
arma_inline oT & | operator[] (const uword i) |
linear element accessor (treats the field as a vector); no bounds check More... | |
arma_inline const oT & | operator[] (const uword i) const |
linear element accessor (treats the field as a vector); no bounds check More... | |
void | print (const std::string extra_text="") const |
void | print (std::ostream &user_stream, const std::string extra_text="") const |
bool | quiet_load (const std::string name, const file_type type=auto_detect) |
bool | quiet_load (std::istream &is, const file_type type=auto_detect) |
bool | quiet_save (const std::string name, const file_type type=arma_binary) const |
bool | quiet_save (std::ostream &os, const file_type type=arma_binary) const |
void | reset () |
reset the field to an empty state (i.e. the field will have no objects) More... | |
void | reset_objects () |
reset each object More... | |
subview_field< oT > | row (const uword row_num) |
creation of subview_field (row of a field) More... | |
const subview_field< oT > | row (const uword row_num) const |
creation of subview_field (row of a field) More... | |
subview_field< oT > | rows (const uword in_row1, const uword in_row2) |
creation of subview_field (subfield comprised of specified rows) More... | |
const subview_field< oT > | rows (const uword in_row1, const uword in_row2) const |
creation of subview_field (subfield comprised of specified rows) More... | |
bool | save (const std::string name, const file_type type=arma_binary, const bool print_status=true) const |
bool | save (std::ostream &os, const file_type type=arma_binary, const bool print_status=true) const |
void | set_size (const uword n_obj_in) |
void | set_size (const uword n_rows_in, const uword n_cols_in) |
change the field to have the specified dimensions (data is not preserved) More... | |
subview_field< oT > | subfield (const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) |
creation of subview_field (subfield with arbitrary dimensions) More... | |
const subview_field< oT > | subfield (const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const |
creation of subview_field (subfield with arbitrary dimensions) More... | |
subview_field< oT > | subfield (const span &row_span, const span &col_span) |
creation of subview_field (subfield with arbitrary dimensions) More... | |
const subview_field< oT > | subfield (const span &row_span, const span &col_span) const |
creation of subview_field (subfield with arbitrary dimensions) More... | |
~field () | |
Public Attributes | |
const uword | n_cols |
number of columns in the field (read-only) More... | |
const uword | n_elem |
number of elements in the field (read-only) More... | |
const uword | n_rows |
number of rows in the field (read-only) More... | |
Private Member Functions | |
void | create_objects () |
void | delete_objects () |
void | init (const field< oT > &x) |
construct a field from a given field More... | |
void | init (const uword n_rows_in, const uword 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' More... | |
Private Attributes | |
arma_aligned oT ** | mem |
pointer to memory used by the object More... | |
arma_aligned oT * | mem_local [field_prealloc_n_elem::val] |
Internal memory, to avoid calling the 'new' operator for small amounts of memory. More... | |
Friends | |
class | field_aux |
class | subview_field< oT > |
A lightweight 2D container for abitrary objects (the objects must have a copy constructor)
Definition at line 31 of file field_bones.hpp.
typedef oT field< oT >::object_type |
Definition at line 35 of file field_bones.hpp.
|
friend |
Definition at line 203 of file field_bones.hpp.
|
friend |
Definition at line 204 of file field_bones.hpp.
|
private |
pointer to memory used by the object
Definition at line 44 of file field_bones.hpp.
|
private |
Internal memory, to avoid calling the 'new' operator for small amounts of memory.
Definition at line 45 of file field_bones.hpp.
number of columns in the field (read-only)
Definition at line 38 of file field_bones.hpp.
number of elements in the field (read-only)
Definition at line 39 of file field_bones.hpp.
number of rows in the field (read-only)
Definition at line 37 of file field_bones.hpp.