Class ClusterOrder

  • All Implemented Interfaces:
    OrderingResult
    Direct Known Subclasses:
    CorrelationClusterOrder

    public class ClusterOrder
    extends java.lang.Object
    implements OrderingResult
    Class to store the result of an ordering clustering algorithm such as OPTICS.
    Since:
    0.7.0
    Author:
    Erich Schubert
    • Method Detail

      • add

        public void add​(DBIDRef id,
                        double reach,
                        DBIDRef pre)
        Add an object to the cluster order.
        Parameters:
        id - Object id
        reach - Reachability
        pre - Predecessor
      • order

        public ArrayModifiableDBIDs order​(DBIDs ids)
        Use the cluster order to sort the given collection ids. Implementation of the OrderingResult interface.
        Specified by:
        order in interface OrderingResult
        Parameters:
        ids - Collection of ids.
        Returns:
        iterator for sorted array of ids
      • size

        public int size()
        Size.
        Returns:
        Size
      • getReachability

        public double getReachability​(DBIDRef id)
        Get the reachability of an object.
        Parameters:
        id - Object id
        Returns:
        Reachability
      • getPredecessor

        public void getPredecessor​(DBIDRef id,
                                   DBIDVar out)
        Get the predecessor.
        Parameters:
        id - Current id.
        out - Output variable to store the predecessor.