Пример #1
0
    public static void GetSymmetricSvd(SMat3 a, SMat3 vtav, Mat3 v, double tol, int max_sweeps)
    {
        vtav.SetSymmetric(a);
        v.Set(1, 0, 0, 0, 1, 0, 0, 0, 1);
        double delta = tol * MatUtils.Norm(vtav);

        for (int i = 0; i < max_sweeps && MatUtils.off(vtav) > delta; ++i)
        {
            Rotate01(vtav, v);
            Rotate02(vtav, v);
            Rotate12(vtav, v);
        }
    }