de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.split
Class MTreeSplit<O,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.split.MTreeSplit<O,D,N,E>
- Type Parameters:
O
- the type of DatabaseObject to be stored in the M-TreeD
- the type of Distance used in the M-TreeN
- the type of AbstractMTreeNode used in the M-TreeE
- the type of MetricalEntry used in the M-Tree
- Direct Known Subclasses:
- MLBDistSplit, MRadSplit
public abstract class MTreeSplit<O,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>
- extends Object
Abstract super class for splitting a node in an M-Tree.
Field Summary |
(package private) Assignments<D,E> |
assignments
Encapsulates the two promotion objects and their assignments. |
Method Summary |
private D |
assignNN(Set<E> assigned1,
Set<E> assigned2,
List<DistanceEntry<D,E>> list,
D currentCR,
boolean isLeaf)
Assigns the first object of the specified list to the first assignment that
it is not yet assigned to the second assignment. |
(package private) Assignments<D,E> |
balancedPartition(N node,
DBID routingObject1,
DBID routingObject2,
DistanceQuery<O,D> distanceFunction)
Creates a balanced partition of the entries of the specified node. |
Assignments<D,E> |
getAssignments()
Returns the assignments of this split. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
assignments
Assignments<D extends Distance<D>,E extends MTreeEntry<D>> assignments
- Encapsulates the two promotion objects and their assignments.
MTreeSplit
public MTreeSplit()
balancedPartition
Assignments<D,E> balancedPartition(N node,
DBID routingObject1,
DBID routingObject2,
DistanceQuery<O,D> distanceFunction)
- Creates a balanced partition of the entries of the specified node.
- Parameters:
node
- the node to be splitroutingObject1
- the id of the first routing objectroutingObject2
- the id of the second routing objectdistanceFunction
- the distance function to compute the distances
- Returns:
- an assignment that holds a balanced partition of the entries of the
specified node
assignNN
private D assignNN(Set<E> assigned1,
Set<E> assigned2,
List<DistanceEntry<D,E>> list,
D currentCR,
boolean isLeaf)
- Assigns the first object of the specified list to the first assignment that
it is not yet assigned to the second assignment.
- Parameters:
assigned1
- the first assignmentassigned2
- the second assignmentlist
- the list, the first object should be assignedcurrentCR
- the current covering radiusisLeaf
- true, if the node of the entries to be assigned is a leaf,
false otherwise
- Returns:
- the new covering radius
getAssignments
public Assignments<D,E> getAssignments()
- Returns the assignments of this split.
- Returns:
- the assignments of this split