Package org.apache.sysds.runtime.instructions.cp

## Class DataGenCPInstruction

- java.lang.Object
- - org.apache.sysds.runtime.instructions.Instruction
  - - org.apache.sysds.runtime.instructions.cp.CPInstruction
    - - org.apache.sysds.runtime.instructions.cp.ComputationCPInstruction
      - - org.apache.sysds.runtime.instructions.cp.UnaryCPInstruction
        - - org.apache.sysds.runtime.instructions.cp.DataGenCPInstruction

- All Implemented Interfaces:
    `LineageTraceable`

      public class DataGenCPInstruction
      extends UnaryCPInstruction

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.sysds.runtime.instructions.cp.CPInstruction

      `CPInstruction.CPType`

    - ### Nested classes/interfaces inherited from class org.apache.sysds.runtime.instructions.Instruction

      `Instruction.IType`

  - ### Field Summary

    - ### Fields inherited from class org.apache.sysds.runtime.instructions.cp.ComputationCPInstruction

      `input1, input2, input3, output`

    - ### Fields inherited from class org.apache.sysds.runtime.instructions.Instruction

      `DATATYPE_PREFIX, FEDERATED_INST_PREFIX, GPU_INST_PREFIX, INSTRUCTION_DELIM, LITERAL_PREFIX, OPERAND_DELIM, SP_INST_PREFIX, VALUETYPE_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DataGenCPInstruction​(Operator op, Types.OpOpDG method, CPOperand out, CPOperand rows, CPOperand cols, String data, String schema, String opcode, String str)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getBlocksize()` |
    `long` | `getCols()` |
    `String` | `getDims()` |
    `long` | `getFrom()` |
    `long` | `getIncr()` |
    `org.apache.commons.lang3.tuple.Pair<String,​LineageItem>` | `getLineageItem​(ExecutionContext ec)` | Obtain lineage trace of an instruction with a single output.
    `double` | `getMaxValue()` |
    `double` | `getMinValue()` |
    `String` | `getPdf()` |
    `String` | `getPdfParams()` |
    `long` | `getRows()` |
    `long` | `getSeed()` |
    `double` | `getSparsity()` |
    `long` | `getTo()` |
    `boolean` | `isMatrixCall()` |
    `boolean` | `isOnesCol()` |
    `static DataGenCPInstruction` | `parseInstruction​(String str)` |
    `void` | `processInstruction​(ExecutionContext ec)` | This method should be used to execute the instruction.

    - ### Methods inherited from class org.apache.sysds.runtime.instructions.cp.ComputationCPInstruction

      `getInputs, getOutput, getOutputVariableName`

    - ### Methods inherited from class org.apache.sysds.runtime.instructions.cp.CPInstruction

      `getCPInstructionType, getGraphString, getType, postprocessInstruction, preprocessInstruction, requiresLabelUpdate, updateLabels`

    - ### Methods inherited from class org.apache.sysds.runtime.instructions.Instruction

      `getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExtendedOpcode, getFilename, getInstID, getInstructionString, getLineNum, getOpcode, getOperator, getPrivacyConstraint, printMe, setInstID, setLocation, setLocation, setLocation, setLocation, setPrivacyConstraint, setPrivacyConstraint, toString, updateInstructionThreadID`

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

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

    - ### Methods inherited from interface org.apache.sysds.runtime.lineage.LineageTraceable

      `getLineageItems, hasSingleLineage`

- - ### Constructor Detail

    - #### DataGenCPInstruction

          public DataGenCPInstruction​(Operator op,
                                      Types.OpOpDG method,
                                      CPOperand out,
                                      CPOperand rows,
                                      CPOperand cols,
                                      String data,
                                      String schema,
                                      String opcode,
                                      String str)

  - ### Method Detail

    - #### getRows

          public long getRows()

    - #### getCols

          public long getCols()

    - #### getDims

          public String getDims()

    - #### getBlocksize

          public int getBlocksize()

    - #### getMinValue

          public double getMinValue()

    - #### getMaxValue

          public double getMaxValue()

    - #### getSparsity

          public double getSparsity()

    - #### getPdf

          public String getPdf()

    - #### getPdfParams

          public String getPdfParams()

    - #### getSeed

          public long getSeed()

    - #### isOnesCol

          public boolean isOnesCol()

    - #### isMatrixCall

          public boolean isMatrixCall()

    - #### getFrom

          public long getFrom()

    - #### getTo

          public long getTo()

    - #### getIncr

          public long getIncr()

    - #### parseInstruction

          public static DataGenCPInstruction parseInstruction​(String str)

    - #### processInstruction

          public void processInstruction​(ExecutionContext ec)

      Description copied from class: `Instruction`
      This method should be used to execute the instruction.
      Specified by:
        `processInstruction` in class `CPInstruction`
      Parameters:
        `ec` - execution context

    - #### getLineageItem

          public org.apache.commons.lang3.tuple.Pair<String,​LineageItem> getLineageItem​(ExecutionContext ec)

      Description copied from interface: `LineageTraceable`
      Obtain lineage trace of an instruction with a single output.
      Specified by:
        `getLineageItem` in interface `LineageTraceable`
      Overrides:
        `getLineageItem` in class `ComputationCPInstruction`
      Parameters:
        `ec` - execution context w/ live variables
      Returns:
        pair of (output variable name, output lineage item)