Class DoubleSparseValue<U extends Unit<U>,S extends DoubleScalar<U,S>>

java.lang.Object
org.djunits.value.vdouble.matrix.base.DoubleSparseValue<U,S>
Type Parameters:
U - the unit type of the value
S - the scalar type of the value
All Implemented Interfaces:
Serializable

public class DoubleSparseValue<U extends Unit<U>,S extends DoubleScalar<U,S>> extends Object implements Serializable
Data point for a matrix that can be used for constructing sparse matrices.

Copyright (c) 2019-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.

Author:
Alexander Verbraeck
See Also:
  • Constructor Details

    • DoubleSparseValue

      public DoubleSparseValue(int row, int column, S value)
      Create a data point for a sparse matrix.
      Parameters:
      row - int; the row of the sparse data point in the matrix
      column - int; the column of the sparse data point in the matrix
      value - S; the value in the given unit of the data point in the matrix
    • DoubleSparseValue

      public DoubleSparseValue(int row, int column, double valueInUnit, U unit)
      Create a data point for a sparse matrix.
      Parameters:
      row - int; the row of the sparse data point in the matrix
      column - int; the column of the sparse data point in the matrix
      valueInUnit - double; the value in the given unit of the data point in the matrix
      unit - U; the unit of the value
    • DoubleSparseValue

      public DoubleSparseValue(int row, int column, double valueSI)
      Create a data point for a sparse matrix.
      Parameters:
      row - int; the row of the sparse data point in the matrix
      column - int; the column of the sparse data point in the matrix
      valueSI - double; the SI value of the data point in the matrix
  • Method Details

    • getRow

      public final int getRow()
      Returns:
      the row in the matrix
    • getColumn

      public final int getColumn()
      Returns:
      the column in the matrix
    • getValueSI

      public final double getValueSI()
      Returns:
      the SI value of the data point in the matrix
    • toString

      public String toString()
      Overrides:
      toString in class Object