add final to some variables

This commit is contained in:
Niklas Birk 2021-04-13 18:20:47 +02:00
parent ae8cd02318
commit 42f5e83b50
2 changed files with 4 additions and 4 deletions

View File

@ -12,8 +12,8 @@ import java.util.stream.IntStream;
public class CrossValidation public class CrossValidation
{ {
private int paramMin; private final int paramMin;
private int paramMax; private final int paramMax;
public CrossValidation(int paramMin, int paramMax) public CrossValidation(int paramMin, int paramMax)
{ {

View File

@ -15,9 +15,9 @@ public class KNearestNeighbour implements MachineLearning
private List<Vector> positives; private List<Vector> positives;
private List<Vector> negatives; private List<Vector> negatives;
private Distance distance; private final Distance distance;
private int k; private final int k;
public KNearestNeighbour(Distance distance) public KNearestNeighbour(Distance distance)
{ {