Class DoubleArrayVector
java.lang.Object
opennlp.tools.util.wordvector.DoubleArrayVector
- All Implemented Interfaces:
WordVector
A
WordVector implementation that represents the vector as array
of double values.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
vector
private final double[] vector
-
-
Constructor Details
-
DoubleArrayVector
DoubleArrayVector(double[] vector)
-
-
Method Details
-
getDataType
- Specified by:
getDataTypein interfaceWordVector
-
getAsFloat
public float getAsFloat(int index) - Specified by:
getAsFloatin interfaceWordVector
-
getAsDouble
public double getAsDouble(int index) - Specified by:
getAsDoublein interfaceWordVector
-
toFloatBuffer
- Specified by:
toFloatBufferin interfaceWordVector
-
toDoubleBuffer
- Specified by:
toDoubleBufferin interfaceWordVector
-
dimension
public int dimension()- Specified by:
dimensionin interfaceWordVector
-