|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.result.OrderingFromAssociation<T,O>
T - data type of annotation.O - database object typepublic class OrderingFromAssociation<T extends Comparable<T>,O extends DatabaseObject>
Return an ordering result backed by a database. Note that the implementation will sort with O(n lg n) database accesses on average, O(n*n) in worst case to avoid having to store all objects in memory.
| Nested Class Summary | |
|---|---|
protected class |
OrderingFromAssociation.DerivedComparator
Internally used comparator using a preexisting comparator for the given datatype |
protected class |
OrderingFromAssociation.ImpliedComparator
Internally used comparator retrieving data from the database. |
| Field Summary | |
|---|---|
(package private) int |
ascending
Factor to signal ascending (+1) / descending (-1) order |
protected AssociationID<T> |
association
AssocationID to use |
protected Comparator<T> |
comparator
Internal comparator to use for sorting. |
protected Database<O> |
db
Database |
| Constructor Summary | |
|---|---|
OrderingFromAssociation(Database<O> db,
AssociationID<T> association)
Minimal constructor, using implied comparator and ascending order. |
|
OrderingFromAssociation(Database<O> db,
AssociationID<T> association,
boolean descending)
Constructor without comparator |
|
OrderingFromAssociation(Database<O> db,
AssociationID<T> association,
Comparator<T> comparator,
boolean descending)
Full Constructor (with comparator) |
|
| Method Summary | |
|---|---|
Iterator<Integer> |
iter(Collection<Integer> ids)
Sort the given collection of IDs and return an iterator for the result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Database<O extends DatabaseObject> db
protected AssociationID<T extends Comparable<T>> association
protected Comparator<T extends Comparable<T>> comparator
int ascending
| Constructor Detail |
|---|
public OrderingFromAssociation(Database<O> db,
AssociationID<T> association,
Comparator<T> comparator,
boolean descending)
db - Databaseassociation - AssociationID to usecomparator - Comparator for data type used by associationdescending - boolean to mark descending ordering (true)
public OrderingFromAssociation(Database<O> db,
AssociationID<T> association,
boolean descending)
db - Databaseassociation - AssociationID to usedescending - boolean to mark descending ordering (true)
public OrderingFromAssociation(Database<O> db,
AssociationID<T> association)
db - Databaseassociation - AssociationID to use| Method Detail |
|---|
public Iterator<Integer> iter(Collection<Integer> ids)
iter in interface OrderingResultids - Collection of ids.
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||