public class WeightedVector extends DelegatingVector
Vector.Element
delegate
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, logNormalize, logNormalize, maxValue, maxValueIndex, mergeUpdates, minus, minValue, minValueIndex, nonZeroes, norm, normalize, normalize, plus, plus, set, setQuick, size, times, times, viewPart, zSum
protected 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()
Vector
like
in interface Vector
like
in class DelegatingVector
public String toString()
toString
in class DelegatingVector
public WeightedVector clone()
Vector
clone
in interface Vector
clone
in class DelegatingVector
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.