public interface IDataset
Dataset Interface
Modifier and Type | Interface and Description |
---|---|
static interface |
IDataset.IInstance
Dataset instance
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close dataset
|
IMetadata |
getMetadata()
Access to this dataset specification
|
java.lang.String |
getName()
Get name of this dataset
|
boolean |
move(int index)
Move cursor to index position
|
boolean |
next()
Return the next instance
|
int |
numberOfInstances()
Get the number of Instances
|
void |
open()
Open dataset
|
IDataset.IInstance |
read()
Returns cursor instance
|
int |
read(IDataset.IInstance[] buffer)
Reads some number of instances from the dataset and stores them
into a buffer array.
|
int |
read(IDataset.IInstance[] buffer,
int offset,
int length)
Reads up to
length instances from the input stream
into an array of IInstances. |
IDataset.IInstance |
read(int rowNumber)
Reads instance at specified row number
|
void |
reset()
Reset dataset
|
java.lang.String getName()
Get name of this dataset
IMetadata getMetadata()
Access to this dataset specification
int numberOfInstances() throws DatasetException
Get the number of Instances
DatasetException
- if a source access error occursvoid open() throws DatasetException
Open dataset
DatasetException
- If dataset can't be openedvoid close() throws DatasetException
Close dataset
DatasetException
- If dataset can't be closedboolean next() throws DatasetException
Return the next instance
DatasetException
- if a source access error occursboolean move(int index) throws DatasetException
Move cursor to index position
index
- New cursor positionDatasetException
- if a source access error occursvoid reset() throws DatasetException
Reset dataset
DatasetException
- if a source access error occursIDataset.IInstance read() throws DatasetException
Returns cursor instance
DatasetException
- if a source access error occursIDataset.IInstance read(int rowNumber) throws DatasetException
Reads instance at specified row number
rowNumber
- the row numberDatasetException
- if an error occursint read(IDataset.IInstance[] buffer) throws DatasetException
Reads some number of instances from the dataset and stores them into a buffer array. The number of instances actually read is returned as an integer
buffer
- the buffer into which the data is read-1
is there is no more data because
the end of the stream has been reachedDatasetException
- if an error occursint read(IDataset.IInstance[] buffer, int offset, int length) throws DatasetException
Reads up to length
instances from the input stream
into an array of IInstances. An attempt is made to read as many
as length
instances, but a smaller number may be
read, possibly zero. The number of instances actually read is
returned as an integer
buffer
- the buffer into which the data is readoffset
- the start offset in array buffer
at which the data is writtenlength
- the maximum number of MiningVectors to read-1
if there is no more data because
the end of the stream has beenDatasetException
- if an error occurs