Class BMSSCInstance

java.lang.Object
es.urjc.etsii.grafo.io.Instance
es.urjc.etsii.grafo.bmssc.model.BMSSCInstance
All Implemented Interfaces:
Comparable<Instance>

public class BMSSCInstance extends Instance
  • Field Details

    • INSTANCE_COMPARATOR

      public static final Comparator<BMSSCInstance> INSTANCE_COMPARATOR
      Order instances by increasing number of points
    • n

      public final int n
      Number of points
    • d

      public final int d
      Number of dimensions
    • k

      public final int k
      Number of clusters
    • distances

      protected double[][] distances
      Symmetric matrix, stores the cost between any two points
    • minPointsPerCluster

      public final int minPointsPerCluster
      Minimum points per cluster (minPointsPerCluster = n / k)
  • Constructor Details

    • BMSSCInstance

      public BMSSCInstance(String name, int n, int d, int k, double[][] pointData)
  • 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

      public int compareTo(Instance other)
      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 interface Comparable<Instance>
      Overrides:
      compareTo in class Instance
    • getPoints

      public List<Integer> getPoints()