Class AbstractLayout3DPC.LowerTriangularAdapter
- java.lang.Object
-
- elki.visualization.parallel3d.layout.AbstractLayout3DPC.LowerTriangularAdapter
-
- All Implemented Interfaces:
PrimsMinimumSpanningTree.Adapter<double[]>
- Enclosing class:
- AbstractLayout3DPC<N extends Layout.Node>
private static class AbstractLayout3DPC.LowerTriangularAdapter extends java.lang.Object implements PrimsMinimumSpanningTree.Adapter<double[]>
Class to use a lower-triangular similarity matrix for distance-based Prim's spanning tree.Implementation note: the edges are given as an array of 2*e values.
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
dim
-
Constructor Summary
Constructors Constructor Description LowerTriangularAdapter(int dim)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(double[] data, int i, int j)
Get the distance of two objectsint
size(double[] data)
Get number of objects in dataset
-
-
-
Method Detail
-
distance
public double distance(double[] data, int i, int j)
Description copied from interface:PrimsMinimumSpanningTree.Adapter
Get the distance of two objects- Specified by:
distance
in interfacePrimsMinimumSpanningTree.Adapter<double[]>
- Parameters:
data
- Data seti
- First indexj
- Second index- Returns:
- Distance of objects number i and number j.
-
size
public int size(double[] data)
Description copied from interface:PrimsMinimumSpanningTree.Adapter
Get number of objects in dataset- Specified by:
size
in interfacePrimsMinimumSpanningTree.Adapter<double[]>
- Returns:
- Size
-
-