org.apache.sysds.runtime.matrix.data

## Class OperationsOnMatrixValues

- java.lang.Object
- - org.apache.sysds.runtime.matrix.data.OperationsOnMatrixValues

-     public class OperationsOnMatrixValues
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OperationsOnMatrixValues()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `incrementalAggregation(MatrixValue valueAgg, MatrixValue correction, MatrixValue valueAdd, AggregateOperator op, boolean embeddedCorrection)`
    `static void` | `incrementalAggregation(MatrixValue valueAgg, MatrixValue correction, MatrixValue valueAdd, AggregateOperator op, boolean embeddedCorrection, boolean deep)`
    `static MatrixBlock` | `matMult(MatrixBlock value1, MatrixBlock value2, AggregateBinaryOperator op)`
    `static MatrixBlock` | `matMult(MatrixBlock value1, MatrixBlock value2, MatrixBlock valueOut, AggregateBinaryOperator op)`
    `static MatrixBlock` | `matMult(MatrixIndexes indexes1, MatrixBlock value1, MatrixIndexes indexes2, MatrixBlock value2, MatrixIndexes indexesOut, MatrixBlock valueOut, AggregateBinaryOperator op)`
    `static void` | `performAggregateUnary(MatrixIndexes indexesIn, MatrixValue valueIn, MatrixIndexes indexesOut, MatrixValue valueOut, AggregateUnaryOperator op, int blen)`
    `static void` | `performAppend(MatrixValue valueIn1, MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol)`
    `static void` | `performBinaryIgnoreIndexes(MatrixValue value1, MatrixValue value2, MatrixValue valueOut, BinaryOperator op)`
    `static void` | `performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, boolean left, int blen, CTableMap resultMap, MatrixBlock resultBlock, Operator op)`
    `static void` | `performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, double scalarIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op)`
    `static void` | `performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, MatrixIndexes indexesIn3, MatrixValue valueIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op)`
    `static void` | `performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, MatrixIndexes indexesIn2, MatrixValue valueIn2, double scalarIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op)`
    `static void` | `performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, MatrixIndexes indexesIn2, MatrixValue valueIn2, MatrixIndexes indexesIn3, MatrixValue valueIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op)`
    `static void` | `performMapGroupedAggregate(Operator op, IndexedMatrixValue inTarget, MatrixBlock groups, int ngroups, int blen, ArrayList<IndexedMatrixValue> outlist)`
    `static void` | `performReorg(MatrixIndexes indexesIn, MatrixValue valueIn, MatrixIndexes indexesOut, MatrixValue valueOut, ReorgOperator op, int startRow, int startColumn, int length)`
    `static void` | `performShift(IndexedMatrixValue in, IndexRange ixrange, int blen, long rlen, long clen, ArrayList<IndexedMatrixValue> outlist)`
    `static void` | `performShift(Pair<Long,FrameBlock> in, IndexRange ixrange, int blenLeft, long rlen, long clen, ArrayList<Pair<Long,FrameBlock>> outlist)`
    `static ArrayList<IndexedMatrixValue>` | `performSlice(IndexedMatrixValue in, IndexRange ixrange, int blen)`
    `static List` | `performSlice(IndexRange ixrange, int blen, int iix, int jix, CacheBlock in)` Slice used in broadcasting matrix blocks for spark, since this slice up a given matrix into blocks.
    `static ArrayList` | `performSlice(IndexRange ixrange, int blen, int iix, int jix, FrameBlock in)`
    `static List` | `performSlice(IndexRange ixrange, int blen, int iix, int jix, MatrixBlock in)`
    `static ArrayList<Pair<Long,FrameBlock>>` | `performSlice(Pair<Long,FrameBlock> in, IndexRange ixrange, int blen)` This function will get slice of the input frame block overlapping in overall slice(Range), slice has requested for.
    `static void` | `performZeroOut(MatrixIndexes indexesIn, MatrixValue valueIn, MatrixIndexes indexesOut, MatrixValue valueOut, IndexRange range, boolean complementary)`
    `static void` | `startAggregation(MatrixValue valueOut, MatrixValue correction, AggregateOperator op, int rlen, int clen, boolean sparseHint, boolean embeddedCorrection)`

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

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

- - ### Constructor Detail

    - #### OperationsOnMatrixValues

          public OperationsOnMatrixValues()

  - ### Method Detail

    - #### performReorg

          public static void performReorg(MatrixIndexes indexesIn,
                                          MatrixValue valueIn,
                                          MatrixIndexes indexesOut,
                                          MatrixValue valueOut,
                                          ReorgOperator op,
                                          int startRow,
                                          int startColumn,
                                          int length)

    - #### performAppend

          public static void performAppend(MatrixValue valueIn1,
                                           MatrixValue valueIn2,
                                           ArrayList<IndexedMatrixValue> outlist,
                                           int blen,
                                           boolean cbind,
                                           boolean m2IsLast,
                                           int nextNCol)

    - #### performZeroOut

          public static void performZeroOut(MatrixIndexes indexesIn,
                                            MatrixValue valueIn,
                                            MatrixIndexes indexesOut,
                                            MatrixValue valueOut,
                                            IndexRange range,
                                            boolean complementary)

    - #### performCtable

          public static void performCtable(MatrixIndexes indexesIn1,
                                           MatrixValue valueIn1,
                                           MatrixIndexes indexesIn2,
                                           MatrixValue valueIn2,
                                           MatrixIndexes indexesIn3,
                                           MatrixValue valueIn3,
                                           CTableMap resultMap,
                                           MatrixBlock resultBlock,
                                           Operator op)

    - #### performCtable

          public static void performCtable(MatrixIndexes indexesIn1,
                                           MatrixValue valueIn1,
                                           MatrixIndexes indexesIn2,
                                           MatrixValue valueIn2,
                                           double scalarIn3,
                                           CTableMap resultMap,
                                           MatrixBlock resultBlock,
                                           Operator op)

    - #### performCtable

          public static void performCtable(MatrixIndexes indexesIn1,
                                           MatrixValue valueIn1,
                                           double scalarIn2,
                                           double scalarIn3,
                                           CTableMap resultMap,
                                           MatrixBlock resultBlock,
                                           Operator op)

    - #### performCtable

          public static void performCtable(MatrixIndexes indexesIn1,
                                           MatrixValue valueIn1,
                                           double scalarIn2,
                                           boolean left,
                                           int blen,
                                           CTableMap resultMap,
                                           MatrixBlock resultBlock,
                                           Operator op)

    - #### performCtable

          public static void performCtable(MatrixIndexes indexesIn1,
                                           MatrixValue valueIn1,
                                           double scalarIn2,
                                           MatrixIndexes indexesIn3,
                                           MatrixValue valueIn3,
                                           CTableMap resultMap,
                                           MatrixBlock resultBlock,
                                           Operator op)

    - #### performBinaryIgnoreIndexes

          public static void performBinaryIgnoreIndexes(MatrixValue value1,
                                                        MatrixValue value2,
                                                        MatrixValue valueOut,
                                                        BinaryOperator op)

    - #### startAggregation

          public static void startAggregation(MatrixValue valueOut,
                                              MatrixValue correction,
                                              AggregateOperator op,
                                              int rlen,
                                              int clen,
                                              boolean sparseHint,
                                              boolean embeddedCorrection)

    - #### incrementalAggregation

          public static void incrementalAggregation(MatrixValue valueAgg,
                                                    MatrixValue correction,
                                                    MatrixValue valueAdd,
                                                    AggregateOperator op,
                                                    boolean embeddedCorrection)

    - #### incrementalAggregation

          public static void incrementalAggregation(MatrixValue valueAgg,
                                                    MatrixValue correction,
                                                    MatrixValue valueAdd,
                                                    AggregateOperator op,
                                                    boolean embeddedCorrection,
                                                    boolean deep)

    - #### performAggregateUnary

          public static void performAggregateUnary(MatrixIndexes indexesIn,
                                                   MatrixValue valueIn,
                                                   MatrixIndexes indexesOut,
                                                   MatrixValue valueOut,
                                                   AggregateUnaryOperator op,
                                                   int blen)

    - #### matMult

          public static MatrixBlock matMult(MatrixIndexes indexes1,
                                            MatrixBlock value1,
                                            MatrixIndexes indexes2,
                                            MatrixBlock value2,
                                            MatrixIndexes indexesOut,
                                            MatrixBlock valueOut,
                                            AggregateBinaryOperator op)

    - #### matMult

          public static MatrixBlock matMult(MatrixBlock value1,
                                            MatrixBlock value2,
                                            AggregateBinaryOperator op)

    - #### matMult

          public static MatrixBlock matMult(MatrixBlock value1,
                                            MatrixBlock value2,
                                            MatrixBlock valueOut,
                                            AggregateBinaryOperator op)

    - #### performSlice

          public static List performSlice(IndexRange ixrange,
                                          int blen,
                                          int iix,
                                          int jix,
                                          CacheBlock in)

      Slice used in broadcasting matrix blocks for spark, since this slice up a given matrix into blocks. The slice call here returns a single block inside the idx range specified
      Parameters:
        `ixrange` - Index range containing the row lower, row upper, col lower and col upper bounds
        `blen` - The block size specified, this should align with the ranges.
        `iix` - The block row index
        `jix` - The block column index
        `in` - The Cache block to slice out
      Returns:
        A List containing pairs of MatrixIndices and CacheBlocks either containing MatrixBlock or FrameBlocks

    - #### performSlice

          public static List performSlice(IndexRange ixrange,
                                          int blen,
                                          int iix,
                                          int jix,
                                          MatrixBlock in)

    - #### performSlice

          public static ArrayList<IndexedMatrixValue> performSlice(IndexedMatrixValue in,
                                                                   IndexRange ixrange,
                                                                   int blen)

    - #### performShift

          public static void performShift(IndexedMatrixValue in,
                                          IndexRange ixrange,
                                          int blen,
                                          long rlen,
                                          long clen,
                                          ArrayList<IndexedMatrixValue> outlist)

    - #### performMapGroupedAggregate

          public static void performMapGroupedAggregate(Operator op,
                                                        IndexedMatrixValue inTarget,
                                                        MatrixBlock groups,
                                                        int ngroups,
                                                        int blen,
                                                        ArrayList<IndexedMatrixValue> outlist)

    - #### performSlice

          public static ArrayList performSlice(IndexRange ixrange,
                                               int blen,
                                               int iix,
                                               int jix,
                                               FrameBlock in)

    - #### performSlice

          public static ArrayList<Pair<Long,FrameBlock>> performSlice(Pair<Long,FrameBlock> in,
                                                                      IndexRange ixrange,
                                                                      int blen)

      This function will get slice of the input frame block overlapping in overall slice(Range), slice has requested for.
      Parameters:
        `in` - A Pair of row index to assign the sliced block and input frame block to slice.
        `ixrange` - index range
        `blen` - block length
      Returns:
        Returns an ArrayList containing pairs of long ids and FrameBlocks

    - #### performShift

          public static void performShift(Pair<Long,FrameBlock> in,
                                          IndexRange ixrange,
                                          int blenLeft,
                                          long rlen,
                                          long clen,
                                          ArrayList<Pair<Long,FrameBlock>> outlist)

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