edu.cmu.sphinx.frontend
Class DoubleData
java.lang.Object
edu.cmu.sphinx.util.machlearn.OVector
edu.cmu.sphinx.frontend.DoubleData
- All Implemented Interfaces:
- Data, java.io.Serializable, java.lang.Cloneable
public class DoubleData
- extends OVector
- implements Data
A Data object that holds data of primitive type double.
- See Also:
- Serialized Form
|
Constructor Summary |
DoubleData(double[] values)
Constructs a new Data object with values only. |
DoubleData(double[] values,
int sampleRate,
long collectTime,
long firstSampleNumber)
Constructs a Data object with the given values, collect time, and first sample number. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
DoubleData
public DoubleData(double[] values)
- Constructs a new
Data object with values only. All other internal fields like
sampling rate etc. are initialized to -1.
- Parameters:
values -
DoubleData
public DoubleData(double[] values,
int sampleRate,
long collectTime,
long firstSampleNumber)
- Constructs a Data object with the given values, collect time, and first sample number.
- Parameters:
values - the data valuessampleRate - the sample rate of the datacollectTime - the time at which this data is collectedfirstSampleNumber - the position of the first sample in the original data
toString
public java.lang.String toString()
- Overrides:
toString in class OVector
- Returns:
- a string that describes the data.
getSampleRate
public int getSampleRate()
- Returns:
- the sample rate of the data.
getFirstSampleNumber
public long getFirstSampleNumber()
- Returns:
- the position of the first sample in the original data. The very first sample number
is zero.
getCollectTime
public long getCollectTime()
- Returns the time in milliseconds at which the audio data is collected.
- Returns:
- the difference, in milliseconds, between the time the audio data is collected and
midnight, January 1, 1970
clone
public DoubleData clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException