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

Method removeUnsupportedBasisFunctions

src/bspline.cpp:381–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381bool 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
397void BSpline::save(const std::string &fileName) const
398{

Callers

nothing calls this directly

Calls 2

ExceptionClass · 0.85
reduceSupportMethod · 0.45

Tested by

no test coverage detected