Package com.macrofocus.molap.subset
Class AbstractBinningDimension<Row,Column,Value,Bin>
- java.lang.Object
-
- com.macrofocus.molap.subset.AbstractDimension<Row>
-
- com.macrofocus.molap.subset.AbstractBinningDimension<Row,Column,Value,Bin>
-
- All Implemented Interfaces:
BinningDimension<Row,Bin>
,Dimension<Row>
- Direct Known Subclasses:
AbstractMultiBinningDimension
,DefaultBinningDimension
public abstract class AbstractBinningDimension<Row,Column,Value,Bin> extends AbstractDimension<Row> implements BinningDimension<Row,Bin>
Created by luc on 07.04.17.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractBinningDimension.Operation
-
Nested classes/interfaces inherited from class com.macrofocus.molap.subset.AbstractDimension
AbstractDimension.FilteringCallback<R>, AbstractDimension.FilteringEvent<Row>, AbstractDimension.IndicesIterable<R>, AbstractDimension.IndicesSupplier
-
Nested classes/interfaces inherited from interface com.macrofocus.molap.subset.BinningDimension
BinningDimension.BinningStrategy<Row,Bin>
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]
activeIndices
protected com.macrofocus.utils.RandomAccessIterable<Bin>
bins
protected SubsetDataFrame<Row,Column,Value>
dataFrame
protected ObjectIntMap<Bin>
filterCounts
protected java.util.Map<Reducer,Group>
groups
protected java.util.Map<Bin,int[]>
index
protected boolean
inverseFilter
protected int
maxValueCount
protected int[]
otherActiveIndices
protected ObjectIntMap<Bin>
selectedCounts
protected com.macrofocus.selection.MutableSelection<Row>
selection
protected int
sumValueCount
protected boolean
updateFilterImmediately
-
Fields inherited from class com.macrofocus.molap.subset.AbstractDimension
updateTimer
-
-
Constructor Summary
Constructors Constructor Description AbstractBinningDimension(SubsetDataFrame<Row,Column,Value> dataFrame, AbstractDimension.FilteringCallback<Row> filteringCallback, com.macrofocus.selection.MutableSelection<Row> selection, AbstractBinningDimension.Operation operation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filterAll()
void
filterExact(Bin... bins)
void
filterExactIterable(java.lang.Iterable<Bin> bins)
com.macrofocus.utils.RandomAccessIterable<Bin>
getActiveBins()
double
getActiveDensity(Bin bin)
int[]
getActiveIndices()
int[]
getActiveIndicesUsingArrays()
gnu.trove.set.TIntSet
getActiveIndicesUsingHashSet()
com.macrofocus.utils.RandomAccessIterable<Bin>
getBins()
double
getDensity(Bin bin)
com.macrofocus.filter.Filter<Row>
getFilter()
double
getFilterDensity(Bin bin)
com.macrofocus.selection.MutableSelection<Bin>
getFilterExact()
protected java.util.Map<Bin,int[]>
getIndex()
boolean
getInverseFilter()
double
getMaxActiveDensity()
double
getMaxDensity()
java.lang.Iterable<Row>
getRows(Bin bin)
com.macrofocus.selection.MutableSelection<Row>
getSelection()
double
getSelectionDensity(Bin bin)
double
getSumActiveDensity()
double
getSumDensity()
boolean
isReducable()
void
markDirty()
protected void
scheduleUpdateFilter()
void
setInverseFilter(boolean inverse)
protected void
updateActive()
int[]
updateActiveIndices()
protected void
updateFilter()
-
Methods inherited from class com.macrofocus.molap.subset.AbstractDimension
addDimensionListener, addWeakDimensionListener, notifyDimensionChanged, notifySelectedCountChanged, removeDimensionListener, removeDimensionListeners, setUpdateTimer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.macrofocus.molap.subset.BinningDimension
getGroup
-
Methods inherited from interface com.macrofocus.molap.subset.Dimension
addDimensionListener, addWeakDimensionListener, getName, materializeIndex, reduce, removeDimensionListener, removeDimensionListeners, setUpdateTimer
-
-
-
-
Field Detail
-
dataFrame
protected SubsetDataFrame<Row,Column,Value> dataFrame
-
index
protected java.util.Map<Bin,int[]> index
-
maxValueCount
protected int maxValueCount
-
sumValueCount
protected int sumValueCount
-
filterCounts
protected ObjectIntMap<Bin> filterCounts
-
selectedCounts
protected ObjectIntMap<Bin> selectedCounts
-
bins
protected com.macrofocus.utils.RandomAccessIterable<Bin> bins
-
otherActiveIndices
protected int[] otherActiveIndices
-
activeIndices
protected int[] activeIndices
-
inverseFilter
protected boolean inverseFilter
-
selection
protected final com.macrofocus.selection.MutableSelection<Row> selection
-
updateFilterImmediately
protected boolean updateFilterImmediately
-
-
Constructor Detail
-
AbstractBinningDimension
public AbstractBinningDimension(SubsetDataFrame<Row,Column,Value> dataFrame, AbstractDimension.FilteringCallback<Row> filteringCallback, com.macrofocus.selection.MutableSelection<Row> selection, AbstractBinningDimension.Operation operation)
-
-
Method Detail
-
isReducable
public boolean isReducable()
- Specified by:
isReducable
in interfaceDimension<Row>
-
updateActive
protected void updateActive()
-
getActiveBins
public com.macrofocus.utils.RandomAccessIterable<Bin> getActiveBins()
- Specified by:
getActiveBins
in interfaceBinningDimension<Row,Column>
-
getBins
public com.macrofocus.utils.RandomAccessIterable<Bin> getBins()
- Specified by:
getBins
in interfaceBinningDimension<Row,Column>
-
getIndex
protected java.util.Map<Bin,int[]> getIndex()
-
getRows
public java.lang.Iterable<Row> getRows(Bin bin)
- Specified by:
getRows
in interfaceBinningDimension<Row,Column>
-
getSelection
public com.macrofocus.selection.MutableSelection<Row> getSelection()
- Specified by:
getSelection
in interfaceBinningDimension<Row,Column>
-
getFilter
public com.macrofocus.filter.Filter<Row> getFilter()
-
getFilterExact
public com.macrofocus.selection.MutableSelection<Bin> getFilterExact()
-
filterExact
public void filterExact(Bin... bins)
-
filterExactIterable
public void filterExactIterable(java.lang.Iterable<Bin> bins)
-
getInverseFilter
public boolean getInverseFilter()
- Specified by:
getInverseFilter
in interfaceBinningDimension<Row,Column>
-
setInverseFilter
public void setInverseFilter(boolean inverse)
- Specified by:
setInverseFilter
in interfaceBinningDimension<Row,Column>
-
scheduleUpdateFilter
protected void scheduleUpdateFilter()
- Overrides:
scheduleUpdateFilter
in classAbstractDimension<Row>
-
updateFilter
protected void updateFilter()
- Specified by:
updateFilter
in classAbstractDimension<Row>
-
getDensity
public double getDensity(Bin bin)
- Specified by:
getDensity
in interfaceBinningDimension<Row,Column>
-
getActiveDensity
public double getActiveDensity(Bin bin)
- Specified by:
getActiveDensity
in interfaceBinningDimension<Row,Column>
-
getFilterDensity
public double getFilterDensity(Bin bin)
- Specified by:
getFilterDensity
in interfaceBinningDimension<Row,Column>
-
getSelectionDensity
public double getSelectionDensity(Bin bin)
- Specified by:
getSelectionDensity
in interfaceBinningDimension<Row,Column>
-
getMaxDensity
public double getMaxDensity()
- Specified by:
getMaxDensity
in interfaceBinningDimension<Row,Column>
-
getMaxActiveDensity
public double getMaxActiveDensity()
- Specified by:
getMaxActiveDensity
in interfaceBinningDimension<Row,Column>
-
getSumDensity
public double getSumDensity()
- Specified by:
getSumDensity
in interfaceBinningDimension<Row,Column>
-
getSumActiveDensity
public double getSumActiveDensity()
- Specified by:
getSumActiveDensity
in interfaceBinningDimension<Row,Column>
-
getActiveIndices
public int[] getActiveIndices()
- Specified by:
getActiveIndices
in interfaceDimension<Row>
-
updateActiveIndices
public int[] updateActiveIndices()
-
getActiveIndicesUsingArrays
public int[] getActiveIndicesUsingArrays()
- Specified by:
getActiveIndicesUsingArrays
in interfaceBinningDimension<Row,Column>
-
getActiveIndicesUsingHashSet
public gnu.trove.set.TIntSet getActiveIndicesUsingHashSet()
- Specified by:
getActiveIndicesUsingHashSet
in interfaceBinningDimension<Row,Column>
-
-