Package org.apache.sysds.hops.fedplanner
Class MemoTable
- java.lang.Object
- 
- org.apache.sysds.hops.fedplanner.MemoTable
 
- 
 public class MemoTable extends Object Memoization of federated execution alternatives. This memoization data structure is used when generating optimal federated execution plans. The alternative executions are stored as HopRels and the methods of this class are used to add, update, and retrieve the alternatives.
- 
- 
Constructor SummaryConstructors Constructor Description MemoTable()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsHop(Hop root)Checks if root hop has been added to memo.booleancontainsHopRel(HopRel root)Checks if given HopRel has been added to memo.HopRelgetFederatedOutputAlternative(Hop root)Get the federated output alternative for given root hop or throw exception if not found.HopRelgetFederatedOutputAlternativeOrNull(Hop root)Get the federated output alternative for given root hop or null if not found.List<String>getFedOutAlternatives(Hop root)Get list of strings representing the different hopRel federated outputs related to root hop.List<FTypes.FType>getFTypes(Hop root)Get all output FTypes of given root from HopRels stored in memo.HopRelgetHopRel(Hop root, FTypes.FType fType)HopRelgetLOUTOrNONEAlternative(Hop root)HopRelgetMinCostAlternative(Hop root)Get the HopRel with minimum cost for given root hopbooleanhasFederatedOutputAlternative(Hop root)Checks if any of the federated execution alternatives for the given root hop has federated output.voidput(Hop root, List<HopRel> hopRels)Memoize hopRels related to given root.StringtoString()
 
- 
- 
- 
Method Detail- 
getFedOutAlternativespublic List<String> getFedOutAlternatives(Hop root) Get list of strings representing the different hopRel federated outputs related to root hop.- Parameters:
- root- for which HopRel fedouts are found
- Returns:
- federated output values as strings
 
 - 
getMinCostAlternativepublic HopRel getMinCostAlternative(Hop root) Get the HopRel with minimum cost for given root hop- Parameters:
- root- hop for which minimum cost HopRel is found
- Returns:
- HopRel with minimum cost for given hop
 
 - 
hasFederatedOutputAlternativepublic boolean hasFederatedOutputAlternative(Hop root) Checks if any of the federated execution alternatives for the given root hop has federated output.- Parameters:
- root- hop for which execution alternatives are checked
- Returns:
- true if root has federated output as an execution alternative
 
 - 
getFederatedOutputAlternativepublic HopRel getFederatedOutputAlternative(Hop root) Get the federated output alternative for given root hop or throw exception if not found.- Parameters:
- root- hop for which federated output HopRel is returned
- Returns:
- federated output HopRel for given root hop
 
 - 
getFederatedOutputAlternativeOrNullpublic HopRel getFederatedOutputAlternativeOrNull(Hop root) Get the federated output alternative for given root hop or null if not found.- Parameters:
- root- hop for which federated output HopRel is returned
- Returns:
- federated output HopRel for given root hop
 
 - 
putpublic void put(Hop root, List<HopRel> hopRels) Memoize hopRels related to given root.- Parameters:
- root- for which hopRels are added
- hopRels- execution alternatives related to the given root
 
 - 
containsHoppublic boolean containsHop(Hop root) Checks if root hop has been added to memo.- Parameters:
- root- hop
- Returns:
- true if root has been added to memo.
 
 - 
containsHopRelpublic boolean containsHopRel(HopRel root) Checks if given HopRel has been added to memo.- Parameters:
- root- HopRel
- Returns:
- true if root HopRel has been added to memo.
 
 - 
getFTypespublic List<FTypes.FType> getFTypes(Hop root) Get all output FTypes of given root from HopRels stored in memo.- Parameters:
- root- for which output FTypes are found
- Returns:
- list of output FTypes
 
 - 
getHopRelpublic HopRel getHopRel(Hop root, FTypes.FType fType) 
 
- 
 
-