public class Centroid extends WeightedVector
Vector.Element
delegate
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, setWeight
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, zSum
public 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()
Vector
like
in interface Vector
like
in class WeightedVector
@Deprecated public int getKey()
public void addWeight(double newWeight)
public String toString()
toString
in class WeightedVector
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.