diff -Naur /users/iupisi/isi2g0/TP_JUnit/Depot/Opale/src/units/matrix/TestSolver.java Opale/src/units/matrix/TestSolver.java --- /users/iupisi/isi2g0/TP_JUnit/Depot/Opale/src/units/matrix/TestSolver.java +++ Opale/src/units/matrix/TestSolver.java Fri Feb 20 15:15:19 2004 @@ -0,0 +1,45 @@ +import junit.framework.TestCase; +import opale.matrix.solver.*; +import opale.tools.Debug; +import opale.mathtools.DVect; +import opale.matrix.*; + +class TestSolverCholesky extends TestCase +{ + + public void TestSolverCholesky() + { + SymMatrix A = new SymMatrix(3); + SymMatrix B = new SymMatrix(3); + + assertTrue(A==B); + } + + + public void TestDeterminant() + { + + SymMatrix A = new SymMatrix(3); + DVect b=new DVect(3); + DVect x=new DVect(3); + + A.set(0,0,4); + + A.set(1,0,0); + A.set(1,1,1); + + A.set(2,0,1); + A.set(2,1,1); + A.set(2,2,3); + + b.set(0,1); + b.set(1,0); + b.set(2,3); + System.out.println(A); + + SolverCholesky ch = new SolverCholesky(); + ch.decomp(A); + assertTrue(ch.determinant() == 0); + } + +}