// Region Func calc public Matrice testfunct() { // X = new Matrice(PointMesuré.Count + gpslist.Count, PointMesuré.Count); //-----> Define Matrice A (envoyé les elem) A = DefineMatriceA(PointMesuré, AllVise); // -----> Define matrice colonne B; B = DefineMatriceB(AllVise); // -----> Define matrice Pondération P; P = DefineMatriceP(AllVise); // logique de calcul --> X = Matrice.StupidMultiply(Matrice.StupidMultiply(Matrice.Transpose(A), P), A); N = X; suite_des_calcules(N); X = X.Invert();// Multiplication X = Matrice.StupidMultiply(X, Matrice.Transpose(A)); X = Matrice.StupidMultiply(X, P); X = Matrice.StupidMultiply(X, B); X1 = X; Tmp = Matrice.Add(X, -X1); return Tmp; }
// Power matrix to exponent public static Matrice Power(Matrice m, int pow) { if (pow == 0) return IdentityMatrix(m.rows, m.cols); if (pow == 1) return m.Duplicate(); if (pow == -1) return m.Invert(); Matrice x; if (pow < 0) { x = m.Invert(); pow *= -1; } else x = m.Duplicate(); Matrice ret = IdentityMatrix(m.rows, m.cols); while (pow != 0) { if ((pow & 1) == 1) ret *= x; x *= x; pow >>= 1; } return ret; }
public void suite_des_calcules(Matrice N) { int DegreLiberte; double chideuxval; double a; double b; N = N.Invert(); DegreLiberte = (AllVise.Count() * 2) - (PointMesuré.Count() * 2); chideuxval = chideux[DegreLiberte]; a = Math.Sqrt(chideuxval) * chideuxval; b = Math.Sqrt(chideuxval) * chideuxval; // matrice diagonal + matrice triangulaire sup + matrice tirangulaire inf // On peut avoir le determinant ? // a et b }