Package org.apache.sysds.hops.cost

## Class FederatedCost

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

    public class FederatedCost
    extends Object

Class storing execution cost estimates for federated executions with cost estimates split into different categories such as compute, read, and transfer cost.

### Constructor Summary

Constructors
`FederatedCost()`
`FederatedCost​(double readCost, double inputTransferCost, double outputTransferCost, double computeCost, double inputTotalCost, double repetitions)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addInputTotalCost​(double additionalCost)` Add cost to the stored input cost.
`void` `addInputTotalCost​(FederatedCost federatedCost)` Add total of federatedCost to stored inputTotalCost.
`double` `getInputTotalCost()` Get summed input costs.
`double` `getTotal()` Get the total sum of costs stored in this object.
`void` `setInputTotalCost​(double inputTotalCost)`
`String` `toString()`

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

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

### Constructor Detail

#### FederatedCost

    public FederatedCost()

#### FederatedCost

    public FederatedCost​(double readCost,
                         double inputTransferCost,
                         double outputTransferCost,
                         double computeCost,
                         double inputTotalCost,
                         double repetitions)

### Method Detail

#### getTotal

    public double getTotal()

Get the total sum of costs stored in this object.

Returns:
  total cost

#### getInputTotalCost

    public double getInputTotalCost()

Get summed input costs.

Returns:
  summed input costs

#### setInputTotalCost

    public void setInputTotalCost​(double inputTotalCost)

#### addInputTotalCost

    public void addInputTotalCost​(double additionalCost)

Add cost to the stored input cost.

Parameters:
  `additionalCost` - to add to total input cost

#### addInputTotalCost

    public void addInputTotalCost​(FederatedCost federatedCost)

Add total of federatedCost to stored inputTotalCost.

Parameters:
  `federatedCost` - input cost from which the total is retrieved

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`