Commit 920984d9 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Add unit tests for NLOpt

Also refactor that code
parent 09ae63e9
......@@ -78,6 +78,11 @@ public:
* @returns The projection score for the particular feature
*/
double overlap_1d(double* value, double width = 1e-5);
/**
* @brief Number of tasks
*/
inline int n_task() const{return _n_task;}
};
......
......@@ -37,7 +37,7 @@
#include "feature_creation/node/operator_nodes/functions.hpp"
#ifdef PARAMETERIZE
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
#endif
#ifdef PY_BINDINGS
......
......@@ -25,7 +25,7 @@
#define PARAM_ABS_VAL_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/abs/absolute_value.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_abs_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_ABS_DIFF_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/absolute_difference.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_abs_diff_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_ADD_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/add/add.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_param_add_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_CUBE_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/cb/cube.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_cb_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_CBRT_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/cbrt/cube_root.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_cbrt_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_COS_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/cos/cos.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_cos_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_DIV_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/div/divide.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_div_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_EXP_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/exp/exponential.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_exp_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_INV_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/inv/inverse.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_inv_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_LOG_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/log/log.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_log_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_MULT_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/mult/multiply.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_mult_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_NEG_EXP_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/neg_exp/negative_exponential.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_neg_exp_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_SIN_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/sin/sin.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_sin_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_SIX_POW_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/six_pow/sixth_power.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_six_pow_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_SQ_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/sq/square.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_sq_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_SQRT_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/sqrt/square_root.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_sqrt_param_node
/**
......
......@@ -25,7 +25,7 @@
#define PARAM_SUB_NODE
#include "feature_creation/node/operator_nodes/allowed_operator_nodes/sub/subtract.hpp"
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
// DocString: cls_sub_param_node
/**
......
......@@ -40,7 +40,7 @@
#include "mpi_interface/MPI_Interface.hpp"
#ifdef PARAMETERIZE
#include "nl_opt/NLOptWrapper.hpp"
#include "nl_opt/utils.hpp"
#endif
#ifdef PY_BINDINGS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment