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

Method extractUniqueSorted

src/bsplinebuilder.cpp:548–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548std::vector<double> BSpline::Builder::extractUniqueSorted(const std::vector<double> &values) const
549{
550 // Sort and remove duplicates
551 std::vector<double> unique(values);
552 std::sort(unique.begin(), unique.end());
553 std::vector<double>::iterator it = unique_copy(unique.begin(), unique.end(), unique.begin());
554 unique.resize(distance(unique.begin(),it));
555 return unique;
556}
557
558} // namespace SPLINTER

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected