Accord.Math.Decompositions.JaggedEigenvalueDecomposition.Reverse C# (CSharp) Method

Reverse() public method

Reverses the decomposition, reconstructing the original matrix X.
public Reverse ( ) : Double[][]
return Double[][]
        public Double[][] Reverse()
        {
            return V.DotWithDiagonal(d).Divide(V);
        }

Usage Example

        public void EigenvalueDecompositionConstructorTest2()
        {
            // Asymmetric test
            double[][] A =
            {
                new double[] {  5, 2, 1 },
                new double[] {  1, 4, 1 },
                new double[] { -1, 2, 3 }
            };

            var target = new JaggedEigenvalueDecomposition(A);
            var D = target.DiagonalMatrix;
            var Q = target.Eigenvectors;

            double[][] expectedD =
            { 
                new double[] { 6, 0, 0 },
                new double[] { 0, 4, 0 },
                new double[] { 0, 0, 2 }
            };

            // Decomposition identity
            var actualA = Matrix.Multiply(Matrix.Multiply(Q, D), Q.Inverse());

            Assert.IsTrue(Matrix.IsEqual(expectedD, D, 1e-5));
            Assert.IsTrue(Matrix.IsEqual(A, actualA, 1e-5));
            Assert.IsTrue(Matrix.IsEqual(A, target.Reverse(), 1e-5));
        }
All Usage Examples Of Accord.Math.Decompositions.JaggedEigenvalueDecomposition::Reverse