Index: lutinmatrix/src/test/org/codelutin/math/matrix/SubMatrixTest.java diff -u lutinmatrix/src/test/org/codelutin/math/matrix/SubMatrixTest.java:1.3 lutinmatrix/src/test/org/codelutin/math/matrix/SubMatrixTest.java:1.4 --- lutinmatrix/src/test/org/codelutin/math/matrix/SubMatrixTest.java:1.3 Mon Nov 8 13:49:55 2004 +++ lutinmatrix/src/test/org/codelutin/math/matrix/SubMatrixTest.java Tue Nov 9 13:10:50 2004 @@ -23,9 +23,9 @@ * Created: 29 oct. 2004 * * @author Benjamin Poussin - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ * - * Mise a jour: $Date: 2004/11/08 13:49:55 $ + * Mise a jour: $Date: 2004/11/09 13:10:50 $ * par : $Author: bpoussin $ */ @@ -264,6 +264,36 @@ assertEquals(8, mat1.getValue(2, 0, 2), 0); } + + + public void testSubSubMults() throws Exception { + List s1 = Arrays.asList(new String[]{"a", "b", "c"}); + List s2 = Arrays.asList(new String[]{"e", "f", "g"}); + List s3 = Arrays.asList(new String[]{"k", "l", "m"}); + + MatrixNDImpl mat = null; + + mat = new MatrixNDImpl("Ma mat", new int[]{4, 4}); + + MatrixHelper.fill(mat, 4); + + mat = new MatrixNDImpl(mat); + + MatrixND smat1 = mat.getSubMatrix(1, 0, 2); + MatrixND smat2 = smat1.getSubMatrix(0, 2, 1); + + System.out.println("mat:" + mat); + System.out.println("smat1:" + smat1); + System.out.println("smat2:" + smat2); + + smat2.mults(4); + + System.out.println("mat:" + mat); + System.out.println("smat1:" + smat1); + System.out.println("smat2:" + smat2); + + } + } // SubMatrixTest