public class TextReaderDoubleDataSource extends BaseDoubleDataSource
Modifier and Type | Field and Description |
---|---|
protected BufferedReader |
reader |
dataLength, inputSource
NOT_SPECIFIED
Constructor and Description |
---|
TextReaderDoubleDataSource(File file)
Read Double data from a Text file.
|
TextReaderDoubleDataSource(Reader reader)
Initialize this double data source with the reader from which a text representation of doubles (one per line) can be read.
|
Modifier and Type | Method and Description |
---|---|
int |
getData(double[] target,
int targetPos,
int length)
Try to get length doubles from this DoubleDataSource, and copy them into target, starting from targetPos.
|
boolean |
hasMoreData()
Whether or not any more data can be read from this data source.
|
available, getAllData, getData, getData, getDataLength
protected BufferedReader reader
public TextReaderDoubleDataSource(File file) throws FileNotFoundException
file
- fileFileNotFoundException
- FileNotFoundExceptionpublic TextReaderDoubleDataSource(Reader reader)
reader
- readerpublic int getData(double[] target, int targetPos, int length)
getData
in interface DoubleDataSource
getData
in class BaseDoubleDataSource
target
- the double array to write intotargetPos
- position in target where to start writinglength
- the amount of data requestedpublic boolean hasMoreData()
hasMoreData
in interface DoubleDataSource
hasMoreData
in class BaseDoubleDataSource
Copyright © 2000–2016 DFKI GmbH. All rights reserved.