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 intNumber of dimensionsprotected double[][]Symmetric matrix, stores the cost between any two pointsstatic final Comparator<BMSSCInstance> Order instances by increasing number of pointsfinal intNumber of clustersfinal intMinimum points per cluster (minPointsPerCluster = n / k)final intNumber of pointsFields inherited from class es.urjc.etsii.grafo.io.Instance
LOAD_TIME_NANOS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintSort order will determine in which order the instances will be solved Sort defaults to instance namedoubledistance(int a, int b) doubledistanceBetween(double[] a, double[] b) intgetClusterSize(int i) int[]intintintdouble[]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:InstanceSort order will determine in which order the instances will be solved Sort defaults to instance name- Specified by:
compareToin interfaceComparable<Instance>- Overrides:
compareToin classInstance
-
getPoints
-