public class Centroid extends WeightedVector
Vector.Elementdelegate| Constructor and Description |
|---|
Centroid(int key,
Vector initialValue) |
Centroid(int key,
Vector initialValue,
double weight) |
Centroid(WeightedVector original) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWeight(double newWeight) |
Centroid |
clone()
Return a copy of the recipient
|
static Centroid |
create(int key,
Vector initialValue) |
int |
getKey()
Deprecated.
|
Centroid |
like()
Return an empty vector of the same underlying class as the receiver
|
String |
toString() |
void |
update(Vector v) |
void |
update(Vector other,
double wy) |
getIndex, getWeight, project, project, setIndex, setWeightaggregate, 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, zSumpublic Centroid(WeightedVector original)
public Centroid(int key,
Vector initialValue)
public Centroid(int key,
Vector initialValue,
double weight)
public void update(Vector v)
public void update(Vector other, double wy)
public Centroid like()
Vectorlike in interface Vectorlike in class WeightedVector@Deprecated public int getKey()
public void addWeight(double newWeight)
public String toString()
toString in class WeightedVectorCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.