public class QuadraticFormDistance
extends java.lang.Object
Constructor and Description |
---|
QuadraticFormDistance(java.util.ArrayList<Vertex3D> form,
double theta)
Constructs object with the information required for QFD calculations.
|
Modifier and Type | Method and Description |
---|---|
void |
calculateSimilarityMatrix(double theta)
Calcuates matrix of similarities from bin i to bin j.
|
double |
getDistance(double[] a,
double[] b)
Calculates square distance between one vector to another.
|
public QuadraticFormDistance(java.util.ArrayList<Vertex3D> form, double theta)
form
- a set of points; there should be as many
points as there are entries in the vectors that will be
compared. Each point represents the point in 3D space
corresponding to a "dimension" of a vector; the "form".theta
- controls the shape of the matrix. Lower values
means elements are more similar, and vice-versa. Good values
to try are between 1 and 10.public void calculateSimilarityMatrix(double theta)
[1][x][x][x][x] [s][1][x][x][x] [s][s][1][x][x] [s][s][s][1][x] [s][s][s][s][1]Does not save the x elements (to conserve memory).
theta
- controls the shape of the matrix. Lower values
means elements are more similar, and vice-versa. Good values
to try are between 1 and 10.public double getDistance(double[] a, double[] b)
a
- vector 'a'b
- vector 'b'