Fix Nettoyage longueur
This commit is contained in:
@@ -28,15 +28,26 @@ public class Application {
|
||||
|
||||
HashSet<Poisson> mackerelSet = MackerelSerra.parse(rawMackerel);
|
||||
|
||||
System.out.println( "Avant nettoyage et complétion" );
|
||||
System.out.println( mackerelSet );
|
||||
|
||||
Function<Poisson,Double> getLength = Poisson::getLength;
|
||||
Function<Poisson,Double> getInfes = Poisson::getInfestation;
|
||||
BiConsumer<Poisson,Double> setInfes = Poisson::setInfestation;
|
||||
|
||||
mackerelSet = Nettoyage.nettoieColumns( mackerelSet, Poisson::getLength, Poisson::setLength, false );
|
||||
mackerelSet = Completion.completeColumnsMoyenne( mackerelSet, Poisson::getLength, Poisson::setLength );
|
||||
|
||||
System.out.println( "Après Nettoyage et complétion de la longueur du poisson." );
|
||||
System.out.println( mackerelSet );
|
||||
|
||||
mackerelSet = Nettoyage.nettoieColumns( mackerelSet, getInfes, setInfes, false );
|
||||
mackerelSet = Completion.completeColumnsLinear( mackerelSet, getLength, getInfes, setInfes );
|
||||
|
||||
System.out.println( "Après Nettoyage et complétion du taux d'infestation des poissons" );
|
||||
System.out.println( mackerelSet );
|
||||
|
||||
// Conversion des valeurs.
|
||||
HashSet<ValeursXY> mackerelXY = ValeursXY.convertToXY( mackerelSet, getLength, getInfes );
|
||||
HashMap<String, ArrayList<Double>> axes = SVGBuilder.calcPointAxes( mackerelXY );
|
||||
System.out.println( axes );
|
||||
@@ -52,7 +63,7 @@ public class Application {
|
||||
// Sauvegarde pour plus tard.
|
||||
double[] ABCoef = Completion.getLinearCoef(mackerelSet, getLength, getInfes);
|
||||
|
||||
ArrayList<Element> SVGElements = axesInstance.buildAll( "Length", "Infestation", mackerelXY, ABCoef[0], ABCoef[1] );
|
||||
ArrayList<Element> SVGElements = axesInstance.buildAll( "Length (mm)", "Taux d'infestation", mackerelXY, ABCoef[0], ABCoef[1] );
|
||||
SVGFactory.createSVG( SVGElements );
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user