Class MonteCarloLatticeImpl
java.lang.Object
org.pentaho.aggdes.algorithm.impl.LatticeImpl
org.pentaho.aggdes.algorithm.impl.MonteCarloLatticeImpl
- All Implemented Interfaces:
Lattice
Implementation of the
Lattice
data structure for use by
the MonteCarloAlgorithm
.-
Field Summary
Fields inherited from class org.pentaho.aggdes.algorithm.impl.LatticeImpl
materializedAggregates, schema
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchooseAggregate
(double maxCost, double minCostBenefitRatio, Cost cost) Chooses the next un-materialized aggregate with the highest incremental benefit.copy()
Returns a copy of this lattice.costBenefitOf
(AggregateImpl aggregate) Returns an object representing the cost of the given aggregate, and benefit of adding it to the current lattice.void
materialize
(AggregateImpl aggregate) Materializes an aggregate.Methods inherited from class org.pentaho.aggdes.algorithm.impl.LatticeImpl
computeAggregateCosts, computeAggregateCosts, estimateCost, findMaterializedDirectAscendants, findMaterializedDirectDescendants, findNearestMaterializedDescendant, getAggregate, getBenefit, getChildren, getMaterializedAggregates, getParents, nonMaterializedDescendants, toBits
-
Constructor Details
-
MonteCarloLatticeImpl
-
-
Method Details
-
copy
Description copied from interface:Lattice
Returns a copy of this lattice. -
chooseAggregate
Description copied from interface:Lattice
Chooses the next un-materialized aggregate with the highest incremental benefit.- Parameters:
maxCost
- Maximum costminCostBenefitRatio
- Minimum cost/benefit ratiocost
- Output parameter, is populated with the benefit and the number of queries which will benefit by materializing the chosen aggregate- Returns:
- Chosen aggregate
-
materialize
Description copied from interface:Lattice
Materializes an aggregate.- Specified by:
materialize
in interfaceLattice
- Overrides:
materialize
in classLatticeImpl
- Parameters:
aggregate
- Aggregate
-
costBenefitOf
Description copied from interface:Lattice
Returns an object representing the cost of the given aggregate, and benefit of adding it to the current lattice.- Parameters:
aggregate
- Aggregate- Returns:
- Incremental cost/benefit of the aggregate
-