Class MiniMaxAnderberg.Instance

  • Enclosing class:
    MiniMaxAnderberg<O>

    public static class MiniMaxAnderberg.Instance
    extends MiniMax.Instance
    Main worker instance of MiniMax.
    Author:
    Erich Schubert
    • Field Detail

      • bestd

        protected double[] bestd
        Cache: best distance
      • besti

        protected int[] besti
        Cache: index of best distance
    • Constructor Detail

      • Instance

        public Instance()
    • Method Detail

      • findMerge

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

        protected void merge​(int x,
                             int y)
        Description copied from class: MiniMax.Instance
        Merges two clusters given by x, y, their points with smallest IDs, and y to keep
        Overrides:
        merge in class MiniMax.Instance
        Parameters:
        x - first cluster to merge
        y - second cluster to merge
      • updateMatrices

        private void updateMatrices​(int x,
                                    int y)
        Update the entries of the matrices that contain a distance to y, the newly merged cluster.
        Parameters:
        x - first cluster to merge, with x > y
        y - second cluster to merge, with y < x