FIMS  v0.9.2
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 "def.hpp"
17#include "fims_vector.hpp"
18
19namespace fims_model_object {
20
24template <typename Type>
25struct FIMSObject {
26 uint32_t id;
27 std::vector<Type*> parameters;
28 std::vector<Type*>
30 std::vector<Type*>
33 virtual ~FIMSObject() {}
34
38 uint32_t GetId() const { return id; }
39
48 inline bool CheckDimensions(size_t actual, size_t expected) {
49 if (actual != expected) {
50 return false;
51 }
52
53 return true;
54 }
55};
56
57} // namespace fims_model_object
58
59#endif /* FIMS_COMMON_MODEL_OBJECT_HPP */
Platform macros and the core FIMS logging system.
Establishes the FIMS Vector class.
FIMSObject struct that defines member types and returns the unique id.
Definition model_object.hpp:25
uint32_t id
Definition model_object.hpp:26
uint32_t GetId() const
Getter that returns the unique id for parameters in the model.
Definition model_object.hpp:38
bool CheckDimensions(size_t actual, size_t expected)
Check the dimensions of an object.
Definition model_object.hpp:48
std::vector< Type * > random_effects_parameters
Definition model_object.hpp:29
std::vector< Type * > parameters
Definition model_object.hpp:27
std::vector< Type * > fixed_effects_parameters
Definition model_object.hpp:31