public class WeightedVector extends DelegatingVector
Vector.Elementdelegate| Modifier | Constructor and Description |
|---|---|
protected |
WeightedVector(double weight,
int index) |
|
WeightedVector(Vector v,
double weight,
int index) |
|
WeightedVector(Vector v,
Vector projection,
int index) |
| Modifier and Type | Method and Description |
|---|---|
WeightedVector |
clone()
Return a copy of the recipient
|
int |
getIndex() |
double |
getWeight() |
Vector |
like()
Return an empty vector of the same underlying class as the receiver
|
static WeightedVector |
project(Vector v,
Vector projection) |
static WeightedVector |
project(Vector v,
Vector projection,
int index) |
void |
setIndex(int index) |
void |
setWeight(double newWeight) |
String |
toString() |
aggregate, aggregate, all, asFormatString, assign, assign, assign, assign, assign, assign, cross, divide, dot, equals, get, getDistanceSquared, getElement, getIteratorAdvanceCost, getLengthSquared, getLookupCost, getNumNondefaultElements, getNumNonZeroElements, getQuick, getVector, hashCode, incrementQuick, invalidateCachedLength, isAddConstantTime, isDense, isSequentialAccess, like, logNormalize, logNormalize, maxValue, maxValueIndex, mergeUpdates, minus, minValue, minValueIndex, nonZeroes, norm, normalize, normalize, plus, plus, set, setQuick, size, times, times, viewPart, zSumprotected WeightedVector(double weight,
int index)
public WeightedVector(Vector v, double weight, int index)
public static WeightedVector project(Vector v, Vector projection)
public static WeightedVector project(Vector v, Vector projection, int index)
public double getWeight()
public int getIndex()
public void setWeight(double newWeight)
public void setIndex(int index)
public Vector like()
Vectorlike in interface Vectorlike in class DelegatingVectorpublic String toString()
toString in class DelegatingVectorpublic WeightedVector clone()
Vectorclone in interface Vectorclone in class DelegatingVectorCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.