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-Treepublic abstract class MTreeSplit<O,D extends NumberDistance<D,?>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry> extends Object
Constructor and Description |
---|
MTreeSplit() |
Modifier and Type | Method and Description |
---|---|
private double |
assignNN(BitSet assigned,
List<DistanceEntry<E>> assigned1,
List<DistanceEntry<E>> list,
double 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<E> |
balancedPartition(AbstractMTree<O,D,N,E,?> tree,
N node,
DBID routingObject1,
DBID routingObject2)
Creates a balanced partition of the entries of the specified node.
|
(package private) Assignments<E> |
balancedPartition(AbstractMTree<O,D,N,E,?> tree,
N node,
int routingEntNum1,
int routingEntNum2,
double[] distanceMatrix)
Creates a balanced partition of the entries of the specified node.
|
protected double[] |
computeDistanceMatrix(AbstractMTree<O,D,N,E,?> tree,
N node)
Compute the pairwise distances in the given node.
|
abstract Assignments<E> |
split(AbstractMTree<O,D,N,E,?> tree,
N node)
Returns the assignments of this split.
|
protected double[] computeDistanceMatrix(AbstractMTree<O,D,N,E,?> tree, N node)
tree
- Treenode
- NodeAssignments<E> balancedPartition(AbstractMTree<O,D,N,E,?> tree, N node, DBID routingObject1, DBID routingObject2)
tree
- the tree to perform the split innode
- the node to be splitroutingObject1
- the id of the first routing objectroutingObject2
- the id of the second routing objectAssignments<E> balancedPartition(AbstractMTree<O,D,N,E,?> tree, N node, int routingEntNum1, int routingEntNum2, double[] distanceMatrix)
tree
- the tree to perform the split innode
- the node to be splitroutingEntNum1
- the entry number of the first routing objectroutingEntNum2
- the entry number of the second routing objectdistanceMatrix
- precomputed distance matrix to useprivate double assignNN(BitSet assigned, List<DistanceEntry<E>> assigned1, List<DistanceEntry<E>> list, double currentCR, boolean isLeaf)
assigned
- List of already assigned objectsassigned1
- the first 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 otherwisepublic abstract Assignments<E> split(AbstractMTree<O,D,N,E,?> tree, N node)
tree
- Tree to usenode
- Node to split