public class AdaptiveMonteCarloAlgorithm extends AlgorithmImpl
Algorithm
that runs the Monte Carlo method repeatedly,
tuning the cost limit each time to yield an effective cost limit.
The Monte Carlo algorithm tends to be most effective when the target cost is close to the actual cost. By running the algorithm repeatedly, we can determine a realistic cost.
Algorithm.CostBenefit, Algorithm.ParameterEnumparameterList, schema| Constructor and Description |
|---|
AdaptiveMonteCarloAlgorithm() |
| 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.