|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.math.linearalgebra.Vector
de.lmu.ifi.dbs.elki.math.linearalgebra.Centroid
de.lmu.ifi.dbs.elki.math.linearalgebra.ProjectedCentroid
public class ProjectedCentroid

Centroid only using a subset of dimensions.
This class abstracts the mathematics of efficient and numerically stable
computation of projected centroids.
See DatabaseUtil for
easier to use APIs.
| Field Summary | |
|---|---|
private BitSet |
dims
The selected dimensions. |
private static long |
serialVersionUID
Serial version |
| Fields inherited from class de.lmu.ifi.dbs.elki.math.linearalgebra.Centroid |
|---|
wsum |
| Fields inherited from class de.lmu.ifi.dbs.elki.math.linearalgebra.Vector |
|---|
elements |
| Constructor Summary | |
|---|---|
ProjectedCentroid(BitSet dims,
int dim)
Constructor for updating use. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class de.lmu.ifi.dbs.elki.math.linearalgebra.Centroid |
|---|
make, make, make, put, put, toVector |
| Methods inherited from class de.lmu.ifi.dbs.elki.math.linearalgebra.Vector |
|---|
clone, copy, equals, euclideanLength, get, get, getArrayCopy, getArrayRef, getColumnDimensionality, getColumnVector, getDimensionality, getRowDimensionality, hashCode, increment, inverseVector, minus, minusEquals, minusEquals, minusTimes, minusTimesEquals, normalize, normF, plus, plusEquals, plusEquals, plusTimes, plusTimesEquals, projection, randomNormalizedVector, scalarProduct, set, set, setZero, sqrtVector, times, times, timesEquals, timesTranspose, toString, toStringNoWhitespace, transpose, transposeTimes, transposeTimes, unitVector |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private BitSet dims
| Constructor Detail |
|---|
public ProjectedCentroid(BitSet dims,
int dim)
dims - Dimensions to use (indexed with 0)dim - Full dimensionality| Method Detail |
|---|
public void put(double[] val)
put in class Centroidval - Value
public void put(double[] val,
double weight)
put in class Centroidval - dataweight - weightpublic void put(NumberVector<?,?> val)
put in class Centroidval - Value
public void put(NumberVector<?,?> val,
double weight)
put in class Centroidval - dataweight - weight
public static ProjectedCentroid make(BitSet dims,
Relation<? extends NumberVector<?,?>> relation)
dims - Dimensions to use (indexed with 0)relation - Relation to process
public 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
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||