
public class ProjectedCentroid extends Centroid
DatabaseUtil for
easier to use APIs.| Modifier and Type | Field and Description |
|---|---|
private BitSet |
dims
The selected dimensions.
|
| Constructor and Description |
|---|
ProjectedCentroid(BitSet dims,
int dim)
Constructor for updating use.
|
| Modifier and Type | Method and Description |
|---|---|
static ProjectedCentroid |
make(BitSet dims,
Relation<? extends NumberVector<?,?>> relation)
Static Constructor from a relation.
|
static ProjectedCentroid |
make(BitSet dims,
Relation<? extends NumberVector<?,?>> relation,
Iterable<DBID> ids)
Static Constructor from a relation.
|
void |
put(double[] val)
Add a single value with weight 1.0
|
void |
put(double[] val,
double weight)
Add data with a given weight.
|
void |
put(NumberVector<?,?> val)
Add a single value with weight 1.0
|
void |
put(NumberVector<?,?> val,
double weight)
Add data with a given weight.
|
make, make, make, put, put, toVectorbyteValue, clone, copy, doubleValue, equals, euclideanLength, floatValue, get, getArrayCopy, getArrayRef, getColumnVector, getDimensionality, getMax, getMin, getValue, hashCode, intValue, longValue, minus, minusEquals, minusEquals, minusTimes, minusTimesEquals, newFeatureVector, newNumberVector, newNumberVector, normalize, plus, plusEquals, plusEquals, plusTimes, plusTimesEquals, projection, randomNormalizedVector, rotate90Equals, set, setZero, shortValue, times, times, timesEquals, timesTranspose, timesTranspose, toString, toStringNoWhitespace, transposeTimes, transposeTimes, transposeTimesTimes, unitVectorprivate BitSet dims
public ProjectedCentroid(BitSet dims, int dim)
dims - Dimensions to use (indexed with 0)dim - Full dimensionalitypublic void put(double[] val)
public void put(double[] val,
double weight)
public void put(NumberVector<?,?> val)
public void put(NumberVector<?,?> val, double weight)
public static ProjectedCentroid make(BitSet dims, Relation<? extends NumberVector<?,?>> relation)
dims - Dimensions to use (indexed with 0)relation - Relation to processpublic static ProjectedCentroid make(BitSet dims, Relation<? extends NumberVector<?,?>> relation, Iterable<DBID> ids)
dims - Dimensions to use (indexed with 0)relation - Relation to processids - IDs to process