Class MatrixTensor<N extends java.lang.Comparable<N>>

    • Field Detail

      • myArray

        private final Array2D<N extends java.lang.Comparable<N>> myArray
      • myFactory

        private final Array2D.Factory<N extends java.lang.Comparable<N>> myFactory
    • Constructor Detail

    • Method Detail

      • byteValue

        public byte byteValue​(int row,
                              int col)
        Specified by:
        byteValue in interface Access2D<N extends java.lang.Comparable<N>>
      • byteValue

        public byte byteValue​(long row,
                              long col)
        Specified by:
        byteValue in interface Access2D<N extends java.lang.Comparable<N>>
      • conjugate

        public MatrixTensor<N> conjugate()
        Description copied from interface: VectorSpace

        This method will (most likely) be moved to some other interface in the future! Just have to figure out where it fits...

        The conjugate transpose of a matrix and/or the conjugate of a scalar/field like ComplexNumber or Quaternion.

        The conjugate transpose of a real matrix is simply its transpose.

        Specified by:
        conjugate in interface VectorSpace<MatrixTensor<N extends java.lang.Comparable<N>>,​N extends java.lang.Comparable<N>>
      • countColumns

        public long countColumns()
        Description copied from interface: Structure2D
        Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.
        Specified by:
        countColumns in interface Structure2D
        Returns:
        The number of columns
      • countRows

        public long countRows()
        Description copied from interface: Structure2D
        Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.
        Specified by:
        countRows in interface Structure2D
        Returns:
        The number of rows
      • doubleValue

        public double doubleValue​(int row,
                                  int col)
        Description copied from interface: Access2D
        Extracts one element of this matrix as a double.
        Specified by:
        doubleValue in interface Access2D<N extends java.lang.Comparable<N>>
        Parameters:
        row - A row index.
        col - A column index.
        Returns:
        One matrix element
      • doubleValue

        public double doubleValue​(long row,
                                  long col)
        Specified by:
        doubleValue in interface Access2D<N extends java.lang.Comparable<N>>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class ArrayBasedTensor<N extends java.lang.Comparable<N>,​MatrixTensor<N extends java.lang.Comparable<N>>>
      • floatValue

        public float floatValue​(int row,
                                int col)
        Specified by:
        floatValue in interface Access2D<N extends java.lang.Comparable<N>>
      • floatValue

        public float floatValue​(long row,
                                long col)
        Specified by:
        floatValue in interface Access2D<N extends java.lang.Comparable<N>>
      • get

        public N get​(long row,
                     long col)
        Specified by:
        get in interface Access2D<N extends java.lang.Comparable<N>>
      • getColDim

        public int getColDim()
        Specified by:
        getColDim in interface Structure2D
        Returns:
        The number of columns
      • getRowDim

        public int getRowDim()
        Specified by:
        getRowDim in interface Structure2D
        Returns:
        The number of rows
      • intValue

        public int intValue​(int row,
                            int col)
        Specified by:
        intValue in interface Access2D<N extends java.lang.Comparable<N>>
      • intValue

        public int intValue​(long row,
                            long col)
        Specified by:
        intValue in interface Access2D<N extends java.lang.Comparable<N>>
      • longValue

        public long longValue​(int row,
                              int col)
        Specified by:
        longValue in interface Access2D<N extends java.lang.Comparable<N>>
      • longValue

        public long longValue​(long row,
                              long col)
        Specified by:
        longValue in interface Access2D<N extends java.lang.Comparable<N>>
      • norm

        public double norm()
        Description copied from interface: NormedVectorSpace
        this == this.signum().multiply(this.norm())
        Specified by:
        norm in interface NormedVectorSpace<MatrixTensor<N extends java.lang.Comparable<N>>,​N extends java.lang.Comparable<N>>
        Returns:
        The norm
      • set

        public void set​(int row,
                        int col,
                        byte value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(int row,
                        int col,
                        double value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(int row,
                        int col,
                        float value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(int row,
                        int col,
                        int value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(int row,
                        int col,
                        long value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(int row,
                        int col,
                        short value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(long row,
                        long col,
                        byte value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(long row,
                        long col,
                        java.lang.Comparable<?> value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(long row,
                        long col,
                        double value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(long row,
                        long col,
                        float value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(long row,
                        long col,
                        int value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(long row,
                        long col,
                        long value)
        Specified by:
        set in interface Mutate2D
      • set

        public void set​(long row,
                        long col,
                        short value)
        Specified by:
        set in interface Mutate2D
      • shortValue

        public short shortValue​(int row,
                                int col)
        Specified by:
        shortValue in interface Access2D<N extends java.lang.Comparable<N>>
      • shortValue

        public short shortValue​(long row,
                                long col)
        Specified by:
        shortValue in interface Access2D<N extends java.lang.Comparable<N>>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object