Class DefaultDenseShortMatrix2D

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, HasShortArray, 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, DenseShortMatrix, DenseShortMatrix2D, ShortMatrix, ShortMatrix2D, SparseMatrix, SparseMatrix2D, SparseMatrixMultiD, StringCalculations

public class DefaultDenseShortMatrix2D extends AbstractDenseShortMatrix2D implements HasShortArray
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • values

      private final short[] values
    • rows

      private final int rows
    • cols

      private final int cols
  • Constructor Details

    • DefaultDenseShortMatrix2D

      public DefaultDenseShortMatrix2D(int rows, int columns)
  • Method Details

    • getShort

      public short getShort(long row, long column)
      Specified by:
      getShort in interface ShortMatrix2D
    • setShort

      public void setShort(short value, long row, long column)
      Specified by:
      setShort in interface ShortMatrix2D
    • getShort

      public short getShort(int row, int column)
    • setShort

      public void setShort(short value, int row, int column)
    • plus

      public final Matrix plus(double v)
      Description copied from interface: BasicDoubleCalculations
      Adds a specified value to all entries in the matrix.
      Specified by:
      plus in interface BasicDoubleCalculations
      Overrides:
      plus in class AbstractMatrix
      Parameters:
      v - the value to add
      Returns:
      Matrix with the entries plus the value
    • minus

      public final Matrix minus(double v)
      Description copied from interface: BasicDoubleCalculations
      Subtracts a specified value from all entries in the matrix.
      Specified by:
      minus in interface BasicDoubleCalculations
      Overrides:
      minus in class AbstractMatrix
      Parameters:
      v - the value to subtract
      Returns:
      Matrix with the entries minus the value
    • times

      public final Matrix times(double v)
      Description copied from interface: BasicDoubleCalculations
      Multiplies every entry in the matrix with a scalar.
      Specified by:
      times in interface BasicDoubleCalculations
      Overrides:
      times in class AbstractMatrix
      Parameters:
      v - factor to multiply with
      Returns:
      Matrix with all entries multiplied by a factor.
    • divide

      public final Matrix divide(double v)
      Description copied from interface: BasicDoubleCalculations
      Divides every entry in the matrix by a scalar.
      Specified by:
      divide in interface BasicDoubleCalculations
      Overrides:
      divide in class AbstractMatrix
      Parameters:
      v - factor by which to divide
      Returns:
      Matrix with all entries divided by a factor.
    • copy

      public final Matrix copy()
    • transpose

      public final Matrix transpose()
      Description copied from interface: ObjectCalculations
      Returns the transpose of the Matrix, where rows and columns are exchanged. This works also if the Matrix has more than two dimensions.
      Specified by:
      transpose in interface ObjectCalculations
      Overrides:
      transpose in class AbstractMatrix
      Returns:
      transposed Matrix.
    • getShortArray

      public short[] getShortArray()
      Specified by:
      getShortArray in interface HasShortArray