MCPcopy Create free account
hub / github.com/bgrimstad/splinter / dist_sort

Function dist_sort

src/datapoint.cpp:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84bool dist_sort(const DataPoint x, const DataPoint y)
85{
86 std::vector<double> zeros(x.getDimX(), 0);
87 DataPoint origin(zeros, 0.0);
88 double x_dist = dist(x, origin);
89 double y_dist = dist(y, origin);
90 return (x_dist<y_dist);
91}
92
93} // namespace SPLINTER

Callers

nothing calls this directly

Calls 2

distFunction · 0.85
getDimXMethod · 0.80

Tested by

no test coverage detected