Class MonteCarloLatticeImpl

java.lang.Object
org.pentaho.aggdes.algorithm.impl.LatticeImpl
org.pentaho.aggdes.algorithm.impl.MonteCarloLatticeImpl
All Implemented Interfaces:
Lattice

public class MonteCarloLatticeImpl extends LatticeImpl
Implementation of the Lattice data structure for use by the MonteCarloAlgorithm.
  • Constructor Details

    • MonteCarloLatticeImpl

      public MonteCarloLatticeImpl(Schema schema)
  • Method Details

    • copy

      public Lattice copy()
      Description copied from interface: Lattice
      Returns a copy of this lattice.
    • chooseAggregate

      public AggregateImpl chooseAggregate(double maxCost, double minCostBenefitRatio, Cost cost)
      Description copied from interface: Lattice
      Chooses the next un-materialized aggregate with the highest incremental benefit.
      Parameters:
      maxCost - Maximum cost
      minCostBenefitRatio - Minimum cost/benefit ratio
      cost - Output parameter, is populated with the benefit and the number of queries which will benefit by materializing the chosen aggregate
      Returns:
      Chosen aggregate
    • materialize

      public void materialize(AggregateImpl aggregate)
      Description copied from interface: Lattice
      Materializes an aggregate.
      Specified by:
      materialize in interface Lattice
      Overrides:
      materialize in class LatticeImpl
      Parameters:
      aggregate - Aggregate
    • costBenefitOf

      public Algorithm.CostBenefit costBenefitOf(AggregateImpl aggregate)
      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