| 195 | } |
| 196 | |
| 197 | void BSpline::setControlPoints(const DenseMatrix &controlPoints) |
| 198 | { |
| 199 | if (controlPoints.cols() != numVariables + 1) |
| 200 | throw Exception("BSpline::setControlPoints: Incompatible size of control point matrix."); |
| 201 | |
| 202 | int nc = controlPoints.rows(); |
| 203 | |
| 204 | knotaverages = controlPoints.block(0, 0, nc, numVariables); |
| 205 | coefficients = controlPoints.block(0, numVariables, nc, 1); |
| 206 | |
| 207 | checkControlPoints(); |
| 208 | } |
| 209 | |
| 210 | void BSpline::updateControlPoints(const DenseMatrix &A) |
| 211 | { |