Class DefaultSparseShortMatrix

All Implemented Interfaces:
Serializable, Cloneable, Comparable<Matrix>, HasMetaData, BaseMatrix, BooleanCalculations, CanPerformCalculations, DenseMatrix, DenseMatrix2D, DenseMatrixMultiD, BasicDoubleCalculations, DoubleCalculations, BasicEntrywiseDoubleCalculations, CreatorDoubleCalculations, EntrywiseDoubleCalculations, HyperbolicDoubleCalculations, MiscEntrywiseDoubleCalculations, RoundingDoubleCalculations, TrigonometricDoubleCalculations, DecompositionDoubleCalculations, DiscretizeCalculations, GeneralDoubleCalculations, MiscGeneralDoubleCalculations, MissingValueDoubleCalculations, StatisticalDoubleCalculations, BaseGenericMatrix<Short>, DenseGenericMatrix<Short>, DenseGenericMatrix2D<Short>, DenseGenericMatrixMultiD<Short>, GenericMatrix<Short>, GenericMatrix2D<Short>, GenericMatrixMultiD<Short>, SparseGenericMatrix<Short>, SparseGenericMatrix2D<Short>, SparseGenericMatrixMultiD<Short>, BaseMatrixProperties, Clearable, Conversions, CoordinateFunctions, CoreObject, DistanceMeasures, ExtendedMatrixProperties, GettersAndSetters, HasDescription, HasGUIObject, HasId, HasLabel, IntCalculations, Matrix, Matrix2D, MatrixMultiD, BaseNumberMatrix<Short>, DenseNumberMatrix<Short>, DenseNumberMatrix2D<Short>, DenseNumberMatrixMultiD<Short>, NumberMatrix<Short>, NumberMatrix2D<Short>, NumberMatrixMultiD<Short>, SparseNumberMatrix<Short>, SparseNumberMatrix2D<Short>, SparseNumberMatrixMultiD<Short>, ObjectCalculations, ShortMatrix, SparseMatrix, SparseMatrix2D, SparseMatrixMultiD, StringCalculations

public class DefaultSparseShortMatrix extends DefaultSparseGenericMatrix<Short> implements ShortMatrix
See Also:
  • Field Details

  • Constructor Details

    • DefaultSparseShortMatrix

      public DefaultSparseShortMatrix(Matrix m)
    • DefaultSparseShortMatrix

      public DefaultSparseShortMatrix(Matrix m, int maximumNumberOfEntries)
    • DefaultSparseShortMatrix

      public DefaultSparseShortMatrix(long... size)
  • Method Details

    • getValueType

      public final ValueType getValueType()
      Specified by:
      getValueType in interface BaseMatrixProperties
      Overrides:
      getValueType in class DefaultSparseGenericMatrix<Short>
    • getShort

      public short getShort(long... coordinates)
      Description copied from interface: ShortMatrix
      Returns a short representation of an entry in the matrix. The stored value will be converted to a short as good as possible.
      Specified by:
      getShort in interface ShortMatrix
      Parameters:
      coordinates - location of the entry
      Returns:
      a short representation of the entry @
    • setShort

      public void setShort(short value, long... coordinates)
      Description copied from interface: ShortMatrix
      Sets an entry in the matrix to a short value. If the matrix cannot store short values, the value will be represented as good as possible.
      Specified by:
      setShort in interface ShortMatrix
      Parameters:
      value - short value
      coordinates - location of the entry @
    • getNumber

      public Short getNumber(long... coordinates)
      Description copied from interface: NumberMatrixMultiD
      Returns a Number representation of an entry in the matrix. The stored value will be converted to a Number as good as possible.
      Specified by:
      getNumber in interface NumberMatrixMultiD<Short>
      Parameters:
      coordinates - location of the entry
      Returns:
      a Number representation of the entry @
    • setNumber

      public void setNumber(Short value, long... coordinates)
      Description copied from interface: NumberMatrixMultiD
      Sets an entry in the matrix to a Number value. If the matrix cannot store Number values, the value will be represented as good as possible.
      Specified by:
      setNumber in interface NumberMatrixMultiD<Short>
      Parameters:
      value - Number value
      coordinates - location of the entry @