Package elki.datasource.filter
Class AbstractStreamFilter
- java.lang.Object
-
- elki.datasource.filter.AbstractStreamFilter
-
- All Implemented Interfaces:
BundleStreamSource
,ObjectFilter
,StreamFilter
- Direct Known Subclasses:
AbstractStreamConversionFilter
,ByLabelFilter
,ClassLabelFromPatternFilter
,DropNaNFilter
,FirstNStreamFilter
,NoMissingValuesFilter
,NoOpFilter
,RandomSamplingStreamFilter
,ReplaceNaNWithRandomFilter
,VectorDimensionalityFilter
public abstract class AbstractStreamFilter extends java.lang.Object implements StreamFilter
Abstract base class for streaming filters.- 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 protected BundleStreamSource
source
Data source
-
Constructor Summary
Constructors Constructor Description AbstractStreamFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultipleObjectsBundle
asMultipleObjectsBundle()
Return (or collect) the stream as bundle.boolean
assignDBID(DBIDVar var)
Assign the current object ID to aDBIDVar
.MultipleObjectsBundle
filter(MultipleObjectsBundle objects)
Filter a set of object packages.boolean
hasDBIDs()
Indicate whether the stream contains DBIDs.BundleStreamSource
init(BundleStreamSource source)
Connect to the previous stream.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface elki.datasource.bundle.BundleStreamSource
data, getMeta, nextEvent
-
-
-
-
Field Detail
-
source
protected BundleStreamSource source
Data source
-
-
Method Detail
-
filter
public MultipleObjectsBundle filter(MultipleObjectsBundle objects)
Description copied from interface:ObjectFilter
Filter a set of object packages.- Specified by:
filter
in interfaceObjectFilter
- Parameters:
objects
- Object to filter- Returns:
- Filtered objects
-
init
public BundleStreamSource init(BundleStreamSource source)
Description copied from interface:StreamFilter
Connect to the previous stream.- Specified by:
init
in interfaceStreamFilter
- Parameters:
source
- Stream source
-
hasDBIDs
public boolean hasDBIDs()
Description copied from interface:BundleStreamSource
Indicate whether the stream contains DBIDs.- Specified by:
hasDBIDs
in interfaceBundleStreamSource
- Returns:
true
if the stream contains DBIDs.
-
assignDBID
public boolean assignDBID(DBIDVar var)
Description copied from interface:BundleStreamSource
Assign the current object ID to aDBIDVar
.- Specified by:
assignDBID
in interfaceBundleStreamSource
- Parameters:
var
- Variable to assign the object id to- Returns:
false
when no object id is available
-
asMultipleObjectsBundle
public MultipleObjectsBundle asMultipleObjectsBundle()
Description copied from interface:BundleStreamSource
Return (or collect) the stream as bundle.- Specified by:
asMultipleObjectsBundle
in interfaceBundleStreamSource
- Returns:
- Bundle
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-