Package elki.math.geometry
Class PrimsMinimumSpanningTree.Array2DAdapter
- java.lang.Object
-
- elki.math.geometry.PrimsMinimumSpanningTree.Array2DAdapter
-
- All Implemented Interfaces:
PrimsMinimumSpanningTree.Adapter<double[][]>
- Enclosing class:
- PrimsMinimumSpanningTree
public static class PrimsMinimumSpanningTree.Array2DAdapter extends java.lang.Object implements PrimsMinimumSpanningTree.Adapter<double[][]>
Adapter for a simple 2d double matrix.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Array2DAdapter()
Constructor.
-
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
-
-