public class Util
extends java.lang.Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
protected static double |
euclideanDistance(double[] instance1,
double[] instance2)
Calculates the Euclidean distance between two instances
|
protected static double |
euclideanDistanceNS(double[] instance1,
double[] instance2)
Calculates the unsquared Euclidean distance between two instances
|
static void |
print(java.lang.String text)
Prints a text in the standard output
|
static void |
printInstance(double[] instance)
Prints on the standard output the contents of the instance
|
static void |
printMatrix(double[][] data)
Prints on the standard output a string with the contents of a data matrix
|
static boolean |
same(double[] a,
double[] b)
Checks if two instances are the same
|
protected static double euclideanDistance(double[] instance1, double[] instance2)
instance1
- First instanceinstance2
- Second instanceprotected static double euclideanDistanceNS(double[] instance1, double[] instance2)
instance1
- First instanceinstance2
- Second instancepublic static boolean same(double[] a, double[] b)
a
- First instanceb
- Second instancepublic static void printInstance(double[] instance)
instance
- Instance to print.public static void printMatrix(double[][] data)
data
- Data matrix to print.public static void print(java.lang.String text)
text
- Text to print