Tracé des points et de la regression

This commit is contained in:
2026-04-27 15:18:30 +02:00
parent 82901f623b
commit 1b9efaa239
5 changed files with 182 additions and 142 deletions

View File

@@ -10,9 +10,8 @@ import ecoparasite.poisson.MackerelSerra;
import ecoparasite.poisson.Poisson;
import ecoparasite.representation.ValeursXY;
import ecoparasite.svg.IncorrectAxesPointsException;
import ecoparasite.svg.SVGAxes;
import ecoparasite.svg.SVGBuilder;
import ecoparasite.svg.SVGFactory;
import ecoparasite.svg.SVGResizing;
import ecoparasite.svg.elements.Element;
import java.util.ArrayList;
@@ -39,18 +38,21 @@ public class Application {
mackerelSet = Completion.completeColumnsLinear( mackerelSet, getLength, getInfes, setInfes );
HashSet<ValeursXY> mackerelXY = ValeursXY.convertToXY( mackerelSet, getLength, getInfes );
HashMap<String, ArrayList<Double>> axes = SVGFactory.PointAXES( mackerelXY );
HashMap<String, ArrayList<Double>> axes = SVGBuilder.calcPointAxes( mackerelXY );
System.out.println( axes );
SVGAxes axesInstance;
SVGBuilder axesInstance;
try {
axesInstance = new SVGAxes(axes);
axesInstance = new SVGBuilder(axes);
} catch (IncorrectAxesPointsException e) {
System.out.println( "Mauvais format communiqué" );
return;
}
ArrayList<Element> SVGElements = axesInstance.buildAll( "Length", "Infestation" );
// Sauvegarde pour plus tard.
double[] ABCoef = Completion.getLinearCoef(mackerelSet, getLength, getInfes);
ArrayList<Element> SVGElements = axesInstance.buildAll( "Length", "Infestation", mackerelXY, ABCoef[0], ABCoef[1] );
SVGFactory.createSVG( SVGElements );
}