|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.math.ReplacingHistogram<T> de.lmu.ifi.dbs.elki.math.AggregatingHistogram<T,D> de.lmu.ifi.dbs.elki.math.FlexiHistogram<T,D>
T
- Type of data in histogramD
- Type of input datapublic class FlexiHistogram<T,D>
Histogram with flexible size, guaranteed to be in [bin, 2*bin[
Nested Class Summary | |
---|---|
static class |
FlexiHistogram.Adapter<T,D>
Adapter interface to specify bin creation, data caching and combination. |
Nested classes/interfaces inherited from class de.lmu.ifi.dbs.elki.math.ReplacingHistogram |
---|
ReplacingHistogram.Iter, ReplacingHistogram.RIter |
Field Summary | |
---|---|
private int |
destsize
Destination (minimum) size of the structure. |
private FlexiHistogram.Adapter<T,D> |
downsampler
Adapter class, extended "maker". |
private ArrayList<Pair<Double,D>> |
tempcache
Cache for elements when not yet initialized. |
Fields inherited from class de.lmu.ifi.dbs.elki.math.ReplacingHistogram |
---|
base, binsize, data, max, offset, size |
Constructor Summary | |
---|---|
FlexiHistogram(int bins,
FlexiHistogram.Adapter<T,D> adapter)
Create a new histogram for an unknown data range. |
Method Summary | |
---|---|
void |
aggregate(double coord,
D value)
Add a value to the histogram using the aggregation adapter. |
static FlexiHistogram<Pair<Double,Double>,Pair<Double,Double>> |
DoubleSumDoubleSumHistogram(int bins)
Histograms that work like two DoubleSumHistogram(int) , component wise. |
static FlexiHistogram<Double,Double> |
DoubleSumHistogram(int bins)
Convenience constructor for Double-based Histograms. |
T |
get(double coord)
Get the data at a given Coordinate. |
double |
getBinsize()
Get the size (width) of a bin. |
double |
getCoverMaximum()
Get maximum (covered by bins, not data!) |
double |
getCoverMinimum()
Get minimum (covered by bins, not data!) |
ArrayList<T> |
getData()
Get the raw data. |
int |
getNumBins()
Get the number of bins actually in use. |
static FlexiHistogram<Integer,Integer> |
IntSumHistogram(int bins)
Convenience constructor for Integer-based Histograms. |
static FlexiHistogram<Pair<Integer,Integer>,Pair<Integer,Integer>> |
IntSumIntSumHistogram(int bins)
Histograms that work like two IntSumHistogram(int) , component wise. |
Iterator<Pair<Double,T>> |
iterator()
Get an iterator over all histogram bins. |
static FlexiHistogram<Long,Long> |
LongSumHistogram(int bins)
Convenience constructor for Long-based Histograms. |
static FlexiHistogram<Pair<Long,Long>,Pair<Long,Long>> |
LongSumLongSumHistogram(int bins)
Histograms that work like two LongSumHistogram(int) , component wise. |
private void |
materialize()
|
static FlexiHistogram<MeanVariance,Double> |
MeanVarianceHistogram(int bins)
Convenience constructor for MeanVariance -based Histograms. |
void |
replace(double coord,
T d)
Put data at a given coordinate. |
Iterator<Pair<Double,T>> |
reverseIterator()
Get an iterator over all histogram bins. |
private void |
testResample()
|
Methods inherited from class de.lmu.ifi.dbs.elki.math.AggregatingHistogram |
---|
DoubleSumDoubleSumHistogram, DoubleSumHistogram, IntSumHistogram, IntSumIntSumHistogram, LongSumHistogram, LongSumLongSumHistogram, MeanVarianceHistogram |
Methods inherited from class de.lmu.ifi.dbs.elki.math.ReplacingHistogram |
---|
DoubleDoubleHistogram, DoubleHistogram, getBinNr, IntHistogram, IntIntHistogram, make |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private FlexiHistogram.Adapter<T,D> downsampler
private ArrayList<Pair<Double,D>> tempcache
private int destsize
Constructor Detail |
---|
public FlexiHistogram(int bins, FlexiHistogram.Adapter<T,D> adapter)
bins
and
2*bins
bins in length.
bins
- Target number of binsadapter
- Adapter for data types and combination rules.Method Detail |
---|
private void materialize()
public void replace(double coord, T d)
ReplacingHistogram
replace
in class ReplacingHistogram<T>
coord
- Coordinated
- New Dataprivate void testResample()
public T get(double coord)
ReplacingHistogram
get
in class ReplacingHistogram<T>
coord
- Coordinate.
public double getBinsize()
ReplacingHistogram
getBinsize
in class ReplacingHistogram<T>
public double getCoverMaximum()
ReplacingHistogram
getCoverMaximum
in class ReplacingHistogram<T>
public double getCoverMinimum()
ReplacingHistogram
getCoverMinimum
in class ReplacingHistogram<T>
public ArrayList<T> getData()
ReplacingHistogram
getData
in class ReplacingHistogram<T>
public int getNumBins()
ReplacingHistogram
getNumBins
in class ReplacingHistogram<T>
public Iterator<Pair<Double,T>> iterator()
ReplacingHistogram
iterator
in interface Iterable<Pair<Double,T>>
iterator
in class ReplacingHistogram<T>
public Iterator<Pair<Double,T>> reverseIterator()
ReplacingHistogram
reverseIterator
in class ReplacingHistogram<T>
public void aggregate(double coord, D value)
AggregatingHistogram
aggregate
in class AggregatingHistogram<T,D>
coord
- Coordinatevalue
- New valuepublic static FlexiHistogram<Integer,Integer> IntSumHistogram(int bins)
bins
- Number of bins
public static FlexiHistogram<Long,Long> LongSumHistogram(int bins)
bins
- Number of bins
public static FlexiHistogram<Double,Double> DoubleSumHistogram(int bins)
bins
- Number of bins
public static FlexiHistogram<MeanVariance,Double> MeanVarianceHistogram(int bins)
MeanVariance
-based Histograms. Uses a
constructor to initialize bins with new MeanVariance
objects
bins
- Number of bins
MeanVariance
.public static FlexiHistogram<Pair<Integer,Integer>,Pair<Integer,Integer>> IntSumIntSumHistogram(int bins)
IntSumHistogram(int)
, component wise.
bins
- Number of bins.
public static FlexiHistogram<Pair<Long,Long>,Pair<Long,Long>> LongSumLongSumHistogram(int bins)
LongSumHistogram(int)
, component wise.
bins
- Number of bins.
public static FlexiHistogram<Pair<Double,Double>,Pair<Double,Double>> DoubleSumDoubleSumHistogram(int bins)
DoubleSumHistogram(int)
, component wise.
bins
- Number of bins.
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |