public class NoiseDoubleDataSource extends BaseDoubleDataSource
| Modifier and Type | Field and Description |
|---|---|
protected double |
amplitude |
protected long |
n |
dataLength, inputSourceNOT_SPECIFIED| Constructor and Description |
|---|
NoiseDoubleDataSource(long n,
double dB)
Construct an double data source from which a given amount of white noise can be read.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
The number of doubles that can currently be read from this double data source without blocking.
|
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.
|
getAllData, getData, getData, getDataLengthpublic NoiseDoubleDataSource(long n,
double dB)
n - the number of samles samples to be readdB - the energy of the noise, in dB relative to max amplitude. This must be non-positive, and will typically be
between -100 and -3.public boolean hasMoreData()
BaseDoubleDataSourcehasMoreData in interface DoubleDataSourcehasMoreData in class BaseDoubleDataSourcepublic int available()
available in interface DoubleDataSourceavailable in class BaseDoubleDataSourcepublic int getData(double[] target,
int targetPos,
int length)
BaseDoubleDataSourcegetData in interface DoubleDataSourcegetData in class BaseDoubleDataSourcetarget - the double array to write intotargetPos - position in target where to start writinglength - the amount of data requestedCopyright © 2000–2016 DFKI GmbH. All rights reserved.