Как я могу это исправить?:
exception in thread main java.lang.nullpointerexception
at KMeans$Builder.<init>
at KMeans.main<KMeans.java>
Я пытался использовать @notnull, но он не работал Код:
public static class Builder {
private final int k;
private final double[][] points;
private int iterations = 10;
private boolean pp = true;
private double epsilon = .001;
private boolean useEpsilon = true;
private boolean L1norm = true;
public Builder(int k, double[][] points) {
if (k > points.length)
throw new IllegalArgumentException("Required: # of points >= # of clusters");
HashSet<double[]> hashSet = new HashSet<double[]>(k);
int distinct = 0; }