10#ifndef FIMS_COMMON_DATA_OBJECT_HPP
11#define FIMS_COMMON_DATA_OBJECT_HPP
19namespace fims_data_object {
24template <
typename Type>
91 inline Type&
at(
size_t i) {
92 if (i >= this->data.
size()) {
93 throw std::overflow_error(
"DataObject error:i index out of bounds");
115 inline Type&
at(
size_t i,
size_t j) {
116 if ((i *
jmax + j) >= this->data.
size()) {
117 throw std::overflow_error(
"DataObject error: index out of bounds");
141 inline Type&
at(
size_t i,
size_t j,
size_t k) {
143 throw std::overflow_error(
"DataObject error: index out of bounds");
156 inline const Type
operator()(
size_t i,
size_t j,
size_t k,
size_t l) {
169 inline Type&
at(
size_t i,
size_t j,
size_t k,
size_t l) {
172 throw std::overflow_error(
"DataObject error: index out of bounds");
213template <
typename Type>
Definition fims_vector.hpp:27
size_type size() const
Returns the number of elements.
Definition fims_vector.hpp:273
Establishes the FIMS Vector class.
Definition of the FIMSObject structure.
Definition data_object.hpp:25
size_t get_dimensions() const
Get the dimensions object.
Definition data_object.hpp:182
Type & at(size_t i, size_t j, size_t k)
Definition data_object.hpp:141
size_t lmax
Definition data_object.hpp:33
Type operator()(size_t i)
Definition data_object.hpp:83
size_t get_imax() const
Get the imax object.
Definition data_object.hpp:189
size_t kmax
Definition data_object.hpp:32
const Type operator()(size_t i, size_t j)
Definition data_object.hpp:104
DataObject(size_t imax, size_t jmax, size_t kmax)
Definition data_object.hpp:59
fims::Vector< Type > uncertainty
Definition data_object.hpp:28
const Type operator()(size_t i, size_t j, size_t k)
Definition data_object.hpp:129
size_t get_jmax() const
Get the jmax object.
Definition data_object.hpp:196
fims::Vector< Type > data
Definition data_object.hpp:27
size_t get_lmax() const
Get the lmax object.
Definition data_object.hpp:210
Type na_value
Definition data_object.hpp:34
DataObject(size_t imax)
Definition data_object.hpp:39
size_t imax
Definition data_object.hpp:30
DataObject(size_t imax, size_t jmax, size_t kmax, size_t lmax)
Definition data_object.hpp:70
DataObject(size_t imax, size_t jmax)
Definition data_object.hpp:49
const Type operator()(size_t i, size_t j, size_t k, size_t l)
Definition data_object.hpp:156
Type & at(size_t i, size_t j, size_t k, size_t l)
Definition data_object.hpp:169
Type & at(size_t i)
Definition data_object.hpp:91
size_t get_kmax() const
Get the kmax object.
Definition data_object.hpp:203
size_t dimensions
Definition data_object.hpp:29
size_t jmax
Definition data_object.hpp:31
static uint32_t id_g
Definition data_object.hpp:26
Type & at(size_t i, size_t j)
Definition data_object.hpp:115
void register_self(const uint32_t id)
Registers a FIMSObject instance with the memory tracker.
Definition model_object.hpp:35
FIMSObject struct that defines member types and returns the unique id.
Definition model_object.hpp:55