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

    • Field Detail

      • myColDim

        private final int myColDim
      • myComponentType

        private transient java.lang.Class<?> myComponentType
      • myRowDim

        private final int myRowDim
    • Constructor Detail

      • AbstractStore

        private AbstractStore()
      • AbstractStore

        protected AbstractStore​(int numberOfRows,
                                int numberOfColumns)
      • AbstractStore

        protected AbstractStore​(long numberOfRows,
                                long numberOfColumns)
    • Method Detail

      • buildColumn

        @SafeVarargs
        static <N extends java.lang.Comparable<N>> MatrixStore<N> buildColumn​(PhysicalStore.Factory<N,​?> factory,
                                                                              long rowsCount,
                                                                              N... columnElements)
      • buildRow

        @SafeVarargs
        static <N extends java.lang.Comparable<N>> MatrixStore<N> buildRow​(PhysicalStore.Factory<N,​?> factory,
                                                                           long colsCount,
                                                                           N... rowElements)
      • 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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getColDim

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

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • limitOfColumn

        public int limitOfColumn​(int col)
        Description copied from interface: Structure2D
        The default value is simply this.countRows(), and if all elements are zeros then 0.
        Specified by:
        limitOfColumn in interface Structure2D
        Returns:
        The row index of the first zero element, after all non-zeros, in the specified column (index of the last non-zero + 1)
      • limitOfRow

        public int limitOfRow​(int row)
        Description copied from interface: Structure2D
        The default value is simply this.countColumns(), and if all elements are zeros then 0.
        Specified by:
        limitOfRow in interface Structure2D
        Returns:
        The column index of the first zero element, after all non-zeros, in the specified row (index of the last non-zero + 1)
      • multiplyBoth

        public N multiplyBoth​(Access1D<N> leftAndRight)
        Description copied from interface: MatrixStore
        Assumes [leftAndRight] is a vector and will calulate [leftAndRight]H[this][leftAndRight]
        Specified by:
        multiplyBoth in interface MatrixStore<N extends java.lang.Comparable<N>>
        Parameters:
        leftAndRight - The argument vector
        Returns:
        A scalar (extracted from the resulting 1 x 1 matrix)
      • toString

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

        protected final boolean isPrimitive()
      • getComponentType

        final java.lang.Class<?> getComponentType()