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