Package org.apache.sysds.hops.fedplanner

## Class FederatedPlannerCostbased

- java.lang.Object
- - org.apache.sysds.hops.fedplanner.AFederatedPlanner
  - - org.apache.sysds.hops.fedplanner.FederatedPlannerCostbased

-     public class FederatedPlannerCostbased
      extends AFederatedPlanner

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FederatedPlannerCostbased()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `buildCombinations​(List<List<FTypes.FType>> validFTypes, List<List<FTypes.FType>> result, int currentIndex, List<FTypes.FType> currentResult)` |
    `List<List<FTypes.FType>>` | `getAllCombinations​(List<List<FTypes.FType>> validFTypes)` |
    `List<Hop>` | `getTerminalHops()` |
    `void` | `rewriteProgram​(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)` | Selects a federated execution plan for the given program by setting the forced execution type.
    `ArrayList<StatementBlock>` | `rewriteStatementBlock​(DMLProgram prog, StatementBlock sb, Map<String,​Hop> paramMap)` | Estimates cost and enumerates federated execution plans in hopRelMemo.

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

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

- - ### Constructor Detail

    - #### FederatedPlannerCostbased

          public FederatedPlannerCostbased()

  - ### Method Detail

    - #### getTerminalHops

          public List<Hop> getTerminalHops()

    - #### rewriteProgram

          public void rewriteProgram​(DMLProgram prog,
                                     FunctionCallGraph fgraph,
                                     FunctionCallSizeInfo fcallSizes)

      Description copied from class: `AFederatedPlanner`
      Selects a federated execution plan for the given program by setting the forced execution type.
      Specified by:
        `rewriteProgram` in class `AFederatedPlanner`
      Parameters:
        `prog` - dml program
        `fgraph` - function call graph
        `fcallSizes` - function call graph sizes

    - #### rewriteStatementBlock

          public ArrayList<StatementBlock> rewriteStatementBlock​(DMLProgram prog,
                                                                 StatementBlock sb,
                                                                 Map<String,​Hop> paramMap)

      Estimates cost and enumerates federated execution plans in hopRelMemo. The method calls the contained statement blocks recursively.
      Parameters:
        `prog` - dml program
        `sb` - statement block
        `paramMap` - map of parameters in function call
      Returns:
        list of statement blocks with the federated output value updated for each hop

    - #### getAllCombinations

          public List<List<FTypes.FType>> getAllCombinations​(List<List<FTypes.FType>> validFTypes)

    - #### buildCombinations

          public void buildCombinations​(List<List<FTypes.FType>> validFTypes,
                                        List<List<FTypes.FType>> result,
                                        int currentIndex,
                                        List<FTypes.FType> currentResult)