public class ArrayFeatureVector extends FeatureVector
FeatureVector.Entry| Constructor and Description |
|---|
ArrayFeatureVector() |
| Modifier and Type | Method and Description |
|---|---|
double |
get(int index)
Return the value at index.
|
Iterator<FeatureVector.Entry> |
iterator()
Gives an iterator over the non-zero features.
|
void |
set(int index,
double value)
Set the feature at index to value.
|
double[] |
toArray() |
add, equals, hashCode, innerProduct, l2Norm, multiplypublic ArrayFeatureVector()
public double get(int index)
FeatureVectorget in class FeatureVectorindex - The indexpublic Iterator<FeatureVector.Entry> iterator()
FeatureVectoriterator in interface Iterable<FeatureVector.Entry>iterator in class FeatureVectorpublic void set(int index, double value) throws InvalidFeatureVectorValueException
FeatureVectorset in class FeatureVectorInvalidFeatureVectorValueExceptionpublic double[] toArray()
Copyright © 2014. All rights reserved.