Package fr.ifremer.isisfish.util.matrix
Class MatrixCSVHelper
java.lang.Object
fr.ifremer.isisfish.util.matrix.MatrixCSVHelper
Classe permettant de convertir une matrice en String et inversement en
prenant en compte la conversion des semantiques via l'utilisation
d'un decorator (
EntitySemanticsDecorator).
Ce format est utilise comme format de sauvegarde des resultats dans les
simulation. Il remplace le stockage en base et les fichiers mapper.
Format d'une matrice:
# commentaire [nom] [nom dimension1]:[semantique1];[semantique2];... [nom dimension2]:[semantique1];[semantique2];... ... [ligne blanche] [coordonnee1];[coordonnee2];...;[valeur] [coordonnee1];[coordonnee2];...;[valeur] [coordonnee1];[coordonnee2];...;[valeur] ...Exemple
MaMatrice Mois:Janvier;Fevrier;Mars Ville:Nantes;Paris;Nice 1;1;2;13.5 0;2;1;4.2
- Since:
- 4.4.1.0
- Version:
- $Revision$ Last update: $Date$ by : $Author$
- Author:
- poussin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.nuiton.math.matrix.MatrixFactoryorg.nuiton.math.matrix.MatrixNDreadMatrix(Reader reader) org.nuiton.math.matrix.MatrixNDreadMatrix(String mat) protected Stringundecorate(Object o) undecorate(List l) return new list with undecorate itemvoidwriteMatrix(Writer writer, String name, org.nuiton.math.matrix.MatrixND mat) writeMatrix(String name, org.nuiton.math.matrix.MatrixND mat)
-
Field Details
-
decorator
-
-
Constructor Details
-
MatrixCSVHelper
public MatrixCSVHelper() -
MatrixCSVHelper
-
-
Method Details
-
getMatrixFactory
protected org.nuiton.math.matrix.MatrixFactory getMatrixFactory() -
undecorate
return new list with undecorate item- Parameters:
l-- Returns:
- new list
-
undecorate
-
readMatrix
- Throws:
IOException
-
writeMatrix
- Throws:
IOException
-
readMatrix
- Throws:
IOException
-
writeMatrix
-