MOA 12.03
Real Time Analytics for Data Streams
|
Stream generator for representing a stream that is cached in memory. More...
Public Member Functions | |
CachedInstancesStream (Instances toStream) | |
InstancesHeader | getHeader () |
Gets the header of this stream. | |
long | estimatedRemainingInstances () |
Gets the estimated number of remaining instances in this stream. | |
boolean | hasMoreInstances () |
Gets whether this stream has more instances to output. | |
Instance | nextInstance () |
Gets the next instance from this stream. | |
boolean | isRestartable () |
Gets whether this stream can restart. | |
void | restart () |
Restarts this stream. | |
void | getDescription (StringBuilder sb, int indent) |
Returns a string representation of this object. | |
Protected Attributes | |
Instances | toStream |
int | streamPos |
Stream generator for representing a stream that is cached in memory.
This generator is used with the task CacheShuffledStream
that stores and shuffles examples in memory.
Definition at line 35 of file CachedInstancesStream.java.
moa.streams.CachedInstancesStream.CachedInstancesStream | ( | Instances | toStream | ) |
Definition at line 44 of file CachedInstancesStream.java.
long moa.streams.CachedInstancesStream.estimatedRemainingInstances | ( | ) |
Gets the estimated number of remaining instances in this stream.
Implements moa.streams.InstanceStream.
Definition at line 54 of file CachedInstancesStream.java.
void moa.streams.CachedInstancesStream.getDescription | ( | StringBuilder | sb, |
int | indent | ||
) |
Returns a string representation of this object.
Used in AbstractMOAObject.toString
to give a string representation of the object.
sb | the stringbuilder to add the description |
indent | the number of characters to indent |
Implements moa.MOAObject.
Definition at line 79 of file CachedInstancesStream.java.
InstancesHeader moa.streams.CachedInstancesStream.getHeader | ( | ) |
Gets the header of this stream.
This is useful to know attributes and classes. InstancesHeader is an extension of weka.Instances.
Implements moa.streams.InstanceStream.
Definition at line 49 of file CachedInstancesStream.java.
boolean moa.streams.CachedInstancesStream.hasMoreInstances | ( | ) |
Gets whether this stream has more instances to output.
This is useful when reading streams from files.
Implements moa.streams.InstanceStream.
Definition at line 59 of file CachedInstancesStream.java.
boolean moa.streams.CachedInstancesStream.isRestartable | ( | ) |
Gets whether this stream can restart.
Implements moa.streams.InstanceStream.
Definition at line 69 of file CachedInstancesStream.java.
Instance moa.streams.CachedInstancesStream.nextInstance | ( | ) |
Gets the next instance from this stream.
Implements moa.streams.InstanceStream.
Definition at line 64 of file CachedInstancesStream.java.
void moa.streams.CachedInstancesStream.restart | ( | ) |
Restarts this stream.
It must be similar to starting a new stream from scratch.
Implements moa.streams.InstanceStream.
Definition at line 74 of file CachedInstancesStream.java.
int moa.streams.CachedInstancesStream.streamPos [protected] |
Instances moa.streams.CachedInstancesStream.toStream [protected] |
Definition at line 40 of file CachedInstancesStream.java.
Referenced by moa.streams.CachedInstancesStream.CachedInstancesStream(), moa.streams.CachedInstancesStream.estimatedRemainingInstances(), moa.streams.CachedInstancesStream.getHeader(), moa.streams.CachedInstancesStream.hasMoreInstances(), and moa.streams.CachedInstancesStream.nextInstance().