FIMS  v0.9.3
Loading...
Searching...
No Matches
model_object.hpp
Go to the documentation of this file.
1
9#ifndef FIMS_COMMON_MODEL_OBJECT_HPP
10#define FIMS_COMMON_MODEL_OBJECT_HPP
11
12#include <stdint.h>
13
14#include <vector>
15
16#include "fims_vector.hpp"
17
18namespace fims_model_object {
19
23template <typename Type>
24struct FIMSObject {
25 uint32_t id;
26 std::vector<Type*> parameters;
27 std::vector<Type*>
29 std::vector<Type*>
32 virtual ~FIMSObject() {}
33
37 uint32_t GetId() const { return id; }
38
47 inline bool CheckDimensions(size_t actual, size_t expected) {
48 if (actual != expected) {
49 return false;
50 }
51
52 return true;
53 }
54};
55
56} // namespace fims_model_object
57
58#endif /* FIMS_COMMON_MODEL_OBJECT_HPP */
Establishes the FIMS Vector class.
FIMSObject struct that defines member types and returns the unique id.
Definition model_object.hpp:24
uint32_t id
Definition model_object.hpp:25
uint32_t GetId() const
Getter that returns the unique id for parameters in the model.
Definition model_object.hpp:37
bool CheckDimensions(size_t actual, size_t expected)
Check the dimensions of an object.
Definition model_object.hpp:47
std::vector< Type * > random_effects_parameters
Definition model_object.hpp:28
std::vector< Type * > parameters
Definition model_object.hpp:26
std::vector< Type * > fixed_effects_parameters
Definition model_object.hpp:30