Example #1
0
        private CompoundNumber[,] getMatrixX(CompoundNumber determinant, CompoundNumber[,] adjunctMatrixA, CompoundNumber[,] matrixB)
        {
            CompoundNumber[,] tempMatrix = multiplyMatrixes(adjunctMatrixA, matrixB);

            for (int i = 0; i <= matrixB.GetUpperBound(0); i++)
            {
                tempMatrix[i, 0] = (new CompoundNumber(1) / determinant) * tempMatrix[i, 0];
            }

            return(tempMatrix);
        }
Example #2
0
        private CompoundNumber[,] adjunctMatrix(CompoundNumber[,] matrix)
        {
            CompoundNumber[,] adjunctMatrix = new CompoundNumber[matrix.GetUpperBound(0) + 1, matrix.GetUpperBound(1) + 1];

            for (int i = 0; i <= adjunctMatrix.GetUpperBound(0); i++)
            {
                for (int j = 0; j <= adjunctMatrix.GetUpperBound(0); j++)
                {
                    adjunctMatrix[i, j] = new Determinant(matrix, i, j).getValue();
                }
            }

            return(adjunctMatrix);
        }