Package elki.datasource.filter
Class AbstractStreamConversionFilter<I,O>
- java.lang.Object
-
- elki.datasource.filter.AbstractStreamFilter
-
- elki.datasource.filter.AbstractStreamConversionFilter<I,O>
-
- Type Parameters:
I
- Input object typeO
- Input object type
- All Implemented Interfaces:
BundleStreamSource
,ObjectFilter
,StreamFilter
- Direct Known Subclasses:
AbstractVectorStreamConversionFilter
,LatLngToECEFFilter
,LngLatToECEFFilter
,MultivariateTimeSeriesFilter
,ProjectionFilter
public abstract class AbstractStreamConversionFilter<I,O> extends AbstractStreamFilter
Abstract base class for simple conversion filters such as normalizations and projections.- Since:
- 0.5.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) int
column
The column to filter.(package private) BundleMeta
meta
The filtered meta.-
Fields inherited from class elki.datasource.filter.AbstractStreamFilter
source
-
-
Constructor Summary
Constructors Constructor Description AbstractStreamConversionFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract SimpleTypeInformation<? super O>
convertedType(SimpleTypeInformation<I> in)
Get the output type from the input type after conversion.java.lang.Object
data(int rnum)
Access a particular object and representation.protected abstract O
filterSingleObject(I obj)
Normalize a single instance.protected abstract TypeInformation
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.BundleMeta
getMeta()
Get the current meta data.BundleStreamSource.Event
nextEvent()
Get the next event-
Methods inherited from class elki.datasource.filter.AbstractStreamFilter
asMultipleObjectsBundle, assignDBID, filter, hasDBIDs, init, toString
-
-
-
-
Field Detail
-
meta
BundleMeta meta
The filtered meta.
-
column
int column
The column to filter.
-
-
Method Detail
-
getMeta
public BundleMeta getMeta()
Description copied from interface:BundleStreamSource
Get the current meta data.- Returns:
- Metadata
-
data
public java.lang.Object data(int rnum)
Description copied from interface:BundleStreamSource
Access a particular object and representation.- Parameters:
rnum
- Representation number- Returns:
- Contained data
-
nextEvent
public BundleStreamSource.Event nextEvent()
Description copied from interface:BundleStreamSource
Get the next event- Returns:
- Event type
-
filterSingleObject
protected abstract O filterSingleObject(I obj)
Normalize a single instance. You can implement this as UnsupportedOperationException if you override both public "normalize" functions!- Parameters:
obj
- Database object to normalize- Returns:
- Normalized database object
-
getInputTypeRestriction
protected abstract TypeInformation getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.- Returns:
- Type restriction
-
convertedType
protected abstract SimpleTypeInformation<? super O> convertedType(SimpleTypeInformation<I> in)
Get the output type from the input type after conversion.- Parameters:
in
- input type restriction- Returns:
- output type restriction
-
-