de.lmu.ifi.dbs.elki.result.outlier
Class OrderingFromRelation

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.result.outlier.OrderingFromRelation
All Implemented Interfaces:
OrderingResult, Result

public class OrderingFromRelation
extends Object
implements OrderingResult

Ordering obtained from an outlier score.


Nested Class Summary
protected  class OrderingFromRelation.ImpliedComparator
          Internal comparator, accessing the map to sort objects
 
Field Summary
protected  int ascending
          Factor for ascending (+1) and descending (-1) ordering.
protected  Relation<Double> scores
          Outlier scores.
 
Constructor Summary
OrderingFromRelation(Relation<Double> scores)
          Ascending constructor.
OrderingFromRelation(Relation<Double> scores, boolean ascending)
          Constructor for outlier orderings
 
Method Summary
 DBIDs getDBIDs()
          Get the full set of DBIDs this ordering is defined for.
 String getLongName()
          A "pretty" name for the result, for use in titles, captions and menus.
 String getShortName()
          A short name for the result, useful for file names.
 IterableIterator<DBID> iter(DBIDs ids)
          Sort the given ids according to this ordering and return an iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scores

protected Relation<Double> scores
Outlier scores.


ascending

protected int ascending
Factor for ascending (+1) and descending (-1) ordering.

Constructor Detail

OrderingFromRelation

public OrderingFromRelation(Relation<Double> scores,
                            boolean ascending)
Constructor for outlier orderings

Parameters:
scores - outlier score result
ascending - Ascending when true, descending otherwise

OrderingFromRelation

public OrderingFromRelation(Relation<Double> scores)
Ascending constructor.

Parameters:
scores -
Method Detail

getDBIDs

public DBIDs getDBIDs()
Description copied from interface: OrderingResult
Get the full set of DBIDs this ordering is defined for.

Specified by:
getDBIDs in interface OrderingResult
Returns:
DBIDs

iter

public IterableIterator<DBID> iter(DBIDs ids)
Description copied from interface: OrderingResult
Sort the given ids according to this ordering and return an iterator.

Specified by:
iter in interface OrderingResult
Parameters:
ids - Collection of ids.
Returns:
iterator for sorted array of ids

getLongName

public String getLongName()
Description copied from interface: Result
A "pretty" name for the result, for use in titles, captions and menus.

Specified by:
getLongName in interface Result
Returns:
result name

getShortName

public String getShortName()
Description copied from interface: Result
A short name for the result, useful for file names.

Specified by:
getShortName in interface Result
Returns:
result name

Release 0.4.0 (2011-09-20_1324)