MCPcopy Create free account
hub / github.com/davisking/dlib / add

Method add

dlib/global_optimization/upper_bound_function.h:67–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 void add (
68 const function_evaluation& point
69 )
70 {
71 DLIB_CASSERT(point.x.size() != 0, "The vectors can't be empty.");
72 if (points.size() == 0)
73 {
74 points.push_back(point);
75 return;
76 }
77
78 DLIB_CASSERT(point.x.size() == dimensionality(), "All the vectors given to upper_bound_function must have the same dimensionality.");
79
80 if (points.size() < 4)
81 {
82 points.push_back(point);
83 *this = upper_bound_function(points, relative_noise_magnitude, solver_eps);
84 return;
85 }
86
87 points.push_back(point);
88 // add constraints between the new point and the old points
89 for (size_t i = 0; i < points.size()-1; ++i)
90 active_constraints.push_back(std::make_pair(i,points.size()-1));
91
92 learn_params();
93 }
94
95 long num_points(
96 ) const

Callers 15

find_max_globalFunction · 0.45
setMethod · 0.45
learn_paramsMethod · 0.45
base_windowMethod · 0.45
base_windowMethod · 0.45
find_connected_nodesFunction · 0.45
create_join_treeFunction · 0.45
validate_join_treeFunction · 0.45
enter_folderMethod · 0.45

Calls 3

sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected