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

Function isKnotVectorRegular

src/knots.cpp:16–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14{
15
16bool isKnotVectorRegular(const std::vector<double> &knots, unsigned int degree)
17{
18 // Check size
19 if (knots.size() < 2 * (degree + 1))
20 return false;
21
22 // Check order
23 if (!std::is_sorted(knots.begin(), knots.end()))
24 return false;
25
26 // Check multiplicity of knots
27 for (std::vector<double>::const_iterator it = knots.begin(); it != knots.end(); ++it)
28 {
29 if (count(knots.begin(), knots.end(), *it) > degree + 1)
30 return false;
31 }
32
33 return true;
34}
35
36bool isKnotVectorClamped(const std::vector<double> &knots, unsigned int degree)
37{

Callers 7

knots.cppFile · 0.85
BSplineBasis1DMethod · 0.85
insertKnotsMethod · 0.85
refineKnotsMethod · 0.85
refineKnotsLocallyMethod · 0.85
decomposeToBezierFormMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected