| 14 | { |
| 15 | |
| 16 | bool 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 | |
| 36 | bool isKnotVectorClamped(const std::vector<double> &knots, unsigned int degree) |
| 37 | { |
no outgoing calls
no test coverage detected