Package com.macrofocus.molap.subset
Class SubsetDataFrame<Row,Column,Value>
- java.lang.Object
-
- com.macrofocus.molap.dataframe.AbstractDataFrame<R,C,V>
-
- com.macrofocus.molap.dataframe.AbstractMutableDataFrame<R,C,V>
-
- com.macrofocus.molap.dataframe.ReMappedDataFrame<Row,Column,Value>
-
- com.macrofocus.molap.subset.SubsetDataFrame<Row,Column,Value>
-
- Type Parameters:
Row
-Column
-Value
-
- All Implemented Interfaces:
DataFrame<Row,Column,Value>
,MutableDataFrame<Row,Column,Value>
public class SubsetDataFrame<Row,Column,Value> extends ReMappedDataFrame<Row,Column,Value>
ToDo: Could use less memory by compressing all the pointers (int array), especially since direct traversal is not needed and accessing the pointers is unfrequent. Could be stored in a Gzipped byte array or ByteBuffer, or using some of the compression techniques of https://github.com/lemire/JavaFastPFOR ToDo: Also possible would to obtain how many unique values exist in each column to select appropriate data structure, as well as knowing whether the values could be accessed with less memory consuming (byte, short) pointers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.macrofocus.molap.dataframe.ReMappedDataFrame
ReMappedDataFrame.ReMappedRecipe<R,C>
-
Nested classes/interfaces inherited from class com.macrofocus.molap.dataframe.AbstractDataFrame
AbstractDataFrame.ColumnSeries
-
-
Field Summary
-
Fields inherited from class com.macrofocus.molap.dataframe.ReMappedDataFrame
dataFrame
-
-
Constructor Summary
Constructors Constructor Description SubsetDataFrame(DataFrame<Row,Column,Value> dataFrame)
SubsetDataFrame(DataFrame<Row,Column,Value> dataFrame, com.macrofocus.filter.MutableIndexFilter<Row> outputFilter)
SubsetDataFrame(DataFrame<Row,Column,Value> dataFrame, com.macrofocus.filter.MutableIndexFilter<Row> outputFilter, com.macrofocus.selection.MutableSelection<Row> selection)
-
Method Summary
-
Methods inherited from class com.macrofocus.molap.dataframe.ReMappedDataFrame
getColumnClass, getColumnIndex, getOriginalDataFrame, getRow, getRowClass, getRowIndex, getValueAt, invalidate, join, scheduleUpdate, setDataFrame, setRecipe, setValueAt, updateImmediatelly
-
Methods inherited from class com.macrofocus.molap.dataframe.AbstractMutableDataFrame
reindexRows, reindexRows
-
Methods inherited from class com.macrofocus.molap.dataframe.AbstractDataFrame
addDataFrameListener, addWeakDataFrameListener, aggregate, aggregate, append, appendAndReindex, benchmark, columns, filter, getCentroid, getColumn, getColumnAddress, getColumnCount, getColumnKey, getColumnName, getConstant, getCount, getCountDistinct, getCountDistinctWithNull, getCube, getDataFrameAggregation, getDistributiveStatistics, getFirst, getFirstQuartile, getMax, getMean, getMedian, getMin, getRandom, getRowAddress, getRowCount, getRowKey, getStatistics, getStdDev, getSum, getThirdQuartile, getUnivariateStatistics, getVariance, getVarianceByPopulation, getWeightedMean, getWeightedSum, notifyDataFrameChanged, orderRows, print, print, printSchema, reindexColumns, reindexRows, reindexRows, reindexRows, remapColumns, removeColumns, removeDataFrameListener, removeDataFrameListeners, removeDuplicates, rows
-
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.dataframe.DataFrame
addDataFrameListener, addWeakDataFrameListener, aggregate, aggregate, append, appendAndReindex, benchmark, columns, filter, getCentroid, getColumn, getColumnAddress, getColumnCount, getColumnKey, getColumnName, getConstant, getCount, getCountDistinct, getCountDistinctWithNull, getDataFrameAggregation, getDistributiveStatistics, getFirst, getFirstQuartile, getMax, getMean, getMedian, getMin, getRandom, getRowAddress, getRowCount, getRowKey, getStatistics, getStdDev, getSum, getThirdQuartile, getUnivariateStatistics, getVariance, getVarianceByPopulation, getWeightedMean, getWeightedSum, orderRows, print, print, printSchema, reindexColumns, reindexRows, reindexRows, reindexRows, remapColumns, removeColumns, removeDataFrameListener, removeDataFrameListeners, removeDuplicates, rows
-
Methods inherited from interface com.macrofocus.molap.dataframe.MutableDataFrame
reindexRows, reindexRows
-
-
-
-
Constructor Detail
-
SubsetDataFrame
public SubsetDataFrame(DataFrame<Row,Column,Value> dataFrame, com.macrofocus.filter.MutableIndexFilter<Row> outputFilter)
-
SubsetDataFrame
public SubsetDataFrame(DataFrame<Row,Column,Value> dataFrame, com.macrofocus.filter.MutableIndexFilter<Row> outputFilter, com.macrofocus.selection.MutableSelection<Row> selection)
-
-
Method Detail
-
getOutputFilter
public com.macrofocus.filter.Filter<Row> getOutputFilter()
-
getBinningDimension
public <Bin> SingleBinningDimension<Row,Bin> getBinningDimension(Column column, SingleBinningDimension.SingleBinningStrategy<Row,Bin> binningStrategy)
-
getCategoricalDimension
public CategoricalDimension<Row,Column,Value> getCategoricalDimension(Column column)
-
getDistributionDimension
public <Bin> DistributionDimension<Row,Value,Bin> getDistributionDimension(Column column, DistributionDimension.DistributionStrategy<Value,Bin> distributionStrategy)
-
getOrdinalDimension
public OrdinalDimension<Row,Column,Value> getOrdinalDimension(Column column)
-
getItemsDimension
public ItemsDimension<Row,Column,Value> getItemsDimension()
-
createTextDimension
public DefaultTextDimension<Row,Column,Value> createTextDimension(Column... columns)
-
updateFilters
public void updateFilters()
Filter using TIntList
-
updateFiltersUsingArrays
public void updateFiltersUsingArrays()
Filter using raw arrays
-
updateActiveIndices
public int[] updateActiveIndices()
-
updateFiltersUsingTHashSet
@Deprecated public void updateFiltersUsingTHashSet()
Deprecated.
-
defineIndex
public void defineIndex(Column... columns)
-
materializeIndex
public void materializeIndex(Column... columns)
-
originalDataFrameChanged
protected void originalDataFrameChanged()
- Overrides:
originalDataFrameChanged
in classReMappedDataFrame<Row,Column,Value>
-
setTimer
public void setTimer(com.macrofocus.timer.CPTimer timer)
-
invalidateFilters
protected void invalidateFilters()
-
scheduleUpdateFilters
protected void scheduleUpdateFilters()
-
computeFiltered
public int[] computeFiltered(int[] oldIndices, int[] newIndices)
-
computeUnfiltered
public int[] computeUnfiltered(int[] oldIndices, int[] newIndices)
-
reset
public void reset()
-
setExecutor
public void setExecutor(com.macrofocus.timer.CPExecutor executor)
-
-