Package elki.result.outlier
Class OrderingFromRelation
- java.lang.Object
-
- elki.result.outlier.OrderingFromRelation
-
- All Implemented Interfaces:
OrderingResult
public class OrderingFromRelation extends java.lang.Object implements OrderingResult
Ordering obtained from an outlier score.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
ascending
Factor for ascending (+1) and descending (-1) ordering.protected DoubleRelation
scores
Outlier scores.
-
Constructor Summary
Constructors Constructor Description OrderingFromRelation(DoubleRelation scores)
Ascending constructor.OrderingFromRelation(DoubleRelation scores, boolean ascending)
Constructor for outlier orderings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBIDs
getDBIDs()
Get the full set of DBIDs this ordering is defined for.java.lang.String
getLongName()
ArrayModifiableDBIDs
order(DBIDs ids)
Sort the given ids according to this ordering and return an iterator.
-
-
-
Field Detail
-
scores
protected DoubleRelation scores
Outlier scores.
-
ascending
protected boolean ascending
Factor for ascending (+1) and descending (-1) ordering.
-
-
Constructor Detail
-
OrderingFromRelation
public OrderingFromRelation(DoubleRelation scores, boolean ascending)
Constructor for outlier orderings- Parameters:
scores
- outlier score resultascending
- Ascending whentrue
, descending otherwise
-
OrderingFromRelation
public OrderingFromRelation(DoubleRelation 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 interfaceOrderingResult
- Returns:
- DBIDs
-
order
public ArrayModifiableDBIDs order(DBIDs ids)
Description copied from interface:OrderingResult
Sort the given ids according to this ordering and return an iterator.- Specified by:
order
in interfaceOrderingResult
- Parameters:
ids
- Collection of ids.- Returns:
- iterator for sorted array of ids
-
getLongName
public java.lang.String getLongName()
-
-