public class MatrixCSVHelper extends Object
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
Modifier and Type | Field and Description |
---|---|
protected EntitySemanticsDecorator |
decorator |
Constructor and Description |
---|
MatrixCSVHelper() |
MatrixCSVHelper(EntitySemanticsDecorator decorator) |
Modifier and Type | Method and Description |
---|---|
protected org.nuiton.math.matrix.MatrixFactory |
getMatrixFactory() |
org.nuiton.math.matrix.MatrixND |
readMatrix(Reader reader) |
org.nuiton.math.matrix.MatrixND |
readMatrix(String mat) |
protected List<String> |
undecorate(List l)
return new list with undecorate item
|
protected String |
undecorate(Object o) |
String |
writeMatrix(String name,
org.nuiton.math.matrix.MatrixND mat) |
void |
writeMatrix(Writer writer,
String name,
org.nuiton.math.matrix.MatrixND mat) |
protected EntitySemanticsDecorator decorator
public MatrixCSVHelper()
public MatrixCSVHelper(EntitySemanticsDecorator decorator)
protected org.nuiton.math.matrix.MatrixFactory getMatrixFactory()
protected List<String> undecorate(List l)
l
- public org.nuiton.math.matrix.MatrixND readMatrix(String mat) throws IOException
IOException
public String writeMatrix(String name, org.nuiton.math.matrix.MatrixND mat) throws IOException
IOException
public org.nuiton.math.matrix.MatrixND readMatrix(Reader reader) throws IOException
IOException
Copyright © 1999–2020 CodeLutin. All rights reserved.