public class Metric extends Object
Constructor and Description |
---|
Metric() |
Modifier and Type | Method and Description |
---|---|
static double |
distance(double[] pointA)
Calculates the Euclidean length of a point.
|
static double |
distance(double[] pointA,
double[] pointB)
Calculates the Euclidean distance of two points.
|
static double |
distance(double[] pointA,
double[] pointB,
int offsetB)
Calculates the Euclidean distance of two points.
|
static double |
distanceSquared(double[] pointA)
Calculates the squared Euclidean length of a point.
|
static double |
distanceSquared(double[] pointA,
double[] pointB)
Calculates the squared Euclidean distance of two points.
|
static double |
distanceSquared(double[] pointA,
double[] pointB,
int offsetB)
Calculates the squared Euclidean distance of two points.
|
static double |
distanceWithDivision(double[] pointA,
double dA)
Calculates the Euclidean length of a point divided by a scalar.
|
static double |
distanceWithDivision(double[] pointA,
double dA,
double[] pointB)
Calculates the Euclidean distance of the first point divided by a scalar and
another second point.
|
static double |
distanceWithDivision(double[] pointA,
double dA,
double[] pointB,
double dB)
Calculates the Euclidean distance of the first point divided by a first scalar
and another second point divided by a second scalar.
|
static double |
distanceWithDivisionSquared(double[] pointA,
double dA)
Calculates the squared Euclidean length of a point divided by a scalar.
|
static double |
distanceWithDivisionSquared(double[] pointA,
double dA,
double[] pointB)
Calculates the squared Euclidean distance of the first point divided by a
scalar and another second point.
|
static double |
distanceWithDivisionSquared(double[] pointA,
double dA,
double[] pointB,
double dB)
Calculates the squared Euclidean distance of the first point divided by a
first scalar and another second point divided by a second scalar.
|
static double |
dotProduct(double[] pointA)
Calculates the dot product of the point with itself.
|
static double |
dotProduct(double[] pointA,
double[] pointB)
Calculates the dot product of the first point with a second point.
|
static double |
dotProductWithAddition(double[] pointA1,
double[] pointA2,
double[] pointB)
Calculates the dot product of the addition of the first and the second
point with the third point.
|
static double |
dotProductWithAddition(double[] pointA1,
double[] pointA2,
double[] pointB1,
double[] pointB2)
Calculates the dot product of the addition of the first and the second
point with the addition of the third and the fourth point.
|
public static double distanceSquared(double[] pointA)
pointA
- pointpublic static double distance(double[] pointA)
pointA
- pointpublic static double distanceSquared(double[] pointA, double[] pointB, int offsetB)
pointA
- first pointpointB
- second pointoffsetB
- start dimension - 1 of pointBpublic static double distance(double[] pointA, double[] pointB, int offsetB)
pointA
- first pointpointB
- second pointoffsetB
- start dimension - 1 of pointBpublic static double distanceSquared(double[] pointA, double[] pointB)
pointA
- first pointpointB
- second pointpublic static double distance(double[] pointA, double[] pointB)
pointA
- first pointpointB
- second pointpublic static double distanceWithDivisionSquared(double[] pointA, double dA)
pointA
- pointdA
- scalarpublic static double distanceWithDivision(double[] pointA, double dA)
pointA
- pointdA
- scalarpublic static double distanceWithDivisionSquared(double[] pointA, double dA, double[] pointB)
pointA
- first pointdA
- scalarpointB
- second pointpublic static double distanceWithDivision(double[] pointA, double dA, double[] pointB)
pointA
- first pointdA
- scalarpointB
- second pointpublic static double distanceWithDivisionSquared(double[] pointA, double dA, double[] pointB, double dB)
pointA
- first pointdA
- first scalarpointB
- second pointdB
- second scalarpublic static double distanceWithDivision(double[] pointA, double dA, double[] pointB, double dB)
pointA
- first pointdA
- first scalarpointB
- second pointdB
- second scalarpublic static double dotProduct(double[] pointA)
pointA
- pointpublic static double dotProduct(double[] pointA, double[] pointB)
pointA
- first pointpointB
- second pointpublic static double dotProductWithAddition(double[] pointA1, double[] pointA2, double[] pointB)
pointA1
- first pointpointA2
- second pointpointB
- third pointpublic static double dotProductWithAddition(double[] pointA1, double[] pointA2, double[] pointB1, double[] pointB2)
pointA1
- first pointpointA2
- second pointpointB1
- third pointpointB2
- fourth pointCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.