Skip to content
Snippets Groups Projects
Commit a43d8d6d authored by guyslain.naves's avatar guyslain.naves
Browse files

remove some warnings and inspection problems

parent 640fad68
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,6 @@ package fr.univamu.graph;
import fr.univamu.helpers.Iterations;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
......@@ -15,7 +13,7 @@ public class UndirectedGraph {
private int order;
private int edgeCardinality;
List<List<Edge>> adjacencies;
final List<List<Edge>> adjacencies;
public boolean isVertex(int index) {
......
......@@ -4,9 +4,7 @@ import fr.univamu.graph.EmbeddedGraph;
import fr.univamu.graph.UndirectedGraph;
import fr.univamu.helpers.Point;
import java.util.ArrayList;
import java.util.Random;
import java.util.function.Supplier;
public class ErdosRenyi implements EmbeddedGraph {
......
......@@ -24,7 +24,6 @@ public class NodeStats {
public NodeStats(RootedTree tree) {
this.tree = tree;
int maxVertex = tree.maxNode();
for (int vertex = 0; vertex < maxVertex + 1; vertex++) {
stats.add(null);
......@@ -33,8 +32,6 @@ public class NodeStats {
}
private final RootedTree tree;
private final List<Stats> stats = new ArrayList<>();
private record Stats(int height, int depth, int degree, int size) {
......
......@@ -27,7 +27,7 @@ public record RootedTree(int root, List<RootedTree> children)
}
public Iterable<RootedTree> bfsIterable() {
return this::iterator;
return this;
}
public Iterable<RootedTree> dfsIterable() {
......@@ -77,7 +77,6 @@ public record RootedTree(int root, List<RootedTree> children)
.filter(v -> !rootParent.equals(Optional.of(v)))
.map(v -> getNode(v,graph,toParent))
.toList();
;
return new RootedTree(root, children);
}
......
......@@ -66,9 +66,9 @@ public class Search {
}
private final UndirectedGraph graph;
Frontier frontier;
BitSet reached;
List<Path> paths;
final Frontier frontier;
final BitSet reached;
final List<Path> paths;
private void process(Path path) {
......
package fr.univamu.helpers;
import fr.univamu.graph.rootedtrees.RootedTree;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
......@@ -91,7 +89,7 @@ public class Iterations {
public static <T> Iterable<T> concat(Iterable<? extends Iterable<T>> iterables) {
return () -> new Iterator<T>() {
private Iterator<? extends Iterable<T>> futureIterators = iterables.iterator();
private final Iterator<? extends Iterable<T>> futureIterators = iterables.iterator();
private Iterator<T> currentIterator;
{ prepareNext(); }
......
......@@ -52,7 +52,6 @@ public class RainbowDrawingParameters implements DrawingParameters {
double saturation = 0.7;
double brightness =
Math.min(100.0, params.brightnessSlope * height + params.minBrightness) / 100.0;
Color col = Color.hsb(hue, saturation, brightness);
return col;
return Color.hsb(hue, saturation, brightness);
}
}
module fr.univamu.randomtree {
requires javafx.controls;
requires javafx.graphics;
requires javafx.fxml;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment