nodes_value_containers.hpp 815 Bytes
Newer Older
Thomas Purcell's avatar
Thomas Purcell committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef NODE_VALEU_ARR
#define NODE_VALEU_ARR

#include <memory>
#include <vector>

#include<utils/enum.hpp>

namespace node_value_arrs
{
    extern int N_SAMPLES;
    extern int N_STORE_FEATURES;
    extern int N_RUNGS_STORED;

    extern std::vector<double> VALUES_ARR;
    extern std::vector<double> TEMP_STORAGE_ARR;

    int get_number_new_features(NODE_TYPE new_op, int n_current_features);

    int get_max_number_features(std::vector<NODE_TYPE> allowed_operators, int n_dims, int n_feats);

    void setup_values_arr(int n_samples, int n_dims, int n_primary_feat, std::vector<NODE_TYPE> allowed_operators);

    inline double* access_value_arr(int feature_ind){return &VALUES_ARR[feature_ind*N_SAMPLES];}

    inline double* access_temp_storage(int slot){return &TEMP_STORAGE_ARR[slot*N_SAMPLES];}
}

#endif