edu.cmu.sphinx.util.machlearn
Class OVector

java.lang.Object
  extended by edu.cmu.sphinx.util.machlearn.OVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DoubleData

public class OVector
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

An real-valued observation.

See Also:
Serialized Form

Constructor Summary
OVector(double value)
          Creates a one-dimensional instance of this class.
OVector(double[] values)
          Constructs a new observation for a given feature-vector.
 
Method Summary
 int dimension()
          Returns the dimension of this observation.
 boolean equals(java.lang.Object obj)
           
 double[] getValues()
          Returns the values of this observation.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OVector

public OVector(double[] values)
Constructs a new observation for a given feature-vector.


OVector

public OVector(double value)
Creates a one-dimensional instance of this class.

Method Detail

getValues

public double[] getValues()
Returns the values of this observation.

Returns:
the values

dimension

public int dimension()
Returns the dimension of this observation.


equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object