Interface Structure2D

All Superinterfaces:
Structure1D
All Known Subinterfaces:
Access2D<N>, Access2D.Aggregatable<N>, Access2D.Collectable<N,R>, Access2D.Sliceable<N>, Access2D.Visitable<N>, Bidiagonal<N>, Cholesky<N>, DecompositionStore<N>, Eigenvalue<N>, Eigenvalue.Generalised<N>, ElementsSupplier<N>, Factory2D.Builder<I>, Hessenberg<N>, InvertibleFactor<N>, LDL<N>, LDU<N>, LU<N>, Matrix2D<N,M>, MatrixDecomposition<N>, MatrixDecomposition.Determinant<N>, MatrixDecomposition.EconomySize<N>, MatrixDecomposition.Hermitian<N>, MatrixDecomposition.Ordered<N>, MatrixDecomposition.Pivoting<N>, MatrixDecomposition.RankRevealing<N>, MatrixDecomposition.Solver<N>, MatrixDecomposition.Values<N>, MatrixStore<N>, Mutate2D, Mutate2D.Exchangeable, Mutate2D.Fillable<N>, Mutate2D.Mixable<N>, Mutate2D.Modifiable<N>, Mutate2D.ModifiableReceiver<N>, Mutate2D.Receiver<N>, Operate2D<N,P>, PhysicalStore<N>, QR<N>, SingularValue<N>, Structure2D.Logical<S,B>, Structure2D.ReducibleTo1D<R>, Structure2D.Reshapable, TransformableRegion<N>, Tridiagonal<N>
All Known Implementing Classes:
AboveBelowStore, AbstractDecomposition, AbstractStore, Access2D.SelectionView, AccessAnyD.MatrixView, Array2D, BasicMatrix, BidiagonalDecomposition, BidiagonalDecomposition.C128, BidiagonalDecomposition.H256, BidiagonalDecomposition.Q128, BidiagonalDecomposition.R064, BidiagonalDecomposition.R128, CholeskyDecomposition, CholeskyDecomposition.C128, CholeskyDecomposition.H256, CholeskyDecomposition.Q128, CholeskyDecomposition.R064, CholeskyDecomposition.R128, ColumnsStore, ColumnsSupplier, ColumnsSupplier.SingleView, ComplexNumber, ComposingStore, ConjugatedStore, DataBatch, DeferredTridiagonal, DeferredTridiagonal.C128, DeferredTridiagonal.H256, DeferredTridiagonal.Q128, DeferredTridiagonal.R064, DeferredTridiagonal.R128, DenseMutator2D, DenseTableau, DiagonalStore, DynamicEvD, DynamicEvD.R064, EigenvalueDecomposition, FactoryStore, GeneralEvD, GeneralEvD.R064, GeneralisedEvD, GenericDecomposition, GenericStore, HermitianEvD, HermitianEvD.C128, HermitianEvD.H256, HermitianEvD.Q128, HermitianEvD.R064, HermitianEvD.R128, HessenbergDecomposition, HessenbergDecomposition.C128, HessenbergDecomposition.H256, HessenbergDecomposition.Q128, HessenbergDecomposition.R064, HessenbergDecomposition.R128, IdentityStore, ImageData, ImageData.SingleChannel, InPlaceDecomposition, InvertibleFactor.IdentityFactor, IterativeASS.SchurComplementSolver, LDLDecomposition, LDLDecomposition.C128, LDLDecomposition.H256, LDLDecomposition.Q128, LDLDecomposition.R064, LDLDecomposition.R128, LeftRightStore, LimitStore, LogicalStore, LowerHessenbergStore, LowerSymmetricStore, LowerTriangularStore, LUDecomposition, LUDecomposition.C128, LUDecomposition.H256, LUDecomposition.Q128, LUDecomposition.R064, LUDecomposition.R128, MatrixC128, MatrixC128.DenseReceiver, MatrixC128.SparseReceiver, MatrixH256, MatrixH256.DenseReceiver, MatrixH256.SparseReceiver, MatrixPipeline, MatrixPipeline.BinaryOperatorLeft, MatrixPipeline.BinaryOperatorRight, MatrixPipeline.ColumnsModifier, MatrixPipeline.ColumnsReducer, MatrixPipeline.Multiplication, MatrixPipeline.RowsModifier, MatrixPipeline.RowsReducer, MatrixPipeline.Transformer, MatrixPipeline.Transpose, MatrixPipeline.UnaryOperator, MatrixQ128, MatrixQ128.DenseReceiver, MatrixQ128.SparseReceiver, MatrixR032, MatrixR032.DenseReceiver, MatrixR032.SparseReceiver, MatrixR064, MatrixR064.DenseReceiver, MatrixR064.SparseReceiver, MatrixR128, MatrixR128.DenseReceiver, MatrixR128.SparseReceiver, MatrixTensor, OffsetStore, Primitive2D, Primitive2D.Simple, Primitive2D.Wrapper, ProductFormInverse, ProductFormInverse.ElementaryFactor, QRDecomposition, QRDecomposition.C128, QRDecomposition.H256, QRDecomposition.Q128, QRDecomposition.R064, QRDecomposition.R128, Quaternion, R032Store, R064Store, RawCholesky, RawDecomposition, RawEigenvalue, RawEigenvalue.Dynamic, RawEigenvalue.General, RawEigenvalue.Symmetric, RawLU, RawQR, RawSingularValue, RawStore, RepeatedColumnsStore, RepeatedRowsStore, RowsStore, RowsSupplier, RowsSupplier.SingleView, SelectingStore, ShadingStore, SimplexTableau, SimultaneousTridiagonal, SingleStore, SingularValueDecomposition, SingularValueDecomposition.C128, SingularValueDecomposition.H256, SingularValueDecomposition.Q128, SingularValueDecomposition.R064, SingularValueDecomposition.R128, SparseMutator2D, SparseStore, SparseStore.Builder, SparseTableau, Subregion2D, Subregion2D.ColumnsRegion, Subregion2D.LimitRegion, Subregion2D.OffsetRegion, Subregion2D.RowsRegion, Subregion2D.SynchronizedRegion, Subregion2D.TransposedRegion, Subregion2D.WrapperRegion, SuperimposedStore, TransjugatedStore, TransposedStore, TridiagonalDecomposition, UnaryOperatoStore, UpperHessenbergStore, UpperSymmetricStore, UpperTriangularStore, WrapperStore, ZeroStore

public interface Structure2D extends Structure1D
A (fixed size) 2-dimensional data structure.
  • Method Details

    • column

      static int column(int index, int structure)
    • column

      static int column(int index, int[] structure)
    • column

      static int column(long index, int structure)
    • column

      static long column(long index, long structure)
    • column

      static long column(long index, long[] structure)
    • count

      static long count(long numberOfRows, long numberOfColumnns)
    • firstInColumn

      static int firstInColumn(Structure1D structure, int col, int defaultAndMinimum)
    • firstInColumn

      static long firstInColumn(Structure1D structure, long col, long defaultAndMinimum)
    • firstInRow

      static int firstInRow(Structure1D structure, int row, int defaultAndMinimum)
    • firstInRow

      static long firstInRow(Structure1D structure, long row, long defaultAndMinimum)
    • index

      static long index(long structure, long row, long column)
    • limitOfColumn

      static int limitOfColumn(Structure1D structure, int col, int defaultAndMaximum)
    • limitOfColumn

      static long limitOfColumn(Structure1D structure, long col, long defaultAndMaximum)
    • limitOfRow

      static int limitOfRow(Structure1D structure, int row, int defaultAndMaximum)
    • limitOfRow

      static long limitOfRow(Structure1D structure, long row, long defaultAndMaximum)
    • mapperOf

      static <R, C> Structure2D.RowColumnMapper<R,C> mapperOf(Structure2D structure, Structure1D.IndexMapper<R> rowMappwer, Structure1D.IndexMapper<C> columnMappwer)
    • row

      static int row(int index, int structure)
    • row

      static int row(int index, int[] structure)
    • row

      static int row(long index, int structure)
    • row

      static long row(long index, long structure)
    • row

      static long row(long index, long[] structure)
    • count

      default long count()
      count() == countRows() * countColumns()
      Specified by:
      count in interface Structure1D
    • countColumns

      default long countColumns()
      Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.
      Returns:
      The number of columns
    • countRows

      default long countRows()
      Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.
      Returns:
      The number of rows
    • firstInColumn

      default int firstInColumn(int col)
      The default value is simply 0, and if all elements are zeros then this.countRows().
      Parameters:
      col - The column index
      Returns:
      The row index of the first non-zero element in the specified column
    • firstInRow

      default int firstInRow(int row)
      The default value is simply 0, and if all elements are zeros then this.countColumns().
      Returns:
      The column index of the first non-zero element in the specified row
    • getColDim

      int getColDim()
      Returns:
      The number of columns
    • getMaxDim

      default int getMaxDim()
    • getMinDim

      default int getMinDim()
    • getRowDim

      int getRowDim()
      Returns:
      The number of rows
    • isEmpty

      default boolean isEmpty()
      2D data structures are either square, tall, fat or empty.

      m <= 0 or n <= 0

      Historically some ojAlgo data structures did allow to create "empty" instances. Currently this is not encouraged, but still possible in some instances.
      Returns:
      true if matrix is empty
    • isFat

      default boolean isFat()
      2D data structures are either square, tall, fat or empty.

      1 <= m < n

      Returns:
      true if matrix is fat
    • isScalar

      default boolean isScalar()
      Returns:
      true if both the row and column dimensions are equal to 1.
    • isSquare

      default boolean isSquare()
      2D data structures are either square, tall, fat or empty.

      m = n <> 0

      Returns:
      true if matrix is square
    • isTall

      default boolean isTall()
      2D data structures are either square, tall, fat or empty.

      m < n >= 1

      Returns:
      true if matrix is tall
    • isVector

      default boolean isVector()
      Returns:
      true if either the row or column dimensions are equal to 1.
    • limitOfColumn

      default int limitOfColumn(int col)
      The default value is simply this.countRows(), and if all elements are zeros then 0.
      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

      default int limitOfRow(int row)
      The default value is simply this.countColumns(), and if all elements are zeros then 0.
      Returns:
      The column index of the first zero element, after all non-zeros, in the specified row (index of the last non-zero + 1)
    • size

      default int size()
      size() == getRowDim() * getColDim()
      Specified by:
      size in interface Structure1D