コード例 #1
0
    public static double SolveLeastSquares(Mat3 a, Vector3 b, out Vector3 x, double svd_tol, int svd_sweeps, double pinv_tol)
    {
        var at  = MatUtils.Transpose(a);
        var ata = MatUtils.MmulAta(a);
        var atb = MatUtils.VMul(at, b);

        return(SolveSymmetric(ata, atb, out x, svd_tol, svd_sweeps, pinv_tol));
    }