org.apache.sysds.runtime.matrix.data

## Class WeightedPair

- java.lang.Object
- - org.apache.sysds.runtime.matrix.data.MatrixValue
  - - org.apache.sysds.runtime.matrix.data.MatrixCell
    - - org.apache.sysds.runtime.matrix.data.WeightedCell
      - - org.apache.sysds.runtime.matrix.data.WeightedPair

- All Implemented Interfaces:
    Serializable, Comparable, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable

      public class WeightedPair
      extends WeightedCell

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.sysds.runtime.matrix.data.MatrixValue

      `MatrixValue.CellIndex`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeightedPair()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Object o)`
    `void` | `copy(MatrixValue that)` Copy that MatrixValue into this MatrixValue.
    `boolean` | `equals(Object o)`
    `double` | `getOtherValue()`
    `int` | `hashCode()`
    `void` | `readFields(DataInput in)`
    `void` | `setOtherValue(double ov)`
    `String` | `toString()`
    `void` | `write(DataOutput out)`

    - ### Methods inherited from class org.apache.sysds.runtime.matrix.data.WeightedCell

      `aggregateUnaryOperations, denseScalarOperationsInPlace, getValue, getWeight, reorgOperations, scalarOperations, setWeight, sparseScalarOperationsInPlace, sparseUnaryOperationsInPlace, unaryOperations`

    - ### Methods inherited from class org.apache.sysds.runtime.matrix.data.MatrixCell

      `aggregateUnaryOperations, append, binaryOperations, binaryOperationsInPlace, compareTo, copy, ctableOperations, ctableOperations, ctableOperations, ctableOperations, ctableOperations, getNonZeros, getNumColumns, getNumRows, getValue, incrementalAggregate, incrementalAggregate, isEmpty, isInSparseFormat, replaceOperations, reset, reset, reset, reset, reset, setValue, setValue, slice, zeroOutOperations`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### WeightedPair

          public WeightedPair()

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `WeightedCell`

    - #### readFields

          public void readFields(DataInput in)
                          throws IOException

      Specified by:
        `readFields` in interface `org.apache.hadoop.io.Writable`
      Overrides:
        `readFields` in class `WeightedCell`
      Throws:
        `IOException`

    - #### write

          public void write(DataOutput out)
                     throws IOException

      Specified by:
        `write` in interface `org.apache.hadoop.io.Writable`
      Overrides:
        `write` in class `WeightedCell`
      Throws:
        `IOException`

    - #### copy

          public void copy(MatrixValue that)

      Description copied from class: `MatrixValue`
      Copy that MatrixValue into this MatrixValue. If the MatrixValue is a MatrixBlock evaluate the sparsity of the original matrix, and copy into either a sparse or a dense matrix.
      Overrides:
        `copy` in class `WeightedCell`
      Parameters:
        `that` - object to copy the values into.

    - #### getOtherValue

          public double getOtherValue()

    - #### setOtherValue

          public void setOtherValue(double ov)

    - #### compareTo

          public int compareTo(Object o)

      Specified by:
        `compareTo` in interface `Comparable`
      Overrides:
        `compareTo` in class `WeightedCell`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `WeightedCell`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `WeightedCell`

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