Interface Structure2D
- All Superinterfaces:
Structure1D
- All Known Subinterfaces:
Access2D<N>, Access2D.Aggregatable<N>, Access2D.Collectable<N,R>, Access2D.Sliceable<N>, Access2D.Visitable<N>, BasisRepresentation, Bidiagonal<N>, Cholesky<N>, DecompositionStore<N>, Eigenvalue<N>, Eigenvalue.Generalised<N>, Eigenvalue.Spectral<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.Updatable<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>, SparseStructure2D, 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, ColumnsStore, ColumnsSupplier, ColumnsSupplier.SingleView, ComplexNumber, ComposingStore, CompressedSparseR064, CompressedSparseR064.Builder, ConjugatedStore, DataBatch, DecomposedInverse, DeferredTridiagonal, DeferredTridiagonal.C128, DeferredTridiagonal.H256, DeferredTridiagonal.Q128, DeferredTridiagonal.R064, DeferredTridiagonal.R128, DenseBidiagonal, DenseBidiagonal.C128, DenseBidiagonal.H256, DenseBidiagonal.Q128, DenseBidiagonal.R064, DenseBidiagonal.R128, DenseCholesky, DenseCholesky.C128, DenseCholesky.H256, DenseCholesky.Q128, DenseCholesky.R064, DenseCholesky.R128, DenseEigenvalue, DenseHessenberg, DenseHessenberg.C128, DenseHessenberg.H256, DenseHessenberg.Q128, DenseHessenberg.R064, DenseHessenberg.R128, DenseLDL, DenseLDL.C128, DenseLDL.H256, DenseLDL.Q128, DenseLDL.R064, DenseLDL.R128, DenseLU, DenseLU.C128, DenseLU.H256, DenseLU.Q128, DenseLU.R064, DenseLU.R128, DenseMutator2D, DenseQR, DenseQR.C128, DenseQR.H256, DenseQR.Q128, DenseQR.R064, DenseQR.R128, DenseSingularValue, DenseSingularValue.C128, DenseSingularValue.H256, DenseSingularValue.Q128, DenseSingularValue.R064, DenseSingularValue.R128, DenseTableau, DenseTridiagonal, DiagonalStore, DynamicEvD, DynamicEvD.R064, FactoryStore, GeneralEvD, GeneralEvD.R064, GeneralisedEvD, GenericStore, HermitianEvD, HermitianEvD.C128, HermitianEvD.H256, HermitianEvD.Q128, HermitianEvD.R064, HermitianEvD.R128, IdentityStore, ImageData, ImageData.SingleChannel, InPlaceDecomposition, InvertibleFactor.IdentityFactor, LeftRightStore, LimitStore, LogicalStore, LowerHessenbergStore, LowerSymmetricStore, LowerTriangularStore, 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, Quaternion, R032Store, R064CSC, R064CSC.Builder, R064CSR, R064CSR.Builder, 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, SparseLU, SparseLU.PermutationEta, SparseMutator2D, SparseQDLDL, SparseStore, SparseStore.Builder, SparseTableau, Subregion2D, Subregion2D.ColumnsRegion, Subregion2D.LimitRegion, Subregion2D.OffsetRegion, Subregion2D.RowsRegion, Subregion2D.SynchronizedRegion, Subregion2D.TransposedRegion, Subregion2D.WrapperRegion, SuperimposedStore, TransjugatedStore, TransposedStore, UnaryOperatoStore, UpperHessenbergStore, UpperSymmetricStore, UpperTriangularStore, WrapperStore, ZeroStore
A (fixed size) 2-dimensional data structure.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic interfaceStructure2D.Logical<S extends Structure2D, B extends Structure2D.Logical<S,B>> static final classstatic interfaceStructure2D.ReducibleTo1D<R extends Structure1D>static interfacestatic classstatic classNested classes/interfaces inherited from interface Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback -
Method Summary
Modifier and TypeMethodDescriptionstatic intcolumn(int index, int structure) static intcolumn(int index, int[] structure) static intcolumn(long index, int structure) static longcolumn(long index, long structure) static longcolumn(long index, long[] structure) default longcount()count() == countRows() * countColumns()static longcount(long numberOfRows, long numberOfColumnns) default longOnly need to implement if the structure may contain more than Integer.MAX_VALUE elements.default longOnly need to implement if the structure may contain more than Integer.MAX_VALUE elements.default intfirstInColumn(int col) The default value is simply0, and if all elements are zeros thenthis.countRows().static intfirstInColumn(Structure1D structure, int col, int defaultAndMinimum) static longfirstInColumn(Structure1D structure, long col, long defaultAndMinimum) default intfirstInRow(int row) The default value is simply0, and if all elements are zeros thenthis.countColumns().static intfirstInRow(Structure1D structure, int row, int defaultAndMinimum) static longfirstInRow(Structure1D structure, long row, long defaultAndMinimum) intdefault intdefault intintstatic longindex(long structure, long row, long column) default booleanisEmpty()2D data structures are either square, tall, fat or empty.default booleanisFat()2D data structures are either square, tall, fat or empty.default booleanisScalar()default booleanisSquare()2D data structures are either square, tall, fat or empty.default booleanisTall()2D data structures are either square, tall, fat or empty.default booleanisVector()default intlimitOfColumn(int col) The default value is simplythis.countRows(), and if all elements are zeros then0.static intlimitOfColumn(Structure1D structure, int col, int defaultAndMaximum) static longlimitOfColumn(Structure1D structure, long col, long defaultAndMaximum) default intlimitOfRow(int row) The default value is simplythis.countColumns(), and if all elements are zeros then0.static intlimitOfRow(Structure1D structure, int row, int defaultAndMaximum) static longlimitOfRow(Structure1D structure, long row, long defaultAndMaximum) static <R,C> Structure2D.RowColumnMapper <R, C> mapperOf(Structure2D structure, Structure1D.IndexMapper<R> rowMappwer, Structure1D.IndexMapper<C> columnMappwer) static introw(int index, int structure) static introw(int index, int[] structure) static introw(long index, int structure) static longrow(long index, long structure) static longrow(long index, long[] structure) default intsize()size() == getRowDim() * getColDim()
-
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
-
firstInColumn
-
firstInRow
-
firstInRow
-
index
static long index(long structure, long row, long column) -
limitOfColumn
-
limitOfColumn
-
limitOfRow
-
limitOfRow
-
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:
countin interfaceStructure1D
-
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 simply0, and if all elements are zeros thenthis.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 simply0, and if all elements are zeros thenthis.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 simplythis.countRows(), and if all elements are zeros then0.- 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 simplythis.countColumns(), and if all elements are zeros then0.- 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
-