|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.result.AbstractHierarchicalResult de.lmu.ifi.dbs.elki.result.BasicResult de.lmu.ifi.dbs.elki.result.OrderingFromDataStore<T>
T
- Data type in hash mappublic class OrderingFromDataStore<T extends Comparable<T>>
Result class providing an ordering backed by a hashmap.
Nested Class Summary | |
---|---|
protected class |
OrderingFromDataStore.DerivedComparator
Internal comparator, accessing the map but then using the provided comparator to sort objects |
protected class |
OrderingFromDataStore.ImpliedComparator
Internal comparator, accessing the map to sort objects |
Field Summary | |
---|---|
(package private) int |
ascending
Factor for ascending (+1) and descending (-1) ordering. |
protected Comparator<T> |
comparator
Comparator to use when sorting |
protected DBIDs |
ids
Database IDs |
protected DataStore<? extends T> |
map
HashMap with object values |
Constructor Summary | |
---|---|
OrderingFromDataStore(String name,
String shortname,
DBIDs ids,
DataStore<? extends T> map)
Minimal Constructor |
|
OrderingFromDataStore(String name,
String shortname,
DBIDs ids,
DataStore<? extends T> map,
boolean descending)
Constructor without comparator |
|
OrderingFromDataStore(String name,
String shortname,
DBIDs ids,
DataStore<? extends T> map,
Comparator<T> comparator,
boolean descending)
Constructor with comparator |
Method Summary | |
---|---|
DBIDs |
getDBIDs()
Get the full set of DBIDs this ordering is defined for. |
IterableIterator<DBID> |
iter(DBIDs ids)
Sort the given ids according to this ordering and return an iterator. |
Methods inherited from class de.lmu.ifi.dbs.elki.result.BasicResult |
---|
getLongName, getShortName |
Methods inherited from class de.lmu.ifi.dbs.elki.result.AbstractHierarchicalResult |
---|
addChildResult, getHierarchy, setHierarchy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.result.Result |
---|
getLongName, getShortName |
Field Detail |
---|
protected DataStore<? extends T extends Comparable<T>> map
protected DBIDs ids
protected Comparator<T extends Comparable<T>> comparator
int ascending
Constructor Detail |
---|
public OrderingFromDataStore(String name, String shortname, DBIDs ids, DataStore<? extends T> map, Comparator<T> comparator, boolean descending)
name
- The long name (for pretty printing)shortname
- the short name (for filenames etc.)ids
- DBIDs includedmap
- data hash mapcomparator
- comparator to use, may be nulldescending
- ascending (false) or descending (true) order.public OrderingFromDataStore(String name, String shortname, DBIDs ids, DataStore<? extends T> map, boolean descending)
name
- The long name (for pretty printing)shortname
- the short name (for filenames etc.)ids
- DBIDs includedmap
- data hash mapdescending
- ascending (false) or descending (true) order.public OrderingFromDataStore(String name, String shortname, DBIDs ids, DataStore<? extends T> map)
name
- The long name (for pretty printing)shortname
- the short name (for filenames etc.)ids
- DBIDs includedmap
- data hash mapMethod Detail |
---|
public DBIDs getDBIDs()
OrderingResult
getDBIDs
in interface OrderingResult
public IterableIterator<DBID> iter(DBIDs ids)
OrderingResult
iter
in interface OrderingResult
ids
- Collection of ids.
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |