org.apache.sysds.parser

## Class DMLProgram

- java.lang.Object
- - org.apache.sysds.parser.DMLProgram

-     public class DMLProgram
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_NAMESPACE`
    `static String` | `INTERNAL_NAMESPACE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DMLProgram()`
    `DMLProgram(String namespace)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFunctionStatementBlock(String fname, FunctionStatementBlock fsb)`
    `void` | `addFunctionStatementBlock(String namespace, String fname, FunctionStatementBlock fsb)`
    `void` | `addStatementBlock(StatementBlock b)`
    `static String` | `constructFunctionKey(String fnamespace, String fname)`
    `void` | `copyOriginalFunctions()`
    `FunctionDictionary<FunctionStatementBlock>` | `getDefaultFunctionDictionary()`
    `FunctionStatementBlock` | `getFunctionStatementBlock(String fkey)`
    `FunctionStatementBlock` | `getFunctionStatementBlock(String namespaceKey, String functionName)`
    `List<FunctionStatementBlock>` | `getFunctionStatementBlocks()`
    `Map<String,FunctionStatementBlock>` | `getFunctionStatementBlocks(String namespaceKey)`
    `Map<String,FunctionStatementBlock>` | `getNamedNSFunctionStatementBlocks()`
    `Map<String,FunctionDictionary<FunctionStatementBlock>>` | `getNamespaces()`
    `int` | `getNumStatementBlocks()`
    `StatementBlock` | `getStatementBlock(int i)`
    `ArrayList<StatementBlock>` | `getStatementBlocks()`
    `boolean` | `hasFunctionStatementBlocks()`
    `void` | `hoistFunctionCallsFromExpressions()`
    `void` | `mergeStatementBlocks()`
    `void` | `removeFunctionStatementBlock(String fkey)`
    `void` | `removeFunctionStatementBlock(String namespaceKey, String functionName)`
    `void` | `setStatementBlocks(ArrayList<StatementBlock> passed)`
    `static String[]` | `splitFunctionKey(String fkey)`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### DEFAULT_NAMESPACE

          public static final String DEFAULT_NAMESPACE

      See Also:
        Constant Field Values

    - #### INTERNAL_NAMESPACE

          public static final String INTERNAL_NAMESPACE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DMLProgram

          public DMLProgram()

    - #### DMLProgram

          public DMLProgram(String namespace)

  - ### Method Detail

    - #### getNamespaces

          public Map<String,FunctionDictionary<FunctionStatementBlock>> getNamespaces()

    - #### addStatementBlock

          public void addStatementBlock(StatementBlock b)

    - #### getNumStatementBlocks

          public int getNumStatementBlocks()

    - #### getFunctionStatementBlock

          public FunctionStatementBlock getFunctionStatementBlock(String fkey)

      Parameters:
        `fkey` - function key as concatenation of namespace and function name (see DMLProgram.constructFunctionKey)
      Returns:
        function statement block

    - #### removeFunctionStatementBlock

          public void removeFunctionStatementBlock(String fkey)

    - #### getFunctionStatementBlock

          public FunctionStatementBlock getFunctionStatementBlock(String namespaceKey,
                                                                  String functionName)

    - #### removeFunctionStatementBlock

          public void removeFunctionStatementBlock(String namespaceKey,
                                                   String functionName)

    - #### getFunctionStatementBlocks

          public Map<String,FunctionStatementBlock> getFunctionStatementBlocks(String namespaceKey)

    - #### hasFunctionStatementBlocks

          public boolean hasFunctionStatementBlocks()

    - #### getFunctionStatementBlocks

          public List<FunctionStatementBlock> getFunctionStatementBlocks()

    - #### getNamedNSFunctionStatementBlocks

          public Map<String,FunctionStatementBlock> getNamedNSFunctionStatementBlocks()

    - #### getDefaultFunctionDictionary

          public FunctionDictionary<FunctionStatementBlock> getDefaultFunctionDictionary()

    - #### addFunctionStatementBlock

          public void addFunctionStatementBlock(String fname,
                                                FunctionStatementBlock fsb)

    - #### addFunctionStatementBlock

          public void addFunctionStatementBlock(String namespace,
                                                String fname,
                                                FunctionStatementBlock fsb)

    - #### copyOriginalFunctions

          public void copyOriginalFunctions()

    - #### getStatementBlocks

          public ArrayList<StatementBlock> getStatementBlocks()

    - #### setStatementBlocks

          public void setStatementBlocks(ArrayList<StatementBlock> passed)

    - #### getStatementBlock

          public StatementBlock getStatementBlock(int i)

    - #### mergeStatementBlocks

          public void mergeStatementBlocks()

    - #### hoistFunctionCallsFromExpressions

          public void hoistFunctionCallsFromExpressions()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### constructFunctionKey

          public static String constructFunctionKey(String fnamespace,
                                                    String fname)

    - #### splitFunctionKey

          public static String[] splitFunctionKey(String fkey)

Copyright © 2020 The Apache Software Foundation. All rights reserved.