Class Assignments<E extends MTreeEntry>
- java.lang.Object
-
- elki.index.tree.metrical.mtreevariants.strategies.split.distribution.Assignments<E>
-
- Type Parameters:
E- the type of MetricalEntry used in the M-Tree
public class Assignments<E extends MTreeEntry> extends java.lang.ObjectEncapsulates the attributes of an assignment during a split.- Since:
- 0.2
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<DistanceEntry<E>>firstAssignmentsThe assignments to the first routing object.private DBIDid1The id of the first routing object.private DBIDid2The id of the second routing object.private java.util.List<DistanceEntry<E>>secondAssignmentsThe assignments to the second routing object.
-
Constructor Summary
Constructors Constructor Description Assignments(DBID id1, DBID id2, int size)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToFirst(E ent, double dist)Add an entry to the first set.voidaddToSecond(E ent, double dist)Add an entry to the second set.doublecomputeFirstCover(boolean leaf)Compute the covering radius of the first assignment.doublecomputeSecondCover(boolean leaf)Compute the covering radius of the second assignment.java.util.List<DistanceEntry<E>>getFirstAssignments()Returns the assignments to the first routing object.DBIDgetFirstRoutingObject()Returns the id of the first routing object.java.util.List<DistanceEntry<E>>getSecondAssignments()Returns the assignments to the second routing object.DBIDgetSecondRoutingObject()Returns the id of the second routing object.
-
-
-
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.
-
-
Method Detail
-
addToFirst
public void addToFirst(E ent, double dist)
Add an entry to the first set.- Parameters:
ent- Entrydist- Distance
-
computeFirstCover
public double computeFirstCover(boolean leaf)
Compute the covering radius of the first assignment.- Parameters:
leaf-trueif in leaf mode.- Returns:
- Covering radius.
-
computeSecondCover
public double computeSecondCover(boolean leaf)
Compute the covering radius of the second assignment.- Parameters:
leaf-trueif in leaf mode.- Returns:
- Covering radius.
-
addToSecond
public void addToSecond(E ent, double dist)
Add an entry to the second set.- Parameters:
ent- Entrydist- 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
-
-