MOA 12.03
Real Time Analytics for Data Streams
moa.streams.CachedInstancesStream Class Reference

Stream generator for representing a stream that is cached in memory. More...

Inheritance diagram for moa.streams.CachedInstancesStream:
Collaboration diagram for moa.streams.CachedInstancesStream:

List of all members.

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

Detailed Description

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.

Author:
Richard Kirkby (rkirkby@cs.waikato.ac.nz)
Version:
Revision:
7

Definition at line 35 of file CachedInstancesStream.java.


Constructor & Destructor Documentation

moa.streams.CachedInstancesStream.CachedInstancesStream ( Instances  toStream)

Definition at line 44 of file CachedInstancesStream.java.


Member Function Documentation

long moa.streams.CachedInstancesStream.estimatedRemainingInstances ( )

Gets the estimated number of remaining instances in this stream.

Returns:
the estimated number of instances to get from 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.

Parameters:
sbthe stringbuilder to add the description
indentthe 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.

Returns:
the header of this stream

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.

Returns:
true if this stream has more instances to output

Implements moa.streams.InstanceStream.

Definition at line 59 of file CachedInstancesStream.java.

boolean moa.streams.CachedInstancesStream.isRestartable ( )

Gets whether this stream can restart.

Returns:
true if 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.

Returns:
the next instance of 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.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations