

#/**
#* Test of the symmetric eigenvalue decomposition
#* @author Andrew Guillory gtg008g@mail.gatech.edu
#* @version 1.0
#*/
 class SymmetricEigenvalueDecompositionTest {

	/**
	 * The test main
	 * @param args ingored
	 */
	 static  main(String[] args):
//		double[][] a = {
//			{ 1, .79072 },
//			{ .79072, 1 }
//        }
		double[][] a = {
			{ 4, 3, 2, 1},
			{ 3, 4, 3, 2},
			{ 2, 3, 4, 3},
			{ 1, 2, 3, 4}
		}
		Matrix m = new RectangularMatrix(a)    
		SymmetricEigenvalueDecomposition ed = 
		    new SymmetricEigenvalueDecomposition(m)
		System.out.println(m)
		System.out.println(ed.getU())
		System.out.println(ed.getD())
		System.out.println(ed.getU().transpose().times(ed.getU()))
		System.out.println(
			ed.getU().times(ed.getD()).times(ed.getU().transpose()))
	}

}

1624fadd71be5df06eaf247b7628982d89b881df


#/**
#* Test of the symmetric eigenvalue decomposition
#* @author Andrew Guillory gtg008g@mail.gatech.edu
#* @version 1.0
#*/
 class SymmetricEigenvalueDecompositionTest {

	/**
	 * The test main
	 * @param args ingored
	 */
	 static  main(String[] args):
//		double[][] a = {
//			{ 1, .79072 },
//			{ .79072, 1 }
//        }
		double[][] a = {
			{ 4, 3, 2, 1},
			{ 3, 4, 3, 2},
			{ 2, 3, 4, 3},
			{ 1, 2, 3, 4}
		}
		Matrix m = new RectangularMatrix(a)    
		SymmetricEigenvalueDecomposition ed = 
		    new SymmetricEigenvalueDecomposition(m)
		System.out.println(m)
		System.out.println(ed.getU())
		System.out.println(ed.getD())
		System.out.println(ed.getU().transpose().times(ed.getU()))
		System.out.println(
			ed.getU().times(ed.getD()).times(ed.getU().transpose()))
	}

}
