public abstract class KNNDistance extends water.Iced<KNNDistance>
| Modifier and Type | Field and Description |
|---|---|
double[] |
values |
int |
valuesLength |
| Constructor and Description |
|---|
KNNDistance() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
calculateValues(double v1,
double v2)
Method to cumulate partial calculations of distance between two vectors and save it to values array.
|
void |
initializeValues()
Initialize values array to store partial calculation of distance.
|
abstract double |
nom(double v1,
double v2)
Method to calculate the distance between two points from two vectors.
|
abstract double |
result()
Calculate the result from cumulated values.
|
public abstract double nom(double v1,
double v2)
v1 - value of an item in the first vectorv2 - value of an item in the second vectorpublic void initializeValues()
public abstract void calculateValues(double v1,
double v2)
v1 - value of an item in the first vectorv2 - value of an item in the second vectorpublic abstract double result()