public interface Structure2D extends Structure1D
Modifier and Type | Interface and Description |
---|---|
static class |
Structure2D.IntRowColumn |
static class |
Structure2D.LongRowColumn |
static interface |
Structure2D.ReducibleTo1D<R extends Structure1D> |
static interface |
Structure2D.RowColumnCallback |
static class |
Structure2D.RowColumnKey<R,C> |
static class |
Structure2D.RowColumnMapper<R,C> |
Structure1D.BasicMapper<T>, Structure1D.IndexCallback, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback
Modifier and Type | Method and Description |
---|---|
static int |
column(int index,
int structure) |
static int |
column(int index,
int[] structure) |
static int |
column(long index,
int structure) |
static long |
column(long index,
long structure) |
static long |
column(long index,
long[] structure) |
default long |
count()
count() == countRows() * countColumns()
|
long |
countColumns() |
long |
countRows() |
static int |
index(int structure,
int row,
int column) |
static long |
index(long structure,
long row,
long column) |
default boolean |
isEmpty()
2D data structures are either square, tall, fat or empty.
|
default boolean |
isFat()
2D data structures are either square, tall, fat or empty.
|
default boolean |
isScalar() |
default boolean |
isSquare()
2D data structures are either square, tall, fat or empty.
|
default boolean |
isTall()
2D data structures are either square, tall, fat or empty.
|
default boolean |
isVector() |
default void |
loopAll(Structure2D.RowColumnCallback callback) |
default void |
loopColumn(long row,
long col,
Structure2D.RowColumnCallback callback) |
default void |
loopColumn(long col,
Structure2D.RowColumnCallback callback) |
default void |
loopDiagonal(long row,
long col,
Structure2D.RowColumnCallback callback) |
static void |
loopMatching(Structure2D structureA,
Structure2D structureB,
Structure2D.RowColumnCallback callback) |
default void |
loopRow(long row,
long col,
Structure2D.RowColumnCallback callback) |
default void |
loopRow(long row,
Structure2D.RowColumnCallback callback) |
static <R,C> Structure2D.RowColumnMapper<R,C> |
mapperOf(Structure2D structure,
Structure1D.IndexMapper<R> rowMappwer,
Structure1D.IndexMapper<C> columnMappwer) |
static int |
row(int index,
int structure) |
static int |
row(int index,
int[] structure) |
static int |
row(long index,
int structure) |
static long |
row(long index,
long structure) |
static long |
row(long index,
long[] structure) |
loopAll, loopMatching, loopRange, mapper
static <R,C> Structure2D.RowColumnMapper<R,C> mapperOf(Structure2D structure, Structure1D.IndexMapper<R> rowMappwer, Structure1D.IndexMapper<C> columnMappwer)
static int column(int index, int structure)
static int column(int index, int[] structure)
static int column(long index, int structure)
static long column(long index, long structure)
static long column(long index, long[] structure)
static int index(int structure, int row, int column)
static long index(long structure, long row, long column)
static void loopMatching(Structure2D structureA, Structure2D structureB, Structure2D.RowColumnCallback callback)
static int row(int index, int structure)
static int row(int index, int[] structure)
static int row(long index, int structure)
static long row(long index, long structure)
static long row(long index, long[] structure)
default long count()
count
in interface Structure1D
long countColumns()
long countRows()
default boolean isEmpty()
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.default boolean isFat()
1 <= m < n
default boolean isScalar()
default boolean isSquare()
m = n <> 0
default boolean isTall()
m < n >= 1
default boolean isVector()
default void loopAll(Structure2D.RowColumnCallback callback)
default void loopColumn(long row, long col, Structure2D.RowColumnCallback callback)
default void loopColumn(long col, Structure2D.RowColumnCallback callback)
default void loopDiagonal(long row, long col, Structure2D.RowColumnCallback callback)
default void loopRow(long row, long col, Structure2D.RowColumnCallback callback)
default void loopRow(long row, Structure2D.RowColumnCallback callback)
Copyright © 2018 Optimatika. All rights reserved.