public class MonteCarloAlgorithm extends AlgorithmImpl
Algorithm that
measures the effectiveness of a set of
Aggregate objects by generating a
set of representative sample queries.
Using a random set of queries is much cheaper than generating the whole
set, as done by ExhaustiveLatticeAlgorithm, but is not much less
accurate.
Algorithm.CostBenefit, Algorithm.ParameterEnumparameterList, schema| Constructor and Description |
|---|
MonteCarloAlgorithm() |
| Modifier and Type | Method and Description |
|---|---|
List<Algorithm.CostBenefit> |
computeAggregateCosts(Schema schema,
Map<Parameter,Object> parameterValues,
List<Aggregate> aggregateList)
Computes cost/benefit metrics for a list of Aggregates.
|
Result |
run(Schema schema,
Map<Parameter,Object> parameterValues,
Progress progress)
Runs the optimization algorithm to produces a set of recommended
aggregate tables.
|
cancel, checkCancelTimeout, createAggregate, getBaseName, getName, getParameters, onStart, runAlgorithmpublic Result run(Schema schema, Map<Parameter,Object> parameterValues, Progress progress)
AlgorithmThe allowable parameters are specified by the
Component.getParameters() method.
Returns null if another thread
called Algorithm.cancel() and there is no useful result.
schema - SchemaparameterValues - Parameter valuesprogress - Progress callbackAlgorithm.cancel() and there is no useful resultpublic List<Algorithm.CostBenefit> computeAggregateCosts(Schema schema, Map<Parameter,Object> parameterValues, List<Aggregate> aggregateList)
AlgorithmThe aggregates must have been created using the
#createAggregate(java.util.List) method.
The order of the list is important: the benefit of the ith aggregate is its benefit over the previous aggregates 0, ... i - 1.
This method is not thread safe; you must not call it while calling
another method on this Algorithm object. The Algorithm object may or
may not have been previously used to generate a set of aggregates
(see Algorithm.run(org.pentaho.aggdes.model.Schema, java.util.Map<org.pentaho.aggdes.model.Parameter, java.lang.Object>, org.pentaho.aggdes.algorithm.Progress)).
schema - SchemaparameterValues - Parameter valuesaggregateList - List of aggregatesCopyright © 2006–2016 Julian Hyde. All rights reserved.