org.apache.sysds.lops.compile

## Class Dag<N extends Lop>

- java.lang.Object
- - org.apache.sysds.lops.compile.Dag<N>

- Type Parameters:
    `N` - the class parameter has no affect and is only kept for documentation purposes.

      public class Dag<N extends Lop>
      extends Object

  Class to maintain a DAG of lops and compile it into runtime instructions, incl piggybacking into jobs.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Dag()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addNode(Lop node)` Method to add a node to the DAG.
    `ArrayList<Instruction>` | `getJobs(StatementBlock sb, DMLConfig config)` Method to compile a dag generically
    `String` | `getNextUniqueFilename()`
    `static String` | `getNextUniqueFilenameSuffix()`
    `static String` | `getNextUniqueVarname(Types.DataType dt)`

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

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

- - ### Constructor Detail

    - #### Dag

          public Dag()

  - ### Method Detail

    - #### getNextUniqueFilenameSuffix

          public static String getNextUniqueFilenameSuffix()

    - #### getNextUniqueFilename

          public String getNextUniqueFilename()

    - #### getNextUniqueVarname

          public static String getNextUniqueVarname(Types.DataType dt)

    - #### addNode

          public boolean addNode(Lop node)

      Method to add a node to the DAG.
      Parameters:
        `node` - low-level operator
      Returns:
        true if node was not already present, false if not.

    - #### getJobs

          public ArrayList<Instruction> getJobs(StatementBlock sb,
                                                DMLConfig config)

      Method to compile a dag generically
      Parameters:
        `sb` - statement block
        `config` - dml configuration
      Returns:
        list of instructions

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