Package org.apache.sysds.api.jmlc

## Class ResultVariables

- java.lang.Object
- - org.apache.sysds.api.jmlc.ResultVariables

    public class ResultVariables
    extends Object

A ResultVariables object holds the data returned by a call to `PreparedScript`'s `executeScript` method, which executes a DML/PyDML script.

### Constructor Summary

Constructors
`ResultVariables()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `getBoolean​(String varname)` Obtain the boolean value represented by the given output variable.
`double` `getDouble​(String varname)` Obtain the double value represented by the given output variable.
`String[][]` `getFrame​(String varname)` Obtain the frame represented by the given output variable.
`FrameBlock` `getFrameBlock​(String varname)` Obtain the frame represented by the given output variable.
`long` `getLong​(String varname)` Obtain the long value represented by the given output variable.
`double[][]` `getMatrix​(String varname)` Obtain the matrix represented by the given output variable.
`MatrixBlock` `getMatrixBlock​(String varname)` Obtain the matrix represented by the given output variable.
`ScalarObject` `getScalarObject​(String varname)` Obtain the ScalarObject represented by the given output variable.
`String` `getString​(String varname)` Obtain the string value represented by the given output variable.
`Set<String>` `getVariableNames()` Obtain the output variable names held by this ResultVariables object.
`int` `size()` Obtain the number of output data held by this ResultVariables object.

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

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

### Constructor Detail

#### ResultVariables

    public ResultVariables()

### Method Detail

#### getVariableNames

    public Set<String> getVariableNames()

Obtain the output variable names held by this ResultVariables object.

Returns:
  the set of output variable names

#### size

    public int size()

Obtain the number of output data held by this ResultVariables object.

Returns:
  the number of output variables with data

#### getMatrix

    public double[][] getMatrix​(String varname)

Obtain the matrix represented by the given output variable.

Parameters:
  `varname` - output variable name
Returns:
  matrix as a two-dimensional double array

#### getMatrixBlock

    public MatrixBlock getMatrixBlock​(String varname)

Obtain the matrix represented by the given output variable. Calling this method avoids unnecessary output conversions.

Parameters:
  `varname` - output variable name
Returns:
  matrix as matrix block

#### getFrame

    public String[][] getFrame​(String varname)

Obtain the frame represented by the given output variable.

Parameters:
  `varname` - output variable name
Returns:
  frame as a two-dimensional string array

#### getFrameBlock

    public FrameBlock getFrameBlock​(String varname)

Obtain the frame represented by the given output variable. Calling this method avoids unnecessary output conversions.

Parameters:
  `varname` - output variable name
Returns:
  frame as a frame block

#### getDouble

    public double getDouble​(String varname)

Obtain the double value represented by the given output variable.

Parameters:
  `varname` - output variable name
Returns:
  double value

#### getBoolean

    public boolean getBoolean​(String varname)

Obtain the boolean value represented by the given output variable.

Parameters:
  `varname` - output variable name
Returns:
  boolean value

#### getLong

    public long getLong​(String varname)

Obtain the long value represented by the given output variable.

Parameters:
  `varname` - output variable name
Returns:
  long value

#### getString

    public String getString​(String varname)

Obtain the string value represented by the given output variable.

Parameters:
  `varname` - output variable name
Returns:
  string value

#### getScalarObject

    public ScalarObject getScalarObject​(String varname)

Obtain the ScalarObject represented by the given output variable.

Parameters:
  `varname` - output variable name
Returns:
  ScalarObject