|
Particle Identification and Tracking
|
Wrapper class for dealing with data from matlab. More...
#include <wrapper_i_matlab.h>
Inheritance diagram for utilities::Wrapper_i_matlab:
Collaboration diagram for utilities::Wrapper_i_matlab:Public Member Functions | |
| bool | contains_type (D_TYPE type) const |
| Returns if the wrapper contains the specified data type. | |
| std::set< utilities::D_TYPE > | get_data_types () const |
| Returns a set of the data types. | |
| void | get_data_types (std::set< utilities::D_TYPE > &) const |
| Tuplef | get_dims () const |
| Returns the dimension of each 'frame' of the data in the wrapper. | |
| int | get_num_entries () const |
| Return the total number of entries in the wrapper. | |
| int | get_num_entries (unsigned int frame) const |
| Return the number of entries the specified frame. | |
| int | get_num_frames () const |
| Return the number of frames. | |
| int | get_value (int &out, int ind, D_TYPE type, int frame) const |
| Returns the value of the type specified from the particle selected. | |
| float | get_value (float &out, int ind, D_TYPE type, int frame) const |
| Returns the value of the type specified from the particle selected. | |
| std::complex< float > | get_value (std::complex< float > &out, int ind, D_TYPE type, int frame) const |
| Returns the value of the type specified from the particle selected. | |
| void | print () const |
| Wrapper_i_matlab (const mxArray **mex_array, std::map< utilities::D_TYPE, int > contents, Tuplef dims) | |
| ~Wrapper_i_matlab () | |
Meta data handling functions | |
| const Md_store * | get_Md_store (unsigned int j) const |
| Returns a pointer to plane j's meta data store. | |
| Md_store * | get_Md_store (unsigned int j) |
| Returns a pointer to plane j's meta data store. | |
| void | set_Md_store (unsigned int j, Md_store *in) |
| Sets the Md_store for plane j. | |
| void | set_Md_store_size (unsigned int j) |
| Sets the size of the md_stores_ vector. | |
| unsigned int | get_Md_store_size () |
| Gets the size of the md_stores_ vector. | |
| void | clear_Md_store (unsigned int j) |
| Deletes plane j's Md_store. | |
Private Member Functions | |
| float | get_value (int ind, utilities::D_TYPE type, int junk) const |
| internal get_value | |
| void | init () |
| internal initialization | |
Private Attributes | |
| int | cols_ |
| The number of columns (and hence number of values in the array. | |
| Data_map | data_map_ |
| object for fast lookup | |
| std::map< utilities::D_TYPE, int > | data_types_ |
| A map between the data types and a posistion in the data structure. | |
| Tuplef | dims_ |
| Dimensions. | |
| const double * | first_ |
| anchor to data with in array | |
| std::vector< unsigned int > | frame_offsets_ |
| Offsets of which row each set of frames starts on. | |
| int | frames_ |
| The number of frames in the wrapper. | |
| const mxArray ** | mex_array_ |
| Pointer to matlab array that holds the data. | |
| int | rows_ |
| The number of rows in the array. | |
Wrapper class for dealing with data from matlab.
References first_.
| Wrapper_i_matlab::Wrapper_i_matlab | ( | const mxArray ** | mex_array, |
| std::map< utilities::D_TYPE, int > | contents, | ||
| Tuplef | dims | ||
| ) |
References utilities::D_FRAME, data_map_, utilities::DT2str_s(), first_, frame_offsets_, frames_, and rows_.
| void Wrapper_in::clear_Md_store | ( | unsigned int | j | ) | [inherited] |
Deletes plane j's Md_store.
References utilities::Wrapper_in::md_stores_.
| bool Wrapper_i_matlab::contains_type | ( | D_TYPE | type | ) | const [virtual] |
Returns if the wrapper contains the specified data type.
Implements utilities::Wrapper_in.
References data_types_.
| std::set< utilities::D_TYPE > Wrapper_i_matlab::get_data_types | ( | ) | const [virtual] |
Returns a set of the data types.
Use the other version
Implements utilities::Wrapper_in.
References data_types_.
Referenced by get_data_types().
| void Wrapper_i_matlab::get_data_types | ( | std::set< utilities::D_TYPE > & | out | ) | const |
References get_data_types().
| Tuplef Wrapper_i_matlab::get_dims | ( | ) | const [virtual] |
Returns the dimension of each 'frame' of the data in the wrapper.
Implements utilities::Wrapper_in.
References dims_.
| const Md_store * Wrapper_in::get_Md_store | ( | unsigned int | j | ) | const [inherited] |
Returns a pointer to plane j's meta data store.
Const version
References utilities::Wrapper_in::md_stores_.
Referenced by tracking::Master_box::get_Md_store(), and tracking::hash_case::init().
| Md_store * Wrapper_in::get_Md_store | ( | unsigned int | j | ) | [inherited] |
Returns a pointer to plane j's meta data store.
Const version
References utilities::Wrapper_in::md_stores_.
| unsigned int Wrapper_in::get_Md_store_size | ( | ) | [inherited] |
Gets the size of the md_stores_ vector.
References utilities::Wrapper_in::md_stores_.
| int Wrapper_i_matlab::get_num_entries | ( | ) | const [virtual] |
Return the total number of entries in the wrapper.
Implements utilities::Wrapper_in.
References rows_.
| int Wrapper_i_matlab::get_num_entries | ( | unsigned int | frame | ) | const [virtual] |
Return the number of entries the specified frame.
Implements utilities::Wrapper_in.
References frame_offsets_.
| int Wrapper_i_matlab::get_num_frames | ( | ) | const [virtual] |
| float Wrapper_i_matlab::get_value | ( | int | ind, |
| utilities::D_TYPE | type, | ||
| int | junk | ||
| ) | const [private] |
internal get_value
References data_map_, utilities::DT2str_s(), first_, frame_offsets_, and rows_.
Referenced by get_value().
| int Wrapper_i_matlab::get_value | ( | int & | out, |
| int | ind, | ||
| D_TYPE | type, | ||
| int | frame | ||
| ) | const [virtual] |
Returns the value of the type specified from the particle selected.
| out | [out] the value |
| ind | [in] the index of the particle |
| type | [in] the D_TYPE |
| frame | [in] the frame the particle is in |
Implements utilities::Wrapper_in.
References get_value().
| float Wrapper_i_matlab::get_value | ( | float & | out, |
| int | ind, | ||
| D_TYPE | type, | ||
| int | frame | ||
| ) | const [virtual] |
Returns the value of the type specified from the particle selected.
| out | [out] the value |
| ind | [in] the index of the particle |
| type | [in] the D_TYPE |
| frame | [in] the frame the particle is in |
Implements utilities::Wrapper_in.
References get_value().
| complex< float > Wrapper_i_matlab::get_value | ( | std::complex< float > & | out, |
| int | ind, | ||
| D_TYPE | type, | ||
| int | frame | ||
| ) | const [virtual] |
Returns the value of the type specified from the particle selected.
| out | [out] the value |
| ind | [in] the index of the particle |
| type | [in] the D_TYPE |
| frame | [in] the frame the particle is in |
Implements utilities::Wrapper_in.
| void utilities::Wrapper_i_matlab::init | ( | ) | [private] |
internal initialization
| void Wrapper_i_matlab::print | ( | ) | const |
| void Wrapper_in::set_Md_store | ( | unsigned int | j, |
| Md_store * | in | ||
| ) | [inherited] |
Sets the Md_store for plane j.
When the pointer is assigned the wrapper takes ownership of the pointer and will clean it up.
References utilities::Wrapper_in::md_stores_.
Referenced by iden::Iden::fill_wrapper(), iden::Iden::fill_wrapper_avg(), main(), and utilities::Wrapper_i_hdf::priv_init().
| void Wrapper_in::set_Md_store_size | ( | unsigned int | j | ) | [inherited] |
Sets the size of the md_stores_ vector.
References utilities::Wrapper_in::md_stores_.
Referenced by iden::Iden::fill_wrapper(), iden::Iden::fill_wrapper_avg(), main(), and utilities::Wrapper_i_hdf::priv_init().
int utilities::Wrapper_i_matlab::cols_ [private] |
The number of columns (and hence number of values in the array.
This isn't strictly needed, hoever it should make returning values faster by amoritizing the dereference cost, maybe
Referenced by print().
object for fast lookup
Referenced by get_value(), and Wrapper_i_matlab().
std::map<utilities::D_TYPE, int> utilities::Wrapper_i_matlab::data_types_ [private] |
A map between the data types and a posistion in the data structure.
This orginally had been burried down in the derived classes, but I couldn't think of a data structure for storing particle data where this sort of thing wasn't uesful. Thus, it has been dragged up to the top level.
Referenced by contains_type(), and get_data_types().
Tuplef utilities::Wrapper_i_matlab::dims_ [private] |
Dimensions.
Referenced by get_dims().
const double* utilities::Wrapper_i_matlab::first_ [private] |
anchor to data with in array
Referenced by get_value(), Wrapper_i_matlab(), and ~Wrapper_i_matlab().
std::vector<unsigned int> utilities::Wrapper_i_matlab::frame_offsets_ [private] |
Offsets of which row each set of frames starts on.
This is needed because of the way that locations are stored in matlab vs how they are stored in hdf files.
Referenced by get_num_entries(), get_value(), and Wrapper_i_matlab().
int utilities::Wrapper_i_matlab::frames_ [private] |
The number of frames in the wrapper.
Referenced by get_num_frames(), and Wrapper_i_matlab().
const mxArray** utilities::Wrapper_i_matlab::mex_array_ [private] |
Pointer to matlab array that holds the data.
int utilities::Wrapper_i_matlab::rows_ [private] |
The number of rows in the array.
This isn't strictly needed, hoever it should make returning values faster by amoritizing the dereference cost, maybe
Referenced by get_num_entries(), get_value(), print(), and Wrapper_i_matlab().
1.7.6.1