Package org.apache.sysds.utils

## Class Explain

- java.lang.Object
- - org.apache.sysds.utils.Explain

-     public class Explain
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `Explain.ExplainCounts` |
    `static class` | `Explain.ExplainType` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Explain.ExplainCounts` | `countDistributedOperations​(Program rtprog)` | Counts the number of compiled MRJob/Spark instructions in the given runtime program.
    `static String` | `createOffset​(int level)` |
    `static String` | `display​(DMLProgram prog, Program rtprog, Explain.ExplainType type, Explain.ExplainCounts counts)` |
    `static String` | `explain​(ArrayList<Instruction> inst)` |
    `static String` | `explain​(ArrayList<Instruction> inst, int level)` |
    `static String` | `explain​(CNode node)` |
    `static String` | `explain​(CNode node, int level)` |
    `static String` | `explain​(Hop hop)` |
    `static String` | `explain​(Hop hop, int level)` |
    `static String` | `explain​(DMLProgram prog)` |
    `static String` | `explain​(DMLProgram prog, Program rtprog, Explain.ExplainType type)` |
    `static String` | `explain​(DMLProgram prog, Program rtprog, Explain.ExplainType type, Explain.ExplainCounts counts)` |
    `static String` | `explain​(StatementBlock sb)` |
    `static String` | `explain​(Program rtprog)` |
    `static String` | `explain​(ProgramBlock pb)` |
    `static String` | `explain​(Program rtprog, Explain.ExplainCounts counts)` |
    `static String` | `explain​(Instruction inst)` |
    `static String` | `explain​(LineageItem li)` |
    `static String` | `explainCPlan​(CNodeTpl cplan)` |
    `static String` | `explainDegreeOfParallelism()` |
    `static String` | `explainDegreeOfParallelism​(Explain.ExplainCounts counts)` |
    `static String` | `explainFunctionCallGraph​(FunctionCallGraph fgraph, HashSet<String> fstack, String fkey, int level)` |
    `static String` | `explainHops​(ArrayList<Hop> hops)` |
    `static String` | `explainHops​(ArrayList<Hop> hops, int level)` |
    `static String` | `explainLineageItems​(LineageItem[] lis)` |
    `static String` | `explainLineageItems​(LineageItem[] lis, int level)` |
    `static String` | `explainMemoryBudget()` |
    `static String` | `explainMemoryBudget​(Explain.ExplainCounts counts)` |
    `static String` | `getIdentation​(int level)` |
    `static void` | `setMemo​(MemoTable memoTable)` | Store memo table for adding additional explain info regarding hops.

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

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

- - ### Constructor Detail

    - #### Explain

          public Explain()

  - ### Method Detail

    - #### setMemo

          public static void setMemo​(MemoTable memoTable)

      Store memo table for adding additional explain info regarding hops.
      Parameters:
        `memoTable` - to store in Explain

    - #### display

          public static String display​(DMLProgram prog,
                                       Program rtprog,
                                       Explain.ExplainType type,
                                       Explain.ExplainCounts counts)

    - #### explainMemoryBudget

          public static String explainMemoryBudget()

    - #### explainMemoryBudget

          public static String explainMemoryBudget​(Explain.ExplainCounts counts)

    - #### explainDegreeOfParallelism

          public static String explainDegreeOfParallelism()

    - #### explainDegreeOfParallelism

          public static String explainDegreeOfParallelism​(Explain.ExplainCounts counts)

    - #### explain

          public static String explain​(DMLProgram prog,
                                       Program rtprog,
                                       Explain.ExplainType type)

    - #### explain

          public static String explain​(DMLProgram prog,
                                       Program rtprog,
                                       Explain.ExplainType type,
                                       Explain.ExplainCounts counts)

    - #### explain

          public static String explain​(DMLProgram prog)

    - #### explain

          public static String explain​(Program rtprog)

    - #### explain

          public static String explain​(Program rtprog,
                                       Explain.ExplainCounts counts)

    - #### explain

          public static String explain​(ProgramBlock pb)

    - #### explain

          public static String explain​(ArrayList<Instruction> inst)

    - #### explain

          public static String explain​(ArrayList<Instruction> inst,
                                       int level)

    - #### explain

          public static String explain​(Instruction inst)

    - #### explain

          public static String explain​(StatementBlock sb)

    - #### explainHops

          public static String explainHops​(ArrayList<Hop> hops)

    - #### explainHops

          public static String explainHops​(ArrayList<Hop> hops,
                                           int level)

    - #### explain

          public static String explain​(Hop hop)

    - #### explain

          public static String explain​(Hop hop,
                                       int level)

    - #### explainLineageItems

          public static String explainLineageItems​(LineageItem[] lis)

    - #### explainLineageItems

          public static String explainLineageItems​(LineageItem[] lis,
                                                   int level)

    - #### explain

          public static String explain​(LineageItem li)

    - #### explainCPlan

          public static String explainCPlan​(CNodeTpl cplan)

    - #### explain

          public static String explain​(CNode node)

    - #### explain

          public static String explain​(CNode node,
                                       int level)

    - #### countDistributedOperations

          public static Explain.ExplainCounts countDistributedOperations​(Program rtprog)

      Counts the number of compiled MRJob/Spark instructions in the given runtime program.
      Parameters:
        `rtprog` - runtime program
      Returns:
        counts

    - #### getIdentation

          public static String getIdentation​(int level)

    - #### createOffset

          public static String createOffset​(int level)

    - #### explainFunctionCallGraph

          public static String explainFunctionCallGraph​(FunctionCallGraph fgraph,
                                                        HashSet<String> fstack,
                                                        String fkey,
                                                        int level)