Package org.apache.sysds.hops.cost

## Class FederatedCostEstimator

- java.lang.Object
- - org.apache.sysds.hops.cost.FederatedCostEstimator

-     public class FederatedCostEstimator
      extends Object

  Cost estimator for federated executions with methods and constants for going through DML programs to estimate costs.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `DEFAULT_MEMORY_ESTIMATE` |
    `static double` | `WORKER_COMPUTE_BANDWIDTH_FLOPS` |
    `static double` | `WORKER_DEGREE_OF_PARALLELISM` |
    `static double` | `WORKER_NETWORK_BANDWIDTH_BYTES_PS` |
    `static double` | `WORKER_READ_BANDWIDTH_BYTES_PS` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static FederatedCost` | `costEstimate​(HopRel root, MemoTable hopRelMemo)` | Return cost estimate in bytes of Hop DAG starting from given root HopRel.
    `FederatedCost` | `costEstimate​(Hop root)` | Return cost estimate in bytes of Hop DAG starting from given root.
    `FederatedCost` | `costEstimate​(DMLProgram dmlProgram)` | Estimate cost of given DML program in bytes.

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

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

- - ### Field Detail

    - #### DEFAULT_MEMORY_ESTIMATE

          public static int DEFAULT_MEMORY_ESTIMATE

    - #### WORKER_NETWORK_BANDWIDTH_BYTES_PS

          public static double WORKER_NETWORK_BANDWIDTH_BYTES_PS

    - #### WORKER_COMPUTE_BANDWIDTH_FLOPS

          public static double WORKER_COMPUTE_BANDWIDTH_FLOPS

    - #### WORKER_DEGREE_OF_PARALLELISM

          public static double WORKER_DEGREE_OF_PARALLELISM

    - #### WORKER_READ_BANDWIDTH_BYTES_PS

          public static double WORKER_READ_BANDWIDTH_BYTES_PS

  - ### Constructor Detail

    - #### FederatedCostEstimator

          public FederatedCostEstimator()

  - ### Method Detail

    - #### costEstimate

          public FederatedCost costEstimate​(DMLProgram dmlProgram)

      Estimate cost of given DML program in bytes.
      Parameters:
        `dmlProgram` - for which the cost is estimated
      Returns:
        federated cost object with cost estimate in bytes

    - #### costEstimate

          public FederatedCost costEstimate​(Hop root)

      Return cost estimate in bytes of Hop DAG starting from given root.
      Parameters:
        `root` - of Hop DAG for which cost is estimated
      Returns:
        cost estimation of Hop DAG starting from given root

    - #### costEstimate

          public static FederatedCost costEstimate​(HopRel root,
                                                   MemoTable hopRelMemo)

      Return cost estimate in bytes of Hop DAG starting from given root HopRel.
      Parameters:
        `root` - HopRel of Hop DAG for which cost is estimated
        `hopRelMemo` - memo table of HopRels for calculating input costs
      Returns:
        cost estimation of Hop DAG starting from given root HopRel