Class MedoidLinkage.Instance

  • Enclosing class:
    MedoidLinkage<O>

    public static class MedoidLinkage.Instance
    extends AGNES.Instance
    Main worker instance of AGNES.
    Author:
    Erich Schubert
    • Constructor Detail

      • Instance

        public Instance()
        Constructor.
    • Method Detail

      • findMerge

        protected int findMerge()
        Description copied from class: AGNES.Instance
        Perform the next merge step in AGNES.
        Overrides:
        findMerge in class AGNES.Instance
        Returns:
        the index that has disappeared, for shrinking the working set
      • merge

        protected void merge​(int x,
                             int y)
        Execute the cluster merge.
        Parameters:
        x - first cluster to merge, with x > y
        y - second cluster to merge, with y < x
      • findMedoid

        private static double findMedoid​(DistanceQuery<?> dq,
                                         DBIDs c,
                                         DBIDArrayMIter prototype)
        Find the prototypes.
        Parameters:
        dq - Distance query
        c - Cluster
        prototype - Prototype output
        Returns:
        New best distance
      • updateMatrix

        protected void updateMatrix​(int x,
                                    int y)
        Update the scratch distance matrix.
        Parameters:
        x - First matrix position
        y - Second matrix position