From c6892407b65f82b1f09b718a705ba48ddb903ed7 Mon Sep 17 00:00:00 2001 From: Thomas <purcell@fhi-berlin.mpg.de> Date: Sun, 21 Mar 2021 20:21:30 +0100 Subject: [PATCH] Make feat_inds a unsigned long int to avoid int overflow int overflows are leading to issues --- .../feature_space/FeatureSpace.cpp | 9 ++++----- .../feature_space/FeatureSpace.hpp | 2 +- src/feature_creation/node/FeatureNode.cpp | 2 +- src/feature_creation/node/FeatureNode.hpp | 6 +++--- src/feature_creation/node/ModelNode.cpp | 2 +- src/feature_creation/node/ModelNode.hpp | 2 +- src/feature_creation/node/Node.cpp | 2 +- src/feature_creation/node/Node.hpp | 14 +++++++------- .../node/operator_nodes/OperatorNode.hpp | 2 +- .../abs/absolute_value.cpp | 6 +++--- .../abs/absolute_value.hpp | 6 +++--- .../abs_diff/absolute_difference.cpp | 6 +++--- .../abs_diff/absolute_difference.hpp | 6 +++--- .../allowed_operator_nodes/add/add.cpp | 6 +++--- .../allowed_operator_nodes/add/add.hpp | 6 +++--- .../allowed_operator_nodes/cb/cube.cpp | 6 +++--- .../allowed_operator_nodes/cb/cube.hpp | 6 +++--- .../allowed_operator_nodes/cbrt/cube_root.cpp | 6 +++--- .../allowed_operator_nodes/cbrt/cube_root.hpp | 6 +++--- .../allowed_operator_nodes/cos/cos.cpp | 6 +++--- .../allowed_operator_nodes/cos/cos.hpp | 6 +++--- .../allowed_operator_nodes/div/divide.cpp | 6 +++--- .../allowed_operator_nodes/div/divide.hpp | 6 +++--- .../allowed_operator_nodes/exp/exponential.cpp | 6 +++--- .../allowed_operator_nodes/exp/exponential.hpp | 6 +++--- .../allowed_operator_nodes/inv/inverse.cpp | 6 +++--- .../allowed_operator_nodes/inv/inverse.hpp | 6 +++--- .../allowed_operator_nodes/log/log.cpp | 6 +++--- .../allowed_operator_nodes/log/log.hpp | 6 +++--- .../allowed_operator_nodes/mult/multiply.cpp | 6 +++--- .../allowed_operator_nodes/mult/multiply.hpp | 6 +++--- .../neg_exp/negative_exponential.cpp | 6 +++--- .../neg_exp/negative_exponential.hpp | 6 +++--- .../allowed_operator_nodes/sin/sin.cpp | 6 +++--- .../allowed_operator_nodes/sin/sin.hpp | 6 +++--- .../allowed_operator_nodes/sp/sixth_power.cpp | 6 +++--- .../allowed_operator_nodes/sp/sixth_power.hpp | 6 +++--- .../allowed_operator_nodes/sq/square.cpp | 6 +++--- .../allowed_operator_nodes/sq/square.hpp | 6 +++--- .../allowed_operator_nodes/sqrt/square_root.cpp | 6 +++--- .../allowed_operator_nodes/sqrt/square_root.hpp | 6 +++--- .../allowed_operator_nodes/sub/subtract.cpp | 6 +++--- .../allowed_operator_nodes/sub/subtract.hpp | 6 +++--- .../node/operator_nodes/allowed_ops.hpp | 4 ++-- src/feature_creation/node/utils.cpp | 6 +++--- src/feature_creation/node/utils.hpp | 4 ++-- .../value_storage/nodes_value_containers.cpp | 4 ++-- .../value_storage/nodes_value_containers.hpp | 16 ++++++++-------- src/python/bindings_docstring_keyed.cpp | 4 ++-- src/python/feature_creation/FeatureNode.cpp | 4 ++-- .../feature_generation/test_abs_diff_node.cc | 4 ++-- .../feature_generation/test_abs_node.cc | 4 ++-- .../feature_generation/test_add_node.cc | 4 ++-- .../feature_generation/test_cb_node.cc | 4 ++-- .../feature_generation/test_cbrt_node.cc | 4 ++-- .../feature_generation/test_cos_node.cc | 4 ++-- .../feature_generation/test_div_node.cc | 4 ++-- .../feature_generation/test_exp_node.cc | 4 ++-- .../feature_generation/test_inv_node.cc | 4 ++-- .../feature_generation/test_log_node.cc | 4 ++-- .../feature_generation/test_mult_node.cc | 4 ++-- .../feature_generation/test_neg_exp_node.cc | 4 ++-- .../feature_generation/test_sin_node.cc | 4 ++-- .../feature_generation/test_six_pow_node.cc | 4 ++-- .../feature_generation/test_sq_node.cc | 4 ++-- .../feature_generation/test_sqrt_node.cc | 4 ++-- .../feature_generation/test_sub_node.cc | 4 ++-- .../feature_creation/utils/test_utils.cc | 2 +- 68 files changed, 178 insertions(+), 179 deletions(-) diff --git a/src/feature_creation/feature_space/FeatureSpace.cpp b/src/feature_creation/feature_space/FeatureSpace.cpp index 0827d4e9..95cfb09d 100644 --- a/src/feature_creation/feature_space/FeatureSpace.cpp +++ b/src/feature_creation/feature_space/FeatureSpace.cpp @@ -130,9 +130,9 @@ void FeatureSpace::initialize_fs(std::vector<double> prop, std::string project_t _scores.resize(_phi.size()); } -void FeatureSpace::generate_new_feats(std::vector<node_ptr>::iterator& feat, std::vector<node_ptr>& feat_set, int& feat_ind, double l_bound, double u_bound) +void FeatureSpace::generate_new_feats(std::vector<node_ptr>::iterator& feat, std::vector<node_ptr>& feat_set, unsigned long int& feat_ind, double l_bound, double u_bound) { - int phi_ind = feat - _phi.begin(); + unsigned long int phi_ind = feat - _phi.begin(); feat_set.reserve(feat_set.size() + _un_operators.size() + phi_ind * (_com_bin_operators.size() + 2 * _bin_operators.size())); for(auto& op : _un_operators) @@ -171,7 +171,7 @@ void FeatureSpace::generate_feature_space(std::vector<double>& prop) std::vector<node_ptr> next_phi; _n_feat = _phi.size(); - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); node_value_arrs::clear_temp_reg(); double start = omp_get_wtime(); @@ -450,11 +450,10 @@ void FeatureSpace::project_generated(double* prop, int size, std::vector<node_pt std::vector<node_ptr> phi_sel_private(phi_sel); std::vector<double> scores_sel_private(scores_sel); - int feat_ind = _phi.size(); - #pragma omp for schedule(dynamic) for(auto feat = _phi.begin() + _start_gen.back() + _mpi_comm->rank(); feat < _phi.end(); feat += _mpi_comm->size()) { + unsigned long int feat_ind = _phi.size(); node_value_arrs::clear_temp_reg_thread(); std::vector<node_ptr> generated_phi; generate_new_feats(feat, generated_phi, feat_ind, _l_bound, _u_bound); diff --git a/src/feature_creation/feature_space/FeatureSpace.hpp b/src/feature_creation/feature_space/FeatureSpace.hpp index f0f554f6..8f221683 100644 --- a/src/feature_creation/feature_space/FeatureSpace.hpp +++ b/src/feature_creation/feature_space/FeatureSpace.hpp @@ -215,7 +215,7 @@ public: * @param l_bound lower bound for the absolute value of the feature * @param u_bound upper bound for the abosulte value of the feature */ - void generate_new_feats(std::vector<node_ptr>::iterator& feat, std::vector<node_ptr>& feat_set, int& feat_ind, double l_bound=1e-50, double u_bound=1e50); + void generate_new_feats(std::vector<node_ptr>::iterator& feat, std::vector<node_ptr>& feat_set, unsigned long int& feat_ind, double l_bound=1e-50, double u_bound=1e50); /** * @brief Calculate the SIS Scores for feature generated on the fly diff --git a/src/feature_creation/node/FeatureNode.cpp b/src/feature_creation/node/FeatureNode.cpp index 1145a4f2..af95eca7 100644 --- a/src/feature_creation/node/FeatureNode.cpp +++ b/src/feature_creation/node/FeatureNode.cpp @@ -3,7 +3,7 @@ FeatureNode::FeatureNode() {} -FeatureNode::FeatureNode(int feat_ind, std::string expr, std::vector<double> value, std::vector<double> test_value, Unit unit, bool set_val) : +FeatureNode::FeatureNode(unsigned long int feat_ind, std::string expr, std::vector<double> value, std::vector<double> test_value, Unit unit, bool set_val) : Node(feat_ind, value.size(), test_value.size()), _value(value), _test_value(test_value), diff --git a/src/feature_creation/node/FeatureNode.hpp b/src/feature_creation/node/FeatureNode.hpp index 5c09ee5b..edb15caa 100644 --- a/src/feature_creation/node/FeatureNode.hpp +++ b/src/feature_creation/node/FeatureNode.hpp @@ -70,7 +70,7 @@ public: * @param value Value of the feature for each test sample * @param unit Unit of the feature */ - FeatureNode(int feat_ind, std::string expr, std::vector<double> value, std::vector<double> test_value, Unit unit, bool set_val = true); + FeatureNode(unsigned long int feat_ind, std::string expr, std::vector<double> value, std::vector<double> test_value, Unit unit, bool set_val = true); #ifdef PY_BINDINGS /** * @brief Constructs a feature node using numpy arrays (cpp definition in <python/feature_creation/FeatureNode.cpp) @@ -81,7 +81,7 @@ public: * @param value Value of the feature for each test sample * @param unit Unit of the feature */ - FeatureNode(int feat_ind, std::string expr, np::ndarray value, np::ndarray test_value, Unit unit); + FeatureNode(unsigned long int feat_ind, std::string expr, np::ndarray value, np::ndarray test_value, Unit unit); /** * @brief Constructs a feature node using Python lists (cpp definition in <python/feature_creation/FeatureNode.cpp) @@ -92,7 +92,7 @@ public: * @param value Value of the feature for each test sample * @param unit Unit of the feature */ - FeatureNode(int feat_ind, std::string expr, py::list value, py::list test_value, Unit unit); + FeatureNode(unsigned long int feat_ind, std::string expr, py::list value, py::list test_value, Unit unit); #endif /** diff --git a/src/feature_creation/node/ModelNode.cpp b/src/feature_creation/node/ModelNode.cpp index e4ea9cc0..3083d46f 100644 --- a/src/feature_creation/node/ModelNode.cpp +++ b/src/feature_creation/node/ModelNode.cpp @@ -3,7 +3,7 @@ ModelNode::ModelNode() {} -ModelNode::ModelNode(int feat_ind, int rung, std::string expr, std::string latex_expr, std::string post_fix_expr, std::vector<double> value, std::vector<double> test_value, Unit unit) : +ModelNode::ModelNode(unsigned long int feat_ind, int rung, std::string expr, std::string latex_expr, std::string post_fix_expr, std::vector<double> value, std::vector<double> test_value, Unit unit) : FeatureNode(feat_ind, expr, value, test_value, unit, false), _value_svm(_n_samp), _test_value_svm(_n_test_samp), diff --git a/src/feature_creation/node/ModelNode.hpp b/src/feature_creation/node/ModelNode.hpp index 7a390296..28cd02d3 100644 --- a/src/feature_creation/node/ModelNode.hpp +++ b/src/feature_creation/node/ModelNode.hpp @@ -64,7 +64,7 @@ public: * @param value Value of the feature for each test sample * @param unit Unit of the feature */ - ModelNode(int feat_ind, int rung, std::string expr, std::string latex_expr, std::string expr_postfix, std::vector<double> value, std::vector<double> test_value, Unit unit); + ModelNode(unsigned long int feat_ind, int rung, std::string expr, std::string latex_expr, std::string expr_postfix, std::vector<double> value, std::vector<double> test_value, Unit unit); /** * @brief Copy Constructor diff --git a/src/feature_creation/node/Node.cpp b/src/feature_creation/node/Node.cpp index 22432f60..ef0ba34a 100644 --- a/src/feature_creation/node/Node.cpp +++ b/src/feature_creation/node/Node.cpp @@ -3,7 +3,7 @@ Node::Node() {} -Node::Node(int feat_ind, int n_samp, int n_test_samp) : +Node::Node(unsigned long int feat_ind, int n_samp, int n_test_samp) : _n_test_samp(n_test_samp), _n_samp(n_samp), _feat_ind(feat_ind), diff --git a/src/feature_creation/node/Node.hpp b/src/feature_creation/node/Node.hpp index 0e86e69a..084d59a2 100644 --- a/src/feature_creation/node/Node.hpp +++ b/src/feature_creation/node/Node.hpp @@ -61,8 +61,8 @@ class Node protected: int _n_test_samp; //!< Number of samples in the feature's test set int _n_samp; //!< Number of samples in the feature's test set - int _feat_ind; //!< Index of the feature - int _arr_ind; //!< Index of the feature for the value arrays + unsigned long int _feat_ind; //!< Index of the feature + unsigned long int _arr_ind; //!< Index of the feature for the value arrays int _d_mat_ind; //!< Index for the feature matrix bool _selected; //!< True if the feature is selected; @@ -80,7 +80,7 @@ public: * @param n_samp number of samples in the node * @param n_samp number of test samples in the node */ - Node(int feat_ind, int n_samp, int n_test_samp); + Node(unsigned long int feat_ind, int n_samp, int n_test_samp); /** * @brief Copy Constructor @@ -122,7 +122,7 @@ public: * * @param ind(int) the new feature and array index */ - inline void reindex(int ind){_feat_ind = ind; _arr_ind = ind;} + inline void reindex(unsigned long int ind){_feat_ind = ind; _arr_ind = ind;} // DocString: node_reindex_2 /** @@ -132,7 +132,7 @@ public: * @param ind(int) the new feature index * @param arr_ind(int) the new array index */ - inline void reindex(int ind, int arr_ind){_feat_ind = ind; _arr_ind = arr_ind;} + inline void reindex(unsigned long int ind, unsigned long int arr_ind){_feat_ind = ind; _arr_ind = arr_ind;} // DocString: node_samp /** @@ -150,13 +150,13 @@ public: /** * @brief The feature index */ - inline int feat_ind(){return _feat_ind;} + inline unsigned long int feat_ind(){return _feat_ind;} // DocString: node_arr_ind /** * @brief The feature array index */ - inline int arr_ind(){return _arr_ind;} + inline unsigned long int arr_ind(){return _arr_ind;} // DocString: node_selected /** diff --git a/src/feature_creation/node/operator_nodes/OperatorNode.hpp b/src/feature_creation/node/operator_nodes/OperatorNode.hpp index 6ed29b45..5384d0d5 100644 --- a/src/feature_creation/node/operator_nodes/OperatorNode.hpp +++ b/src/feature_creation/node/operator_nodes/OperatorNode.hpp @@ -61,7 +61,7 @@ public: * @param feats array of features that the operator will act on * @param feat_ind index of the feature */ - OperatorNode(std::array<node_ptr, N> feats, int feat_ind) : + OperatorNode(std::array<node_ptr, N> feats, unsigned long int feat_ind) : Node(feat_ind, feats[0]->n_samp(), feats[0]->n_test_samp()), _feats(feats) {} diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.cpp index 30dbf358..a898ab74 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.hpp> -void generateAbsNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateAbsNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat->type() == NODE_TYPE::ABS) || (feat->type() == NODE_TYPE::ABS_DIFF)) @@ -23,11 +23,11 @@ void generateAbsNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ AbsNode::AbsNode() {} -AbsNode::AbsNode(node_ptr feat, int feat_ind): +AbsNode::AbsNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -AbsNode::AbsNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +AbsNode::AbsNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if((feat->type() == NODE_TYPE::ABS) || (feat->type() == NODE_TYPE::ABS_DIFF)) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.hpp index eca203c6..82de5a0f 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.hpp @@ -46,7 +46,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - AbsNode(node_ptr feat, int feat_ind); + AbsNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -57,7 +57,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - AbsNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + AbsNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: abs_node_unit /** @@ -134,6 +134,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateAbsNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateAbsNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.cpp index b64158f5..705b91d7 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.hpp> -void generateAbsDiffNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound) +void generateAbsDiffNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if(feat_1->unit() != feat_2->unit()) @@ -32,11 +32,11 @@ void generateAbsDiffNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node AbsDiffNode::AbsDiffNode() {} -AbsDiffNode::AbsDiffNode(node_ptr feat_1, node_ptr feat_2, int feat_ind): +AbsDiffNode::AbsDiffNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind): OperatorNode({feat_1, feat_2}, feat_ind) {} -AbsDiffNode::AbsDiffNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound): +AbsDiffNode::AbsDiffNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat_1, feat_2}, feat_ind) { if(feat_1->unit() != feat_2->unit()) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.hpp index 57f9bc0b..68a2ebc9 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.hpp @@ -48,7 +48,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - AbsDiffNode(node_ptr feat_1, node_ptr feat_2, int feat_ind); + AbsDiffNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind); /** * @brief Constructor @@ -60,7 +60,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - AbsDiffNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound); + AbsDiffNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: abs_diff_node_unit /** @@ -138,6 +138,6 @@ public: void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateAbsDiffNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound); +void generateAbsDiffNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.cpp index ff104922..3d381cc6 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.hpp> -void generateAddNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound) +void generateAddNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if(feat_1->unit() != feat_2->unit()) @@ -31,11 +31,11 @@ void generateAddNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr AddNode::AddNode() {} -AddNode::AddNode(node_ptr feat_1, node_ptr feat_2, int feat_ind): +AddNode::AddNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind): OperatorNode({feat_1, feat_2}, feat_ind) {} -AddNode::AddNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound): +AddNode::AddNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat_1, feat_2}, feat_ind) { if(feat_1->unit() != feat_2->unit()) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.hpp index cbddcf22..c9e1842f 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.hpp @@ -45,7 +45,7 @@ public: * @param feat_2 shared_ptr of the second feature to operate on (B) * @param feat_ind Index of the new feature */ - AddNode(node_ptr feat_1, node_ptr feat_2, int feat_ind); + AddNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind); /** * @brief Constructor @@ -57,7 +57,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - AddNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound); + AddNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: add_node_unit /** @@ -134,6 +134,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateAddNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound); +void generateAddNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.cpp index cb122965..a77300d4 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.hpp> -void generateCbNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateCbNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat->type() == NODE_TYPE::CBRT) || (feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::INV)) @@ -19,11 +19,11 @@ void generateCbNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_i CbNode::CbNode() {} -CbNode::CbNode(node_ptr feat, int feat_ind): +CbNode::CbNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -CbNode::CbNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +CbNode::CbNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if((feat->type() == NODE_TYPE::CBRT) || (feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::INV)) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.hpp index 9b04c88e..e6ac61dd 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.hpp @@ -44,7 +44,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - CbNode(node_ptr feat, int feat_ind); + CbNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -55,7 +55,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - CbNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + CbNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: cb_node_unit /** @@ -132,6 +132,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateCbNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateCbNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.cpp index f48f3368..fdb3020c 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.hpp> -void generateCbrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateCbrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat->type() == NODE_TYPE::CB) || (feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::SIX_POW) || (feat->type() == NODE_TYPE::INV)) @@ -19,11 +19,11 @@ void generateCbrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat CbrtNode::CbrtNode() {} -CbrtNode::CbrtNode(node_ptr feat, int feat_ind): +CbrtNode::CbrtNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -CbrtNode::CbrtNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +CbrtNode::CbrtNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if((feat->type() == NODE_TYPE::CB) || (feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::SIX_POW) || (feat->type() == NODE_TYPE::INV)) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.hpp index d6add3fd..0803b7cd 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.hpp @@ -44,7 +44,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - CbrtNode(node_ptr feat, int feat_ind); + CbrtNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -55,7 +55,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - CbrtNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + CbrtNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: cbrt_node_unit /** @@ -132,6 +132,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateCbrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateCbrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.cpp index 0509db8d..05c76497 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.hpp> -void generateCosNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateCosNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if(feat->unit() != Unit() || (feat->type() == NODE_TYPE::SIN) || (feat->type() == NODE_TYPE::COS)) @@ -19,11 +19,11 @@ void generateCosNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ CosNode::CosNode() {} -CosNode::CosNode(node_ptr feat, int feat_ind): +CosNode::CosNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -CosNode::CosNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +CosNode::CosNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if(feat->unit() != Unit()) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.hpp index ec052256..20cdf7fd 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.hpp @@ -44,7 +44,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - CosNode(node_ptr feat, int feat_ind); + CosNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -55,7 +55,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - CosNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + CosNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: cos_node_unit /** @@ -132,6 +132,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateCosNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateCosNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.cpp index f5497e15..c109f338 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.hpp> -void generateDivNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound) +void generateDivNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat_1->type() == NODE_TYPE::INV) || (feat_2->type() == NODE_TYPE::INV) || (feat_2->type() == NODE_TYPE::DIV)) @@ -32,11 +32,11 @@ void generateDivNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr DivNode::DivNode() {} -DivNode::DivNode(node_ptr feat_1, node_ptr feat_2, int feat_ind): +DivNode::DivNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind): OperatorNode({feat_1, feat_2}, feat_ind) {} -DivNode::DivNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound): +DivNode::DivNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat_1, feat_2}, feat_ind) { if((feat_1->type() == NODE_TYPE::INV) || (feat_2->type() == NODE_TYPE::INV) || (feat_2->type() == NODE_TYPE::DIV)) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.hpp index f667f2ff..52b9c79a 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.hpp @@ -45,7 +45,7 @@ public: * @param feat_2 shared_ptr of the second feature to operate on (B) * @param feat_ind Index of the new feature */ - DivNode(node_ptr feat_1, node_ptr feat_2, int feat_ind); + DivNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind); /** * @brief Constructor @@ -57,7 +57,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - DivNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound); + DivNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: div_node_unit /** @@ -134,6 +134,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateDivNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound); +void generateDivNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.cpp index 5900c35d..81fa3608 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.hpp> -void generateExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat->unit() != Unit()) || (feat->type() == NODE_TYPE::NEG_EXP) || (feat->type() == NODE_TYPE::EXP) || (feat->type() == NODE_TYPE::ADD) || (feat->type() == NODE_TYPE::SUB) || (feat->type() == NODE_TYPE::LOG)) @@ -19,11 +19,11 @@ void generateExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ ExpNode::ExpNode() {} -ExpNode::ExpNode(node_ptr feat, int feat_ind): +ExpNode::ExpNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -ExpNode::ExpNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +ExpNode::ExpNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if(feat->unit() != Unit()) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.hpp index fd828cca..f87c9ce9 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.hpp @@ -44,7 +44,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - ExpNode(node_ptr feat, int feat_ind); + ExpNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -55,7 +55,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - ExpNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + ExpNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: exp_node_unit /** @@ -132,6 +132,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.cpp index b521f183..f4d9a020 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.hpp> -void generateInvNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateInvNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat->type() == NODE_TYPE::DIV) || (feat->type() == NODE_TYPE::EXP) || (feat->type() == NODE_TYPE::NEG_EXP) || (feat->type() == NODE_TYPE::INV)) @@ -19,11 +19,11 @@ void generateInvNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ InvNode::InvNode() {} -InvNode::InvNode(node_ptr feat, int feat_ind): +InvNode::InvNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -InvNode::InvNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +InvNode::InvNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if((feat->type() == NODE_TYPE::DIV) || (feat->type() == NODE_TYPE::EXP) || (feat->type() == NODE_TYPE::NEG_EXP) || (feat->type() == NODE_TYPE::INV)) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.hpp index fdfde7d3..c6a7f370 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.hpp @@ -32,7 +32,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - InvNode(node_ptr feat, int feat_ind); + InvNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -43,7 +43,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - InvNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + InvNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: inv_node_unit /** @@ -120,6 +120,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateInvNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateInvNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.cpp index c37f855a..fdeb581c 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.hpp> -void generateLogNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateLogNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if(feat->unit() != Unit() || (feat->type() == NODE_TYPE::NEG_EXP) || (feat->type() == NODE_TYPE::EXP) || (feat->type() == NODE_TYPE::DIV) || (feat->type() == NODE_TYPE::INV) || (feat->type() == NODE_TYPE::MULT) || (feat->type() == NODE_TYPE::LOG) || (feat->type() == NODE_TYPE::SIX_POW) || (feat->type() == NODE_TYPE::CB) || (feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::CBRT) || (feat->type() == NODE_TYPE::SQRT)) @@ -19,11 +19,11 @@ void generateLogNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ LogNode::LogNode() {} -LogNode::LogNode(node_ptr feat, int feat_ind): +LogNode::LogNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -LogNode::LogNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +LogNode::LogNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if(feat->unit() != Unit()) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.hpp index d8193767..92b61d4e 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.hpp @@ -44,7 +44,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - LogNode(node_ptr feat, int feat_ind); + LogNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -55,7 +55,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - LogNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + LogNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: log_node_unit /** @@ -132,6 +132,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateLogNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateLogNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.cpp index b3c281e0..ed603250 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.hpp> -void generateMultNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound) +void generateMultNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat_1->type() == NODE_TYPE::INV) || (feat_2->type() == NODE_TYPE::INV) || ((feat_1->type() == NODE_TYPE::DIV) && (feat_2->type() == NODE_TYPE::DIV))) @@ -32,11 +32,11 @@ void generateMultNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_pt MultNode::MultNode() {} -MultNode::MultNode(node_ptr feat_1, node_ptr feat_2, int feat_ind): +MultNode::MultNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind): OperatorNode({feat_1, feat_2}, feat_ind) {} -MultNode::MultNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound): +MultNode::MultNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat_1, feat_2}, feat_ind) { if((feat_1->type() == NODE_TYPE::INV) || (feat_2->type() == NODE_TYPE::INV) || ((feat_1->type() == NODE_TYPE::DIV) && (feat_2->type() == NODE_TYPE::DIV))) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.hpp index 89a84074..42c06473 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.hpp @@ -46,7 +46,7 @@ public: * @param feat_2 shared_ptr of the second feature to operate on (B) * @param feat_ind Index of the new feature */ - MultNode(node_ptr feat_1, node_ptr feat_2, int feat_ind); + MultNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind); /** * @brief Constructor @@ -58,7 +58,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - MultNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound); + MultNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: mult_node_unit /** @@ -135,6 +135,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateMultNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound); +void generateMultNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.cpp index 6dc0876c..55614a39 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.hpp> -void generateNegExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateNegExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if(feat->unit() != Unit() || (feat->type() == NODE_TYPE::NEG_EXP) || (feat->type() == NODE_TYPE::EXP) || (feat->type() == NODE_TYPE::ADD) || (feat->type() == NODE_TYPE::SUB) || (feat->type() == NODE_TYPE::LOG)) @@ -19,11 +19,11 @@ void generateNegExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& fe NegExpNode::NegExpNode() {} -NegExpNode::NegExpNode(node_ptr feat, int feat_ind): +NegExpNode::NegExpNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -NegExpNode::NegExpNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +NegExpNode::NegExpNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if(feat->unit() != Unit()) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.hpp index 478523f2..8175f0c8 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.hpp @@ -45,7 +45,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - NegExpNode(node_ptr feat, int feat_ind); + NegExpNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -56,7 +56,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - NegExpNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + NegExpNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: neg_exp_node_unit /** @@ -133,6 +133,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateNegExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateNegExpNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.cpp index 403dd2ef..5914ec20 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.hpp> -void generateSinNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateSinNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if(feat->unit() != Unit() || (feat->type() == NODE_TYPE::SIN) || (feat->type() == NODE_TYPE::COS)) @@ -19,11 +19,11 @@ void generateSinNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ SinNode::SinNode() {} -SinNode::SinNode(node_ptr feat, int feat_ind): +SinNode::SinNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -SinNode::SinNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +SinNode::SinNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if(feat->unit() != Unit()) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.hpp index 8edac3af..0d7f66a4 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.hpp @@ -45,7 +45,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - SinNode(node_ptr feat, int feat_ind); + SinNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -56,7 +56,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - SinNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + SinNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: sin_node_unit /** @@ -133,6 +133,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateSinNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateSinNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.cpp index 36cd7b48..8e2887aa 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.hpp> -void generateSixPowNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateSixPowNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat->type() == NODE_TYPE::CBRT) || (feat->type() == NODE_TYPE::SQRT) || (feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::CB) || (feat->type() == NODE_TYPE::INV)) @@ -19,11 +19,11 @@ void generateSixPowNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& fe SixPowNode::SixPowNode() {} -SixPowNode::SixPowNode(node_ptr feat, int feat_ind): +SixPowNode::SixPowNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -SixPowNode::SixPowNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +SixPowNode::SixPowNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if((feat->type() == NODE_TYPE::CBRT) || (feat->type() == NODE_TYPE::SQRT) || (feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::CB) || (feat->type() == NODE_TYPE::INV)) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.hpp index 868ce0ed..8c940862 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sp/sixth_power.hpp @@ -45,7 +45,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - SixPowNode(node_ptr feat, int feat_ind); + SixPowNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -56,7 +56,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - SixPowNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + SixPowNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: six_pow_node_unit /** @@ -134,6 +134,6 @@ public: void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateSixPowNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateSixPowNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.cpp index d928fd1d..fa0edfc8 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.hpp> -void generateSqNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateSqNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat->type() == NODE_TYPE::SQRT) || (feat->type() == NODE_TYPE::INV)) @@ -19,11 +19,11 @@ void generateSqNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_i SqNode::SqNode() {} -SqNode::SqNode(node_ptr feat, int feat_ind): +SqNode::SqNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -SqNode::SqNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +SqNode::SqNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if((feat->type() == NODE_TYPE::SQRT) || (feat->type() == NODE_TYPE::INV)) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.hpp index 19d1a5fe..ee67280a 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.hpp @@ -44,7 +44,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - SqNode(node_ptr feat, int feat_ind); + SqNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -55,7 +55,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - SqNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + SqNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: sq_node_unit /** @@ -132,6 +132,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateSqNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateSqNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.cpp index d4e4a561..6a126983 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.hpp> -void generateSqrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound) +void generateSqrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if((feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::CB) || (feat->type() == NODE_TYPE::SIX_POW) || (feat->type() == NODE_TYPE::CBRT) || (feat->type() == NODE_TYPE::INV)) @@ -19,11 +19,11 @@ void generateSqrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat SqrtNode::SqrtNode() {} -SqrtNode::SqrtNode(node_ptr feat, int feat_ind): +SqrtNode::SqrtNode(node_ptr feat, unsigned long int feat_ind): OperatorNode({feat}, feat_ind) {} -SqrtNode::SqrtNode(node_ptr feat, int feat_ind, double l_bound, double u_bound): +SqrtNode::SqrtNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat}, feat_ind) { if((feat->type() == NODE_TYPE::SQ) || (feat->type() == NODE_TYPE::CB) || (feat->type() == NODE_TYPE::SIX_POW) || (feat->type() == NODE_TYPE::CBRT) || (feat->type() == NODE_TYPE::INV)) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.hpp index cee1ca90..2ecb1d4b 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.hpp @@ -45,7 +45,7 @@ public: * @param feat shared_ptr of the feature to operate on (A) * @param feat_ind Index of the new feature */ - SqrtNode(node_ptr feat, int feat_ind); + SqrtNode(node_ptr feat, unsigned long int feat_ind); /** * @brief Constructor @@ -56,7 +56,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - SqrtNode(node_ptr feat, int feat_ind, double l_bound, double u_bound); + SqrtNode(node_ptr feat, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: sqrt_node_unit /** @@ -133,6 +133,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateSqrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, int& feat_ind, double l_bound, double u_bound); +void generateSqrtNode(std::vector<node_ptr>& feat_list, node_ptr feat, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.cpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.cpp index e0a18275..53313a68 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.cpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.cpp @@ -1,5 +1,5 @@ #include <feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.hpp> -void generateSubNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound) +void generateSubNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound) { ++feat_ind; if(feat_1->unit() != feat_2->unit()) @@ -30,11 +30,11 @@ void generateSubNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr SubNode::SubNode() {} -SubNode::SubNode(node_ptr feat_1, node_ptr feat_2, int feat_ind): +SubNode::SubNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind): OperatorNode({feat_1, feat_2}, feat_ind) {} -SubNode::SubNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound): +SubNode::SubNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound): OperatorNode({feat_1, feat_2}, feat_ind) { if(feat_1->unit() != feat_2->unit()) diff --git a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.hpp b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.hpp index 525892b2..fff6a877 100644 --- a/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.hpp @@ -46,7 +46,7 @@ public: * @param feat_2 shared_ptr of the second feature to operate on (B) * @param feat_ind Index of the new feature */ - SubNode(node_ptr feat_1, node_ptr feat_2, int feat_ind); + SubNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind); /** * @brief Constructor @@ -58,7 +58,7 @@ public: * @param l_bound Minimum absolute value allowed for the feature. * @param u_bound Maximum absolute value allowed for the feature. */ - SubNode(node_ptr feat_1, node_ptr feat_2, int feat_ind, double l_bound, double u_bound); + SubNode(node_ptr feat_1, node_ptr feat_2, unsigned long int feat_ind, double l_bound, double u_bound); // DocString: sub_node_unit /** @@ -135,6 +135,6 @@ public: */ void update_div_mult_leaves(std::map<std::string, double>& div_mult_leaves, double fact, double& expected_abs_tot); }; -void generateSubNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, int& feat_ind, double l_bound, double u_bound); +void generateSubNode(std::vector<node_ptr>& feat_list, node_ptr feat_1, node_ptr feat_2, unsigned long int& feat_ind, double l_bound, double u_bound); #endif diff --git a/src/feature_creation/node/operator_nodes/allowed_ops.hpp b/src/feature_creation/node/operator_nodes/allowed_ops.hpp index a522b4d0..631b5518 100644 --- a/src/feature_creation/node/operator_nodes/allowed_ops.hpp +++ b/src/feature_creation/node/operator_nodes/allowed_ops.hpp @@ -29,8 +29,8 @@ #include <map> #include <iostream> -typedef std::function<void(std::vector<node_ptr>&, node_ptr, int&, double, double)> un_op_node_gen; -typedef std::function<void(std::vector<node_ptr>&, node_ptr, node_ptr, int&, double, double)> bin_op_node_gen; +typedef std::function<void(std::vector<node_ptr>&, node_ptr, unsigned long int&, double, double)> un_op_node_gen; +typedef std::function<void(std::vector<node_ptr>&, node_ptr, node_ptr, unsigned long int&, double, double)> bin_op_node_gen; namespace allowed_op_maps { diff --git a/src/feature_creation/node/utils.cpp b/src/feature_creation/node/utils.cpp index 3ebab644..1f858930 100644 --- a/src/feature_creation/node/utils.cpp +++ b/src/feature_creation/node/utils.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/utils.hpp> -node_ptr str2node::postfix2node(std::string postfix_expr, const std::vector<node_ptr>& phi_0, int& feat_ind) +node_ptr str2node::postfix2node(std::string postfix_expr, const std::vector<node_ptr>& phi_0, unsigned long int& feat_ind) { std::vector<node_ptr> stack; std::vector<std::string> postfix_split = str_utils::split_string_trim(postfix_expr, "|"); @@ -88,7 +88,7 @@ std::vector<node_ptr> str2node::phi_selected_from_file(std::string filename, std std::vector<std::string> split_line; std::vector<node_ptr> phi_selected; - int feat_ind = phi_0.size(); + unsigned long int feat_ind = phi_0.size(); int feat_sel = 0; std::getline(file_stream, line); @@ -125,7 +125,7 @@ std::vector<node_ptr> str2node::phi_from_file(std::string filename, std::vector< std::string line; std::vector<node_ptr> phi; - int feat_ind = phi_0.size(); + unsigned long int feat_ind = phi_0.size(); while(std::getline(file_stream, line)) { diff --git a/src/feature_creation/node/utils.hpp b/src/feature_creation/node/utils.hpp index 2b728fe1..da658ebf 100644 --- a/src/feature_creation/node/utils.hpp +++ b/src/feature_creation/node/utils.hpp @@ -26,7 +26,7 @@ namespace str2node * @param feat_ind The desired feature index * @return The feature node described by the postfix expression */ - node_ptr postfix2node(std::string postfix_expr, const std::vector<node_ptr>& phi_0, int& feat_ind); + node_ptr postfix2node(std::string postfix_expr, const std::vector<node_ptr>& phi_0, unsigned long int& feat_ind); /** * @brief Convert a feature_space/selected_features.txt into a phi_selected; @@ -61,4 +61,4 @@ namespace node_identifier */ std::string feature_type_to_string(NODE_TYPE nt); } -#endif \ No newline at end of file +#endif diff --git a/src/feature_creation/node/value_storage/nodes_value_containers.cpp b/src/feature_creation/node/value_storage/nodes_value_containers.cpp index cd6d214f..26d8945b 100644 --- a/src/feature_creation/node/value_storage/nodes_value_containers.cpp +++ b/src/feature_creation/node/value_storage/nodes_value_containers.cpp @@ -69,7 +69,7 @@ void node_value_arrs::resize_values_arr(int n_dims, int n_feat, bool use_temp) } } -double* node_value_arrs::get_value_ptr(int arr_ind, int feat_ind, int offset) +double* node_value_arrs::get_value_ptr(unsigned long int arr_ind, unsigned long int feat_ind, int offset) { if(arr_ind < N_STORE_FEATURES) return access_value_arr(arr_ind); @@ -78,7 +78,7 @@ double* node_value_arrs::get_value_ptr(int arr_ind, int feat_ind, int offset) return access_temp_storage((arr_ind % N_STORE_FEATURES) + (offset % 3) * N_STORE_FEATURES + omp_get_thread_num() * (N_STORE_FEATURES * 3 + 1)); } -double* node_value_arrs::get_test_value_ptr(int arr_ind, int feat_ind, int offset) +double* node_value_arrs::get_test_value_ptr(unsigned long int arr_ind, unsigned long int feat_ind, int offset) { if(arr_ind < N_STORE_FEATURES) return access_test_value_arr(arr_ind); diff --git a/src/feature_creation/node/value_storage/nodes_value_containers.hpp b/src/feature_creation/node/value_storage/nodes_value_containers.hpp index 48d3be28..09c08022 100644 --- a/src/feature_creation/node/value_storage/nodes_value_containers.hpp +++ b/src/feature_creation/node/value_storage/nodes_value_containers.hpp @@ -77,7 +77,7 @@ namespace node_value_arrs * * @return The register element for a given feature index and offset */ - inline int& temp_storage_reg(int ind, int offset = 0){return TEMP_STORAGE_REG[(ind % N_STORE_FEATURES) + (offset % 3) * N_STORE_FEATURES + omp_get_thread_num() * (N_STORE_FEATURES * 3 + 1)];} + inline int& temp_storage_reg(unsigned long int ind, int offset = 0){return TEMP_STORAGE_REG[(ind % N_STORE_FEATURES) + (offset % 3) * N_STORE_FEATURES + omp_get_thread_num() * (N_STORE_FEATURES * 3 + 1)];} /** * @brief Get a reference slot/feature register of the test data @@ -87,7 +87,7 @@ namespace node_value_arrs * * @return The register element for a given feature index and offset */ - inline int& temp_storage_test_reg(int ind, int offset = 0){return TEMP_STORAGE_TEST_REG[(ind % N_STORE_FEATURES) + (offset % 3) * N_STORE_FEATURES + omp_get_thread_num() * (N_STORE_FEATURES * 3 + 1)];} + inline int& temp_storage_test_reg(unsigned long int ind, int offset = 0){return TEMP_STORAGE_TEST_REG[(ind % N_STORE_FEATURES) + (offset % 3) * N_STORE_FEATURES + omp_get_thread_num() * (N_STORE_FEATURES * 3 + 1)];} /** * @brief Access element of the permanent training data storage array @@ -96,7 +96,7 @@ namespace node_value_arrs * * @return pointer to the Node's training data */ - inline double* access_value_arr(int feature_ind){return VALUES_ARR.data() + feature_ind*N_SAMPLES;} + inline double* access_value_arr(unsigned long int feature_ind){return VALUES_ARR.data() + feature_ind*N_SAMPLES;} /** * @brief Access element of the permanent test data storage array @@ -105,7 +105,7 @@ namespace node_value_arrs * * @return pointer to the Node's test data */ - inline double* access_test_value_arr(int feature_ind){return TEST_VALUES_ARR.data() + feature_ind*N_SAMPLES_TEST;} + inline double* access_test_value_arr(unsigned long int feature_ind){return TEST_VALUES_ARR.data() + feature_ind*N_SAMPLES_TEST;} /** * @brief Access element of temporary storage array for the training data @@ -114,7 +114,7 @@ namespace node_value_arrs * * @return pointer to the data stored in the specified slot */ - inline double* access_temp_storage(int slot){return TEMP_STORAGE_ARR.data() + slot*N_SAMPLES;} + inline double* access_temp_storage(unsigned long int slot){return TEMP_STORAGE_ARR.data() + slot*N_SAMPLES;} /** * @brief Access element of temporary storage array for the test data @@ -123,7 +123,7 @@ namespace node_value_arrs * * @return pointer to the data stored in the specified slot */ - inline double* access_temp_storage_test(int slot){return TEMP_STORAGE_TEST_ARR.data() + slot*N_SAMPLES_TEST;} + inline double* access_temp_storage_test(unsigned long int slot){return TEMP_STORAGE_TEST_ARR.data() + slot*N_SAMPLES_TEST;} /** * @brief Get a Node's value_ptr @@ -134,7 +134,7 @@ namespace node_value_arrs * * @return The value pointer */ - double* get_value_ptr(int arr_ind, int feat_ind, int offset = 0); + double* get_value_ptr(unsigned long int arr_ind, unsigned long int feat_ind, int offset = 0); /** * @brief Get a Node's test_value_ptr @@ -145,7 +145,7 @@ namespace node_value_arrs * * @return The value pointer */ - double* get_test_value_ptr(int arr_ind, int feat_ind, int offset = 0); + double* get_test_value_ptr(unsigned long int arr_ind, unsigned long int feat_ind, int offset = 0); /** * @brief Get the pointer to a particular selected Node from sis diff --git a/src/python/bindings_docstring_keyed.cpp b/src/python/bindings_docstring_keyed.cpp index 10e6f596..0bcfdec0 100644 --- a/src/python/bindings_docstring_keyed.cpp +++ b/src/python/bindings_docstring_keyed.cpp @@ -96,8 +96,8 @@ void sisso::feature_creation::registerUnit() void sisso::feature_creation::node::registerNode() { - void (Node::*reindex_1)(int) = &Node::reindex; - void (Node::*reindex_2)(int, int) = &Node::reindex; + void (Node::*reindex_1)(unsigned long int) = &Node::reindex; + void (Node::*reindex_2)(unsigned long int, unsigned long int) = &Node::reindex; class_<sisso::feature_creation::node::NodeWrap, boost::noncopyable>("Node", no_init) .def("reindex", reindex_1, "@DocString_node_reindex_1@") diff --git a/src/python/feature_creation/FeatureNode.cpp b/src/python/feature_creation/FeatureNode.cpp index b9330df9..6b23ab7e 100644 --- a/src/python/feature_creation/FeatureNode.cpp +++ b/src/python/feature_creation/FeatureNode.cpp @@ -1,6 +1,6 @@ #include <feature_creation/node/FeatureNode.hpp> -FeatureNode::FeatureNode(int feat_ind, std::string expr, np::ndarray value, np::ndarray test_value, Unit unit) : +FeatureNode::FeatureNode(unsigned long int feat_ind, std::string expr, np::ndarray value, np::ndarray test_value, Unit unit) : Node(feat_ind, value.shape(0), test_value.shape(0)), _value(python_conv_utils::from_ndarray<double>(value)), _test_value(python_conv_utils::from_ndarray<double>(test_value)), @@ -19,7 +19,7 @@ FeatureNode::FeatureNode(int feat_ind, std::string expr, np::ndarray value, np:: set_test_value(); } -FeatureNode::FeatureNode(int feat_ind, std::string expr, py::list value, py::list test_value, Unit unit) : +FeatureNode::FeatureNode(unsigned long int feat_ind, std::string expr, py::list value, py::list test_value, Unit unit) : Node(feat_ind, py::len(value), py::len(test_value)), _value(python_conv_utils::from_list<double>(value)), _test_value(python_conv_utils::from_list<double>(test_value)), diff --git a/tests/googletest/feature_creation/feature_generation/test_abs_diff_node.cc b/tests/googletest/feature_creation/feature_generation/test_abs_diff_node.cc index 95339a08..62296c1d 100644 --- a/tests/googletest/feature_creation/feature_generation/test_abs_diff_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_abs_diff_node.cc @@ -44,7 +44,7 @@ namespace TEST_F(AbsDiffNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateAbsDiffNode(_phi, _phi[0], _phi[2], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 6) << " (AbsDiffNode created when units do not match.)"; @@ -73,7 +73,7 @@ namespace TEST_F(AbsDiffNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_abs_node.cc b/tests/googletest/feature_creation/feature_generation/test_abs_node.cc index 97910a20..55c0df9c 100644 --- a/tests/googletest/feature_creation/feature_generation/test_abs_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_abs_node.cc @@ -41,7 +41,7 @@ namespace TEST_F(AbsNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateAbsNode(_phi, _phi[2], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 4) << " (Creation of AbsNode led to a feature with a constant value)"; @@ -68,7 +68,7 @@ namespace TEST_F(AbsNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_add_node.cc b/tests/googletest/feature_creation/feature_generation/test_add_node.cc index b9380053..36ad6e19 100644 --- a/tests/googletest/feature_creation/feature_generation/test_add_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_add_node.cc @@ -42,7 +42,7 @@ namespace TEST_F(AddNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateAddNode(_phi, _phi[0], _phi[2], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 5) << " (AddNode created when units do not match.)"; @@ -71,7 +71,7 @@ namespace TEST_F(AddNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_cb_node.cc b/tests/googletest/feature_creation/feature_generation/test_cb_node.cc index 6099b8e5..447393af 100644 --- a/tests/googletest/feature_creation/feature_generation/test_cb_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_cb_node.cc @@ -49,7 +49,7 @@ namespace TEST_F(CbNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); int phi_sz = _phi.size(); generateCbNode(_phi, _phi[0], feat_ind, 1e-50, 1e-40); @@ -74,7 +74,7 @@ namespace TEST_F(CbNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { _cb_test = std::make_shared<CbNode>(_phi[0], feat_ind, 1e-50, 1e-40); diff --git a/tests/googletest/feature_creation/feature_generation/test_cbrt_node.cc b/tests/googletest/feature_creation/feature_generation/test_cbrt_node.cc index 5760cb80..4f4b5af9 100644 --- a/tests/googletest/feature_creation/feature_generation/test_cbrt_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_cbrt_node.cc @@ -51,7 +51,7 @@ namespace TEST_F(CbrtNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); int phi_sz = _phi.size(); generateCbrtNode(_phi, _phi[3], feat_ind, 1e-50, 1e-40); @@ -82,7 +82,7 @@ namespace TEST_F(CbrtNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_cos_node.cc b/tests/googletest/feature_creation/feature_generation/test_cos_node.cc index 9b4f270a..f2344c6b 100644 --- a/tests/googletest/feature_creation/feature_generation/test_cos_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_cos_node.cc @@ -39,7 +39,7 @@ namespace TEST_F(CosNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateCosNode(_phi, _phi[2], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 4) << " (Creation of CosNode led to a feature with a constant value)"; @@ -66,7 +66,7 @@ namespace TEST_F(CosNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_div_node.cc b/tests/googletest/feature_creation/feature_generation/test_div_node.cc index 42cd9c6d..3a30bc52 100644 --- a/tests/googletest/feature_creation/feature_generation/test_div_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_div_node.cc @@ -44,7 +44,7 @@ namespace TEST_F(DivNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateDivNode(_phi, _phi[0], _phi[3], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 6) << " (Creation of DivNode led to a feature with a constant value)"; @@ -85,7 +85,7 @@ namespace TEST_F(DivNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_exp_node.cc b/tests/googletest/feature_creation/feature_generation/test_exp_node.cc index 3d15c29a..4d956411 100644 --- a/tests/googletest/feature_creation/feature_generation/test_exp_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_exp_node.cc @@ -46,7 +46,7 @@ namespace TEST_F(ExpNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateExpNode(_phi, _phi[1], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 7) << "(ExpNode created with a feature that is not unitless)"; @@ -79,7 +79,7 @@ namespace TEST_F(ExpNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_inv_node.cc b/tests/googletest/feature_creation/feature_generation/test_inv_node.cc index dae10cde..f79772eb 100644 --- a/tests/googletest/feature_creation/feature_generation/test_inv_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_inv_node.cc @@ -50,7 +50,7 @@ namespace TEST_F(InvNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); int phi_sz = _phi.size(); generateInvNode(_phi, _phi[3], feat_ind, 1e-50, 1e-40); @@ -81,7 +81,7 @@ namespace TEST_F(InvNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_log_node.cc b/tests/googletest/feature_creation/feature_generation/test_log_node.cc index 56ac1bbc..3272709d 100644 --- a/tests/googletest/feature_creation/feature_generation/test_log_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_log_node.cc @@ -63,7 +63,7 @@ namespace TEST_F(LogNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateLogNode(_phi, _phi[1], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 14) << "(LogNode created with a feature that is not unitless)"; @@ -117,7 +117,7 @@ namespace TEST_F(LogNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_mult_node.cc b/tests/googletest/feature_creation/feature_generation/test_mult_node.cc index a582390c..07f2481f 100644 --- a/tests/googletest/feature_creation/feature_generation/test_mult_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_mult_node.cc @@ -42,7 +42,7 @@ namespace TEST_F(MultNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateMultNode(_phi, _phi[0], _phi[3], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 5) << " (Creation of MultNode led to a feature with a constant value)"; @@ -71,7 +71,7 @@ namespace TEST_F(MultNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_neg_exp_node.cc b/tests/googletest/feature_creation/feature_generation/test_neg_exp_node.cc index 205d7a92..22d4d207 100644 --- a/tests/googletest/feature_creation/feature_generation/test_neg_exp_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_neg_exp_node.cc @@ -46,7 +46,7 @@ namespace TEST_F(NegExpNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateNegExpNode(_phi, _phi[1], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 7) << "(NegExpNode created with a feature that is not unitless)"; @@ -79,7 +79,7 @@ namespace TEST_F(NegExpNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_sin_node.cc b/tests/googletest/feature_creation/feature_generation/test_sin_node.cc index 79325c78..17141214 100644 --- a/tests/googletest/feature_creation/feature_generation/test_sin_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_sin_node.cc @@ -39,7 +39,7 @@ namespace TEST_F(SinNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateSinNode(_phi, _phi[2], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 4) << " (Creation of SinNode led to a feature with a constant value)"; @@ -66,7 +66,7 @@ namespace TEST_F(SinNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_six_pow_node.cc b/tests/googletest/feature_creation/feature_generation/test_six_pow_node.cc index 37484d12..8869b062 100644 --- a/tests/googletest/feature_creation/feature_generation/test_six_pow_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_six_pow_node.cc @@ -53,7 +53,7 @@ namespace TEST_F(SixPowNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); int phi_sz = _phi.size(); generateSixPowNode(_phi, _phi[0], feat_ind, 1e-50, 1e-40); @@ -84,7 +84,7 @@ namespace TEST_F(SixPowNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_sq_node.cc b/tests/googletest/feature_creation/feature_generation/test_sq_node.cc index 8864b39d..d3df4110 100644 --- a/tests/googletest/feature_creation/feature_generation/test_sq_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_sq_node.cc @@ -47,7 +47,7 @@ namespace TEST_F(SqNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); int phi_sz = _phi.size(); generateSqNode(_phi, _phi[0], feat_ind, 1e-50, 1e-40); @@ -69,7 +69,7 @@ namespace TEST_F(SqNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { _sq_test = std::make_shared<SqNode>(_phi[0], feat_ind, 1e-50, 1e-40); diff --git a/tests/googletest/feature_creation/feature_generation/test_sqrt_node.cc b/tests/googletest/feature_creation/feature_generation/test_sqrt_node.cc index 8c02401d..383e3c1f 100644 --- a/tests/googletest/feature_creation/feature_generation/test_sqrt_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_sqrt_node.cc @@ -53,7 +53,7 @@ namespace TEST_F(SqrtNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); int phi_sz = _phi.size(); generateSqrtNode(_phi, _phi[3], feat_ind, 1e-50, 1e-40); @@ -87,7 +87,7 @@ namespace TEST_F(SqrtNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/feature_generation/test_sub_node.cc b/tests/googletest/feature_creation/feature_generation/test_sub_node.cc index 1a63cffb..5cfcf587 100644 --- a/tests/googletest/feature_creation/feature_generation/test_sub_node.cc +++ b/tests/googletest/feature_creation/feature_generation/test_sub_node.cc @@ -42,7 +42,7 @@ namespace TEST_F(SubNodeTest, GeneratorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); generateSubNode(_phi, _phi[0], _phi[2], feat_ind, 1e-50, 1e50); EXPECT_EQ(_phi.size(), 5) << " (SubNode created when units do not match.)"; @@ -71,7 +71,7 @@ namespace TEST_F(SubNodeTest, ConstructorTest) { - int feat_ind = _phi.size(); + unsigned long int feat_ind = _phi.size(); try { diff --git a/tests/googletest/feature_creation/utils/test_utils.cc b/tests/googletest/feature_creation/utils/test_utils.cc index ef6b4240..e600aa80 100644 --- a/tests/googletest/feature_creation/utils/test_utils.cc +++ b/tests/googletest/feature_creation/utils/test_utils.cc @@ -29,7 +29,7 @@ namespace } std::vector<node_ptr> _phi0; - int _feat_ind; + unsigned long int _feat_ind; }; TEST_F(FeatCreationUtilsTest, TestPostfix2Node) -- GitLab