Package org.ojalgo.structure
Class Structure2D.RowColumnMapper<R,C>
java.lang.Object
org.ojalgo.structure.Structure2D.RowColumnMapper<R,C>
- All Implemented Interfaces:
Structure1D.IndexMapper<Structure2D.RowColumnKey<R,
C>>
- Enclosing interface:
Structure2D
public static class Structure2D.RowColumnMapper<R,C>
extends Object
implements Structure1D.IndexMapper<Structure2D.RowColumnKey<R,C>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Structure1D.IndexMapper
<C> private final Structure1D.IndexMapper
<R> private final long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RowColumnMapper
(Structure2D structure, Structure1D.IndexMapper<R> rowMapper, Structure1D.IndexMapper<C> columnMapper) -
Method Summary
Modifier and TypeMethodDescriptionlong
toColumnIndex
(C columnKey) toColumnKey
(long index) long
toIndex
(Structure2D.RowColumnKey<R, C> key) For each key (any instance of that type) there is a corresponding index value – 1 or more key instances will be mapped to each index value.long
toKey
(long index) In most cases it should be safe to assume that the input index value is valid (matching what would be created byStructure1D.IndexMapper.toIndex(Object)
).long
toRowIndex
(R rowKey) toRowKey
(long index) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ojalgo.structure.Structure1D.IndexMapper
next, previous
-
Field Details
-
myColumnMapper
-
myRowMapper
-
myStructure
private final long myStructure
-
-
Constructor Details
-
RowColumnMapper
protected RowColumnMapper(Structure2D structure, Structure1D.IndexMapper<R> rowMapper, Structure1D.IndexMapper<C> columnMapper)
-
-
Method Details
-
toColumnIndex
-
toColumnKey
-
toIndex
-
toIndex
Description copied from interface:Structure1D.IndexMapper
For each key (any instance of that type) there is a corresponding index value – 1 or more key instances will be mapped to each index value.- Specified by:
toIndex
in interfaceStructure1D.IndexMapper<R>
-
toKey
Description copied from interface:Structure1D.IndexMapper
In most cases it should be safe to assume that the input index value is valid (matching what would be created byStructure1D.IndexMapper.toIndex(Object)
).- Specified by:
toKey
in interfaceStructure1D.IndexMapper<R>
-
toRowIndex
-
toRowKey
-