예제 #1
0
        // Token: 0x060002EE RID: 750 RVA: 0x00030660 File Offset: 0x0002E860
        public static double[,] Inverse(double[,] a)
        {
            int length = a.GetLength(0);

            double[,] a2    = MatrixMath.Copy(a);
            double[,] array = new double[length, length];
            double[] array2 = new double[length];
            int[]    index  = new int[length];
            double   d      = 1.0;

            LUDecomposition(a2, index, d);
            for (int i = 0; i < length; i++)
            {
                for (int j = 0; j < length; j++)
                {
                    array2[j] = 0.0;
                }
                array2[i] = 1.0;
                BackSubstitution(a2, index, array2);
                for (int k = 0; k < length; k++)
                {
                    array[k, i] = array2[k];
                }
            }
            return(array);
        }
예제 #2
0
        // Token: 0x060002EB RID: 747 RVA: 0x00030548 File Offset: 0x0002E748
        public static double[] LinearSystemSolve(double[,] a, double[] b)
        {
            int length = a.GetLength(0);

            int[] index = new int[length];
            double[,] a2 = MatrixMath.Copy(a);
            double d = 1.0;

            LUDecomposition(a2, index, d);
            return(BackSolve(a2, index, b));
        }
예제 #3
0
 // Token: 0x060002EA RID: 746 RVA: 0x00030528 File Offset: 0x0002E728
 public static double[] BackSolve(double[,] a, int[] index, double[] b)
 {
     double[] array = MatrixMath.Copy(b);
     BackSubstitution(a, index, array);
     return(array);
 }