| 379 | } |
| 380 | |
| 381 | bool BSpline::removeUnsupportedBasisFunctions(std::vector<double> &lb, std::vector<double> &ub) |
| 382 | { |
| 383 | if (lb.size() != numVariables || ub.size() != numVariables) |
| 384 | throw Exception("BSpline::removeUnsupportedBasisFunctions: Incompatible dimension of domain bounds."); |
| 385 | |
| 386 | SparseMatrix A = basis.reduceSupport(lb, ub); |
| 387 | |
| 388 | if (coefficients.size() != A.rows()) |
| 389 | return false; |
| 390 | |
| 391 | // Remove unsupported control points (basis functions) |
| 392 | updateControlPoints(A.transpose()); |
| 393 | |
| 394 | return true; |
| 395 | } |
| 396 | |
| 397 | void BSpline::save(const std::string &fileName) const |
| 398 | { |
nothing calls this directly
no test coverage detected