org.apache.sysds.runtime.controlprogram.parfor.opt

## Class CostEstimator

- java.lang.Object
- - org.apache.sysds.runtime.controlprogram.parfor.opt.CostEstimator

Direct Known Subclasses:
  CostEstimatorHops, CostEstimatorRuntime

    public abstract class CostEstimator
    extends Object

Base class for all potential cost estimators TODO account for shared read-only matrices when computing aggregated stats

### Nested Class Summary

Nested Classes
`static class` `CostEstimator.DataFormat`
`static class` `CostEstimator.ExcludeType`
`static class` `CostEstimator.TestMeasure`

### Field Summary

Fields
`static double` `DEFAULT_EST_PARALLELISM`
`static double` `DEFAULT_MEM_ESTIMATE_CP`
`static double` `DEFAULT_MEM_ESTIMATE_SP`
`static double` `DEFAULT_TIME_ESTIMATE`
`static long` `FACTOR_NUM_ITERATIONS`

### Constructor Summary

Constructors
Constructor and Description
`CostEstimator()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`double` `getEstimate(CostEstimator.TestMeasure measure, OptNode node)` Main estimation method.
`double` `getEstimate(CostEstimator.TestMeasure measure, OptNode node, boolean inclCondPart)`
`double` `getEstimate(CostEstimator.TestMeasure measure, OptNode node, boolean inclCondPart, Collection<String> vars, CostEstimator.ExcludeType extype)`
`double` `getEstimate(CostEstimator.TestMeasure measure, OptNode node, Types.ExecType et)` Main estimation method.
`abstract double` `getLeafNodeEstimate(CostEstimator.TestMeasure measure, OptNode node)` Main leaf node estimation method - to be overwritten by specific cost estimators
`abstract double` `getLeafNodeEstimate(CostEstimator.TestMeasure measure, OptNode node, Types.ExecType et)` Main leaf node estimation method - to be overwritten by specific cost estimators

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_EST_PARALLELISM

    public static final double DEFAULT_EST_PARALLELISM

See Also:
  Constant Field Values

#### FACTOR_NUM_ITERATIONS

    public static final long FACTOR_NUM_ITERATIONS

See Also:
  Constant Field Values

#### DEFAULT_TIME_ESTIMATE

    public static final double DEFAULT_TIME_ESTIMATE

See Also:
  Constant Field Values

#### DEFAULT_MEM_ESTIMATE_CP

    public static final double DEFAULT_MEM_ESTIMATE_CP

See Also:
  Constant Field Values

#### DEFAULT_MEM_ESTIMATE_SP

    public static final double DEFAULT_MEM_ESTIMATE_SP

See Also:
  Constant Field Values

### Constructor Detail

#### CostEstimator

    public CostEstimator()

### Method Detail

#### getLeafNodeEstimate

    public abstract double getLeafNodeEstimate(CostEstimator.TestMeasure measure,
                                               OptNode node)

Main leaf node estimation method - to be overwritten by specific cost estimators

Parameters:
  `measure` - ?
  `node` - internal representation of a plan alternative for program blocks and instructions
Returns:
  estimate?

#### getLeafNodeEstimate

    public abstract double getLeafNodeEstimate(CostEstimator.TestMeasure measure,
                                               OptNode node,
                                               Types.ExecType et)

Main leaf node estimation method - to be overwritten by specific cost estimators

Parameters:
  `measure` - ?
  `node` - internal representation of a plan alternative for program blocks and instructions
  `et` - forced execution type for leaf node
Returns:
  estimate?

#### getEstimate

    public double getEstimate(CostEstimator.TestMeasure measure,
                              OptNode node)

Main estimation method.

Parameters:
  `measure` - ?
  `node` - internal representation of a plan alternative for program blocks and instructions
Returns:
  estimate?

#### getEstimate

    public double getEstimate(CostEstimator.TestMeasure measure,
                              OptNode node,
                              boolean inclCondPart)

#### getEstimate

    public double getEstimate(CostEstimator.TestMeasure measure,
                              OptNode node,
                              boolean inclCondPart,
                              Collection<String> vars,
                              CostEstimator.ExcludeType extype)

#### getEstimate

    public double getEstimate(CostEstimator.TestMeasure measure,
                              OptNode node,
                              Types.ExecType et)

Main estimation method.

Parameters:
  `measure` - estimate type (time or memory)
  `node` - plan opt tree node
  `et` - execution type
Returns:
  estimate