Author: echatellier Date: 2010-12-16 11:25:57 +0100 (Thu, 16 Dec 2010) New Revision: 313 Url: http://nuiton.org/repositories/revision/nuiton-matrix/313 Log: Add doc. Modified: trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/SubMatrix.java Modified: trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/SubMatrix.java =================================================================== --- trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/SubMatrix.java 2010-12-16 09:41:57 UTC (rev 312) +++ trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/SubMatrix.java 2010-12-16 10:25:57 UTC (rev 313) @@ -5,7 +5,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2004 - 2010 CodeLutin + * Copyright (C) 2004 - 2010 CodeLutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -36,6 +36,8 @@ * que la matrice qu'elle contient. Elle permet juste de reduire le nombre * d'element d'une dimension. * + * C'est comme une "vue" réduite sur la vraie matrices. + * * Created: 29 oct. 2004 * * @author Benjamin Poussin <poussin@codelutin.com> @@ -48,8 +50,9 @@ /** serialVersionUID. */ private static final long serialVersionUID = 4092234115185263506L; - + protected MatrixND matrix = null; + protected DimensionConverter converter = null; public SubMatrix(MatrixND matrix, int dim, int start, int nb) { @@ -165,8 +168,8 @@ /** * La conversion est juste un decalage d'indice */ - protected class ShiftConverter implements DimensionConverter { - /** */ + protected static class ShiftConverter implements DimensionConverter { + /** serialVersionUID. */ private static final long serialVersionUID = 1L; protected int dim; @@ -195,13 +198,13 @@ } /** - * La conversion est le mapping d'un element vers un autre element + * La conversion est le mapping d'un element vers un autre element. */ - protected class MappingConverter implements DimensionConverter { + protected static class MappingConverter implements DimensionConverter { /** serialVersionUID. */ private static final long serialVersionUID = -6367416559713556559L; - + protected int dim; protected int[] elem = null; @@ -218,7 +221,7 @@ result = new int[coordinates.length]; System.arraycopy(coordinates, 0, result, 0, result.length); result[dim] = elem[coordinates[dim]]; - + } else { throw new NoSuchElementException( "L'indice est supérieur au nombre d'élements de la sous matrice pour cette dimension."); @@ -228,4 +231,3 @@ } } // SubMatrix -
participants (1)
-
echatellier@users.nuiton.org