Package elki.datasource.filter.transform
Class ProjectionFilter<I,O>
- java.lang.Object
-
- elki.datasource.filter.AbstractStreamFilter
-
- elki.datasource.filter.AbstractStreamConversionFilter<I,O>
-
- elki.datasource.filter.transform.ProjectionFilter<I,O>
-
- Type Parameters:
I
- Input typeO
- Output type
- All Implemented Interfaces:
BundleStreamSource
,ObjectFilter
,StreamFilter
public class ProjectionFilter<I,O> extends AbstractStreamConversionFilter<I,O>
Apply a projection to the data.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.datasource.bundle.BundleStreamSource
BundleStreamSource.Event
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Projection<I,O>
projection
Projection to apply.-
Fields inherited from class elki.datasource.filter.AbstractStreamFilter
source
-
-
Constructor Summary
Constructors Constructor Description ProjectionFilter(Projection<I,O> projection)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SimpleTypeInformation<? super O>
convertedType(SimpleTypeInformation<I> in)
Get the output type from the input type after conversion.protected O
filterSingleObject(I obj)
Normalize a single instance.protected TypeInformation
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.-
Methods inherited from class elki.datasource.filter.AbstractStreamConversionFilter
data, getMeta, nextEvent
-
Methods inherited from class elki.datasource.filter.AbstractStreamFilter
asMultipleObjectsBundle, assignDBID, filter, hasDBIDs, init, toString
-
-
-
-
Field Detail
-
projection
Projection<I,O> projection
Projection to apply.
-
-
Constructor Detail
-
ProjectionFilter
public ProjectionFilter(Projection<I,O> projection)
Constructor.- Parameters:
projection
- Projection
-
-
Method Detail
-
filterSingleObject
protected O filterSingleObject(I obj)
Description copied from class:AbstractStreamConversionFilter
Normalize a single instance. You can implement this as UnsupportedOperationException if you override both public "normalize" functions!- Specified by:
filterSingleObject
in classAbstractStreamConversionFilter<I,O>
- Parameters:
obj
- Database object to normalize- Returns:
- Normalized database object
-
getInputTypeRestriction
protected TypeInformation getInputTypeRestriction()
Description copied from class:AbstractStreamConversionFilter
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in classAbstractStreamConversionFilter<I,O>
- Returns:
- Type restriction
-
convertedType
protected SimpleTypeInformation<? super O> convertedType(SimpleTypeInformation<I> in)
Description copied from class:AbstractStreamConversionFilter
Get the output type from the input type after conversion.- Specified by:
convertedType
in classAbstractStreamConversionFilter<I,O>
- Parameters:
in
- input type restriction- Returns:
- output type restriction
-
-