| 105 | } |
| 106 | |
| 107 | int LNLib::Polynomials::GetKnotMultiplicity(const std::vector<double>& knotVector, double knot) |
| 108 | { |
| 109 | VALIDATE_ARGUMENT(knotVector.size() > 0, "knotVector", "KnotVector size must be greater than zero."); |
| 110 | VALIDATE_ARGUMENT(ValidationUtils::IsValidKnotVector(knotVector), "knotVector", "KnotVector must be a nondecreasing sequence of real numbers."); |
| 111 | VALIDATE_ARGUMENT_RANGE(knot, knotVector[0], knotVector[knotVector.size() - 1]); |
| 112 | |
| 113 | int size = knotVector.size(); |
| 114 | int multi = 0; |
| 115 | |
| 116 | for (int index = 0; index < size; index++) |
| 117 | { |
| 118 | if (MathUtils::IsAlmostEqualTo(knot, knotVector[index])) |
| 119 | { |
| 120 | multi++; |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | return multi; |
| 125 | } |
| 126 | |
| 127 | int LNLib::Polynomials::GetKnotSpanIndex(int degree, const std::vector<double>& knotVector, double paramT) |
| 128 | { |
nothing calls this directly
no outgoing calls
no test coverage detected