Class Assignments<E extends MTreeEntry>

  • Type Parameters:
    E - the type of MetricalEntry used in the M-Tree

    public class Assignments<E extends MTreeEntry>
    extends java.lang.Object
    Encapsulates the attributes of an assignment during a split.
    Since:
    0.2
    Author:
    Elke Achtert
    • Field Detail

      • id1

        private DBID id1
        The id of the first routing object.
      • id2

        private DBID id2
        The id of the second routing object.
      • firstAssignments

        private java.util.List<DistanceEntry<E extends MTreeEntry>> firstAssignments
        The assignments to the first routing object.
      • secondAssignments

        private java.util.List<DistanceEntry<E extends MTreeEntry>> secondAssignments
        The assignments to the second routing object.
    • Constructor Detail

      • Assignments

        public Assignments​(DBID id1,
                           DBID id2,
                           int size)
        Constructor.
        Parameters:
        id1 - the first routing object
        id2 - the second routing object
        size - Maximum number of entries per list
    • Method Detail

      • addToFirst

        public void addToFirst​(E ent,
                               double dist)
        Add an entry to the first set.
        Parameters:
        ent - Entry
        dist - Distance
      • computeFirstCover

        public double computeFirstCover​(boolean leaf)
        Compute the covering radius of the first assignment.
        Parameters:
        leaf - true if in leaf mode.
        Returns:
        Covering radius.
      • computeSecondCover

        public double computeSecondCover​(boolean leaf)
        Compute the covering radius of the second assignment.
        Parameters:
        leaf - true if in leaf mode.
        Returns:
        Covering radius.
      • addToSecond

        public void addToSecond​(E ent,
                                double dist)
        Add an entry to the second set.
        Parameters:
        ent - Entry
        dist - Distance
      • getFirstRoutingObject

        public DBID getFirstRoutingObject()
        Returns the id of the first routing object.
        Returns:
        the id of the first routing object
      • getSecondRoutingObject

        public DBID getSecondRoutingObject()
        Returns the id of the second routing object.
        Returns:
        the id of the second routing object
      • getFirstAssignments

        public java.util.List<DistanceEntry<E>> getFirstAssignments()
        Returns the assignments to the first routing object.
        Returns:
        the assignments to the first routing object
      • getSecondAssignments

        public java.util.List<DistanceEntry<E>> getSecondAssignments()
        Returns the assignments to the second routing object.
        Returns:
        the assignments to the second routing object