10#ifndef FIMS_COMMON_DATA_OBJECT_HPP
11#define FIMS_COMMON_DATA_OBJECT_HPP
19namespace fims_data_object {
24template <
typename Type>
87 inline Type&
at(
size_t i) {
88 if (i >= this->data.
size()) {
89 throw std::overflow_error(
"DataObject error:i index out of bounds");
111 inline Type&
at(
size_t i,
size_t j) {
112 if ((i *
jmax + j) >= this->data.
size()) {
113 throw std::overflow_error(
"DataObject error: index out of bounds");
137 inline Type&
at(
size_t i,
size_t j,
size_t k) {
139 throw std::overflow_error(
"DataObject error: index out of bounds");
152 inline const Type
operator()(
size_t i,
size_t j,
size_t k,
size_t l) {
165 inline Type&
at(
size_t i,
size_t j,
size_t k,
size_t l) {
168 throw std::overflow_error(
"DataObject error: index out of bounds");
209template <
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:178
Type & at(size_t i, size_t j, size_t k)
Definition data_object.hpp:137
size_t lmax
Definition data_object.hpp:33
Type operator()(size_t i)
Definition data_object.hpp:79
size_t get_imax() const
Get the imax object.
Definition data_object.hpp:185
size_t kmax
Definition data_object.hpp:32
const Type operator()(size_t i, size_t j)
Definition data_object.hpp:100
DataObject(size_t imax, size_t jmax, size_t kmax)
Definition data_object.hpp:57
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:125
size_t get_jmax() const
Get the jmax object.
Definition data_object.hpp:192
fims::Vector< Type > data
Definition data_object.hpp:27
size_t get_lmax() const
Get the lmax object.
Definition data_object.hpp:206
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:67
DataObject(size_t imax, size_t jmax)
Definition data_object.hpp:48
const Type operator()(size_t i, size_t j, size_t k, size_t l)
Definition data_object.hpp:152
Type & at(size_t i, size_t j, size_t k, size_t l)
Definition data_object.hpp:165
Type & at(size_t i)
Definition data_object.hpp:87
size_t get_kmax() const
Get the kmax object.
Definition data_object.hpp:199
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:111
FIMSObject struct that defines member types and returns the unique id.
Definition model_object.hpp:25