FIMS  v0.8.0
Loading...
Searching...
No Matches
fims_data_object::DataObject< Type > Struct Template Reference

#include <data_object.hpp>

Inheritance diagram for fims_data_object::DataObject< Type >:
fims_model_object::FIMSObject< Type >

Public Member Functions

 DataObject (size_t imax)
 
 DataObject (size_t imax, size_t jmax)
 
 DataObject (size_t imax, size_t jmax, size_t kmax)
 
 DataObject (size_t imax, size_t jmax, size_t kmax, size_t lmax)
 
Type operator() (size_t i)
 
Typeat (size_t i)
 
const Type operator() (size_t i, size_t j)
 
Typeat (size_t i, size_t j)
 
const Type operator() (size_t i, size_t j, size_t k)
 
Typeat (size_t i, size_t j, size_t k)
 
const Type operator() (size_t i, size_t j, size_t k, size_t l)
 
Typeat (size_t i, size_t j, size_t k, size_t l)
 
size_t get_dimensions () const
 Get the dimensions object.
 
size_t get_imax () const
 Get the imax object.
 
size_t get_jmax () const
 Get the jmax object.
 
size_t get_kmax () const
 Get the kmax object.
 
size_t get_lmax () const
 Get the lmax object.
 
- Public Member Functions inherited from fims_model_object::FIMSObject< Type >
uint32_t GetId () const
 Getter that returns the unique id for parameters in the model.
 
bool CheckDimensions (size_t actual, size_t expected)
 Check the dimensions of an object.
 
virtual void create_report_vectors (std::map< std::string, fims::Vector< fims::Vector< Type > > > &report_vectors)
 Create a map of report vectors for the object. used to populate the report_vectors map in FisheryModelBase.
 
virtual void get_report_vector_count (std::map< std::string, size_t > &report_vector_count)
 Get the report vector count object. used to get the length of each report vector for populating the UncertaintyReportInfo struct in FisheryModelBase.
 

Public Attributes

fims::Vector< Typedata
 
fims::Vector< Typeuncertainty
 
size_t dimensions
 
size_t imax
 
size_t jmax
 
size_t kmax
 
size_t lmax
 
Type na_value = static_cast<Type>(-999)
 
- Public Attributes inherited from fims_model_object::FIMSObject< Type >
uint32_t id
 
std::vector< Type * > parameters
 
std::vector< Type * > random_effects_parameters
 
std::vector< Type * > fixed_effects_parameters
 

Static Public Attributes

static uint32_t id_g = 0
 

Detailed Description

template<typename Type>
struct fims_data_object::DataObject< Type >

Container to hold user supplied data.

Constructor & Destructor Documentation

◆ DataObject() [1/4]

template<typename Type >
fims_data_object::DataObject< Type >::DataObject ( size_t  imax)
inline

Constructs a one-dimensional data object.

◆ DataObject() [2/4]

template<typename Type >
fims_data_object::DataObject< Type >::DataObject ( size_t  imax,
size_t  jmax 
)
inline

Constructs a two-dimensional data object.

◆ DataObject() [3/4]

template<typename Type >
fims_data_object::DataObject< Type >::DataObject ( size_t  imax,
size_t  jmax,
size_t  kmax 
)
inline

Constructs a three-dimensional data object.

◆ DataObject() [4/4]

template<typename Type >
fims_data_object::DataObject< Type >::DataObject ( size_t  imax,
size_t  jmax,
size_t  kmax,
size_t  lmax 
)
inline

Constructs a four-dimensional data object.

Member Function Documentation

◆ at() [1/4]

template<typename Type >
Type & fims_data_object::DataObject< Type >::at ( size_t  i)
inline

Retrieve element from 1d data set. Throws an exception if index is out of bounds.

Parameters
idimension of 1d data set
Returns
the reference to the value of the vector at position i

◆ at() [2/4]

template<typename Type >
Type & fims_data_object::DataObject< Type >::at ( size_t  i,
size_t  j 
)
inline

Retrieve element from 2d data set. Throws an exception if index is out of bounds.

Parameters
i1st dimension of 2d data set
j2nd dimension of 2d data set
Returns
the reference to the value of the matrix at position i, j

◆ at() [3/4]

template<typename Type >
Type & fims_data_object::DataObject< Type >::at ( size_t  i,
size_t  j,
size_t  k 
)
inline

Retrieve element from 3d data set. Throws an exception if index is out of bounds.

Parameters
i1st dimension of 3d data set
j2nd dimension of 3d data set
k3rd dimension of 3d data set
Returns
the reference to the value of the array at position i, j, k

◆ at() [4/4]

template<typename Type >
Type & fims_data_object::DataObject< Type >::at ( size_t  i,
size_t  j,
size_t  k,
size_t  l 
)
inline

Retrieve element from 3d data set. Throws an exception if index is out of bounds.

Parameters
i1st dimension of 4d data set
j2nd dimension of 4d data set
k3rd dimension of 4d data set
l4th dimension of 4d data set
Returns
the reference to the value of the array at position i, j, k, l

◆ get_dimensions()

template<typename Type >
size_t fims_data_object::DataObject< Type >::get_dimensions ( ) const
inline

Get the dimensions object.

Returns
size_t

◆ get_imax()

template<typename Type >
size_t fims_data_object::DataObject< Type >::get_imax ( ) const
inline

Get the imax object.

Returns
size_t

◆ get_jmax()

template<typename Type >
size_t fims_data_object::DataObject< Type >::get_jmax ( ) const
inline

Get the jmax object.

Returns
size_t

◆ get_kmax()

template<typename Type >
size_t fims_data_object::DataObject< Type >::get_kmax ( ) const
inline

Get the kmax object.

Returns
size_t

◆ get_lmax()

template<typename Type >
size_t fims_data_object::DataObject< Type >::get_lmax ( ) const
inline

Get the lmax object.

Returns
size_t

◆ operator()() [1/4]

Retrieve element from 1d data set.

Parameters
idimension of 1d data set
Returns
the value of the vector at position i

◆ operator()() [2/4]

Retrieve element from 2d data set.

Parameters
i1st dimension of 2d data set
j2nd dimension of 2d data set
Returns
the value of the matrix at position i, j

◆ operator()() [3/4]

Retrieve element from 3d data set.

Parameters
i1st dimension of 3d data set
j2nd dimension of 3d data set
k3rd dimension of 3d data set
Returns
the value of the array at position i, j, k

◆ operator()() [4/4]

template<typename Type >
const Type fims_data_object::DataObject< Type >::operator() ( size_t  i,
size_t  j,
size_t  k,
size_t  l 
)
inline

Retrieve element from 4d data set.

Parameters
i1st dimension of 4d data set
j2nd dimension of 4d data set
k3rd dimension of 4d data set
l4th dimension of 4d data set
Returns
the value of the array at position i, j, k, l

Member Data Documentation

◆ data

vector of the data >

◆ dimensions

dimension of the Data object >

◆ id_g

template<typename Type >
uint32_t fims_data_object::DataObject< Type >::id_g = 0
static

id of the Data Object >

◆ imax

1st dimension of data object >

◆ jmax

2nd dimension of data object>

◆ kmax

3rd dimension of data object>

◆ lmax

4th dimension of data object>

◆ na_value

specifying the NA value >

◆ uncertainty

vector of the data >


The documentation for this struct was generated from the following file: