|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.dcs.renaissance.iqir.DensityMerger
public class DensityMerger
This class is a tool to merge different densities on a sparse space
| Constructor Summary | |
|---|---|
DensityMerger(boolean superpose)
Initialise with no maximum rank |
|
DensityMerger(boolean superpose,
int maxRank)
Build a new density merger |
|
| Method Summary | |
|---|---|
void |
addDensity(String name,
double weight,
Density density,
double logCardinality,
bpiwowar.maths.matrix.DoubleMatrix1D sum)
Add a density |
void |
addDensity(String name,
double weight,
int[] localToGobalTermIdMap,
bpiwowar.maths.matrix.DiagonalDoubleMatrix mS,
bpiwowar.maths.matrix.DoubleMatrix2D mU,
double logCardinality,
bpiwowar.maths.matrix.DoubleMatrix1D sum)
Add a new density (represented as a set of weighted vectors), which should be normalised |
void |
addDensity(String name,
WeightedVectorSet ds)
Add a weighted vector set |
void |
computeMergedTracker(bpiwowar.log.TaskTimer timer)
Do a series of rank one update that corresponds to the desired operation (mixture or mixture of superpositions) |
String |
getName()
Get the name of the merged components |
double |
getTotalWeight()
Return the sum of weights |
DensityTracker |
getTracker()
|
boolean |
isEmpty()
Returns true if the mixture is empty (i.e. |
boolean |
isMixtureOfSuperposition()
|
Density |
merge(bpiwowar.log.TaskTimer timer)
Merge the added densities |
WeightedVectorSet |
mergeWithSum(bpiwowar.log.TaskTimer timer)
Compute the resulting density and the associated sum of vectors |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DensityMerger(boolean superpose,
int maxRank)
superpose - Should we superpose the different densities?public DensityMerger(boolean superpose)
superpose - | Method Detail |
|---|
public boolean isMixtureOfSuperposition()
public void addDensity(String name,
WeightedVectorSet ds)
name - ds - The set
public void addDensity(String name,
double weight,
Density density,
double logCardinality,
bpiwowar.maths.matrix.DoubleMatrix1D sum)
name - weight - density - logCardinality - sum -
public void addDensity(String name,
double weight,
int[] localToGobalTermIdMap,
bpiwowar.maths.matrix.DiagonalDoubleMatrix mS,
bpiwowar.maths.matrix.DoubleMatrix2D mU,
double logCardinality,
bpiwowar.maths.matrix.DoubleMatrix1D sum)
name - localToGobalTermIdMap - Local to global term mapmS - mU - sum - The sum of vectors that were used to build this densitycardinality - The cardinality of the set used to build the densityweight - The weight associated to this densitypublic String getName()
public double getTotalWeight()
public WeightedVectorSet mergeWithSum(bpiwowar.log.TaskTimer timer)
timer - The timer
public Density merge(bpiwowar.log.TaskTimer timer)
timer -
public void computeMergedTracker(bpiwowar.log.TaskTimer timer)
timer - The timer for time related informationspublic DensityTracker getTracker()
public boolean isEmpty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||