pub fn constrained_least_squares(
a: &Matrix,
b: &[f64],
c: &Matrix,
d: &[f64],
) -> NumericResult<ConstrainedSolution>Expand description
Minimise ||A x - b||_2 subject to C x = d by the null-space method.
C (p x n) must have full row rank p <= n, and A must have full
column rank on the null space of C, so the minimiser is unique. Use
this to fit with interpolated points or prescribed end tangents.
§Errors
Refuses mismatched sizes, non-finite input, a rank-deficient constraint matrix (redundant or conflicting constraints) and an objective that does not determine the solution on the constraints’ null space.