Package es.urjc.etsii.grafo.bmssc.model
Class BMSSCInstance
java.lang.Object
es.urjc.etsii.grafo.io.Instance
es.urjc.etsii.grafo.bmssc.model.BMSSCInstance
- All Implemented Interfaces:
Comparable<Instance>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
Number of dimensionsprotected double[][]
Symmetric matrix, stores the cost between any two pointsstatic final Comparator
<BMSSCInstance> Order instances by increasing number of pointsfinal int
Number of clustersfinal int
Minimum points per cluster (minPointsPerCluster = n / k)final int
Number of pointsFields inherited from class es.urjc.etsii.grafo.io.Instance
LOAD_TIME_NANOS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Sort order will determine in which order the instances will be solved Sort defaults to instance namedouble
distance
(int a, int b) double
distanceBetween
(double[] a, double[] b) int
getClusterSize
(int i) int[]
int
int
int
double[]
getPoint
(int a) Methods inherited from class es.urjc.etsii.grafo.io.Instance
customProperties, equals, getId, getPath, getProperty, getPropertyOrDefault, getUniquePropertiesKeys, hashCode, resetProperties, setPath, setProperty, toString
-
Field Details
-
INSTANCE_COMPARATOR
Order instances by increasing number of points -
n
public final int nNumber of points -
d
public final int dNumber of dimensions -
k
public final int kNumber of clusters -
distances
protected double[][] distancesSymmetric matrix, stores the cost between any two points -
minPointsPerCluster
public final int minPointsPerClusterMinimum points per cluster (minPointsPerCluster = n / k)
-
-
Constructor Details
-
BMSSCInstance
-
-
Method Details
-
distanceBetween
public double distanceBetween(double[] a, double[] b) -
getPoint
public double[] getPoint(int a) -
getClusterSize
public int getClusterSize(int i) -
getClusterSizes
public int[] getClusterSizes() -
distance
public double distance(int a, int b) -
getNPoints
public int getNPoints() -
getNDimensions
public int getNDimensions() -
getNClusters
public int getNClusters() -
compareTo
Description copied from class:Instance
Sort order will determine in which order the instances will be solved Sort defaults to instance name- Specified by:
compareTo
in interfaceComparable<Instance>
- Overrides:
compareTo
in classInstance
-
getPoints
-