public interface Algorithm extends Component
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Algorithm.CostBenefit
Collection of metrics describing the cost and benefit of instantiating
a particular
Aggregate. |
static class |
Algorithm.ParameterEnum
Enumeration of parameters common to all algorithms.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels a run.
|
List<Algorithm.CostBenefit> |
computeAggregateCosts(Schema schema,
Map<Parameter,Object> parameterValues,
List<Aggregate> aggregateList)
Computes cost/benefit metrics for a list of Aggregates.
|
Aggregate |
createAggregate(Schema schema,
List<Attribute> attributeList)
Creates an Aggregate.
|
Result |
run(Schema schema,
Map<Parameter,Object> parameterValues,
Progress progress)
Runs the optimization algorithm to produces a set of recommended
aggregate tables.
|
getName, getParametersResult run(Schema schema, Map<Parameter,Object> parameterValues, Progress progress)
The allowable parameters are specified by the
Component.getParameters() method.
Returns null if another thread
called cancel() and there is no useful result.
schema - SchemaparameterValues - Parameter valuesprogress - Progress callbackcancel() and there is no useful resultvoid cancel()
Call this method from another thread.
Some algorithms are able to return a result if they are canceled
before they run to completion; if so, the run(org.pentaho.aggdes.model.Schema, java.util.Map<org.pentaho.aggdes.model.Parameter, java.lang.Object>, org.pentaho.aggdes.algorithm.Progress) method will
return that result; otherwise run(org.pentaho.aggdes.model.Schema, java.util.Map<org.pentaho.aggdes.model.Parameter, java.lang.Object>, org.pentaho.aggdes.algorithm.Progress) returns null.
Aggregate createAggregate(Schema schema, List<Attribute> attributeList)
schema - Schema objectattributeList - List of attributesList<Algorithm.CostBenefit> computeAggregateCosts(Schema schema, Map<Parameter,Object> parameterValues, List<Aggregate> aggregateList)
The 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 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.