org.openimaj.ml.clustering
Interface DataSource<DATATYPE>
- Type Parameters:
DATATYPE - the data type which can be returned
- All Known Implementing Classes:
- SampleBatchByteDataSource, SampleBatchIntDataSource, SampleBatchIntDataSource
public interface DataSource<DATATYPE>
A source which returns data of type DATATYPE. Classes which implement this interface must support
random access to rows as well as the ability to get random subsets of data.
- Author:
- Jonathon Hare , Sina Samangooei
getData
void getData(int startRow,
int stopRow,
DATATYPE[] data)
- Get data between given rows. startRow must be > 0, stopRow must be smaller than
numRows().
data is guaranteed to have (stopRow - startRow) valid entries
- Parameters:
startRow - where to start (inclusive)stopRow - where to stop (exclusive)data - the array to fill
numDimensions
int numDimensions()
- Returns:
- Number of dimensions of each data point
getRandomRows
void getRandomRows(DATATYPE[] data)
- Parameters:
data - a random set of data. This array is guaranteed to be filled.
numRows
int numRows()
- Returns:
- the number of data points
Copyright © 2011 The University of Southampton. All Rights Reserved.