Esempio n. 1
0
        public static float CalcError(Mat3 A, Vector3 x, Vector3 b)
        {
            Vector3 vtmp = new Vector3();

            vtmp = MatUtils.Vmul(A, x);
            //vtmp = b - vtmp;
            vtmp = VecUtils.Sub(b, vtmp);
            return(Vector3.Dot(vtmp, vtmp));
        }
Esempio n. 2
0
        public static float CalcError(SMat3 origA, Vector3 x, Vector3 b)
        {
            Mat3    A    = new Mat3();
            Vector3 vtmp = new Vector3();

            A.SetSymmetric(origA);
            vtmp = MatUtils.Vmul(A, x);
            vtmp = VecUtils.Sub(b, vtmp);
            //vtmp = b - vtmp;
            return(Vector3.Dot(vtmp, vtmp));
        }