E
- the type of MetricalEntry used in the M-Treepublic class Assignments<E extends MTreeEntry> extends Object
Modifier and Type | Field and Description |
---|---|
private List<DistanceEntry<E>> |
firstAssignments
The assignments to the first routing object.
|
private DBID |
id1
The id of the first routing object.
|
private DBID |
id2
The id of the second routing object.
|
private List<DistanceEntry<E>> |
secondAssignments
The assignments to the second routing object.
|
Constructor and Description |
---|
Assignments(DBID id1,
DBID id2,
int size)
Constructor.
|
Assignments(int size)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addToFirst(E ent,
double dist,
int pos)
Add an entry to the first set.
|
void |
addToSecond(E ent,
double dist,
int pos)
Add an entry to the second set.
|
double |
computeFirstCover(boolean leaf)
Compute the covering radius of the first assignment.
|
double |
computeSecondCover(boolean leaf)
Compute the covering radius of the second assignment.
|
List<DistanceEntry<E>> |
getFirstAssignments()
Returns the assignments to the first routing object.
|
DBID |
getFirstRoutingObject()
Returns the id of the first routing object.
|
List<DistanceEntry<E>> |
getSecondAssignments()
Returns the assignments to the second routing object.
|
DBID |
getSecondRoutingObject()
Returns the id of the second routing object.
|
void |
setFirstRoutingObject(DBID routingObjectID)
Set the first routing object.
|
void |
setSecondRoutingObject(DBID routingObjectID)
Set the second routing object.
|
private DBID id1
private DBID id2
private List<DistanceEntry<E extends MTreeEntry>> firstAssignments
private List<DistanceEntry<E extends MTreeEntry>> secondAssignments
public Assignments(DBID id1, DBID id2, int size)
id1
- the first routing objectid2
- the second routing objectsize
- Maximum number of entries per listpublic Assignments(int size)
size
- Maximum number of entries per listpublic void addToFirst(E ent, double dist, int pos)
ent
- Entrydist
- Distancepos
- Position in parentpublic double computeFirstCover(boolean leaf)
leaf
- true
if in leaf mode.public double computeSecondCover(boolean leaf)
leaf
- true
if in leaf mode.public void addToSecond(E ent, double dist, int pos)
ent
- Entrydist
- Distancepos
- Position in parentpublic DBID getFirstRoutingObject()
public DBID getSecondRoutingObject()
public List<DistanceEntry<E>> getFirstAssignments()
public List<DistanceEntry<E>> getSecondAssignments()
public void setFirstRoutingObject(DBID routingObjectID)
routingObjectID
- First routing objectpublic void setSecondRoutingObject(DBID routingObjectID)
routingObjectID
- Second routing objectCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.