Exemple #1
0
    public static float solveLeastSquares(Mat3 a, Vector3 b, Vector3 x, float svd_tol, int svd_sweeps, float pinv_tol)
    {
        Mat3    at;
        SMat3   ata;
        Vector3 atb;

        MatUtils.transpose(out at, a);
        MatUtils.mmul_ata(out ata, a);
        MatUtils.vmul(out atb, at, b);
        return(solveSymmetric(ata, atb, x, svd_tol, svd_sweeps, pinv_tol));
    }