FIMS  v0.8.0
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
61 std::map<std::string, fims::Vector<fims::Vector<Type>>>& report_vectors) {
62 }
69 std::map<std::string, size_t>& report_vector_count) {}
70};
71
72} // namespace fims_model_object
73
74#endif /* FIMS_COMMON_MODEL_OBJECT_HPP */
Definition fims_vector.hpp:27
Creates pre-processing macros such as what type of machine you are on and creates the log information...
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
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 U...
Definition model_object.hpp:68
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 FisheryMode...
Definition model_object.hpp:60
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