- 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 java.lang.Object implements Structure1D.IndexMapper<Structure2D.RowColumnKey<R,C>>
-
-
Field Summary
Fields Modifier and Type Field Description private Structure1D.IndexMapper<C>myColumnMapperprivate Structure1D.IndexMapper<R>myRowMapperprivate longmyStructure
-
Constructor Summary
Constructors Modifier Constructor Description protectedRowColumnMapper(Structure2D structure, Structure1D.IndexMapper<R> rowMapper, Structure1D.IndexMapper<C> columnMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longtoColumnIndex(C columnKey)CtoColumnKey(long index)longtoIndex(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.longtoIndex(R rowKey, C colKey)Structure2D.RowColumnKey<R,C>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)).longtoRowIndex(R rowKey)RtoRowKey(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 Detail
-
myColumnMapper
private final Structure1D.IndexMapper<C> myColumnMapper
-
myRowMapper
private final Structure1D.IndexMapper<R> myRowMapper
-
myStructure
private final long myStructure
-
-
Constructor Detail
-
RowColumnMapper
protected RowColumnMapper(Structure2D structure, Structure1D.IndexMapper<R> rowMapper, Structure1D.IndexMapper<C> columnMapper)
-
-
Method Detail
-
toColumnIndex
public long toColumnIndex(C columnKey)
-
toColumnKey
public C toColumnKey(long index)
-
toIndex
public long toIndex(Structure2D.RowColumnKey<R,C> key)
Description copied from interface:Structure1D.IndexMapperFor 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:
toIndexin interfaceStructure1D.IndexMapper<R>
-
toKey
public Structure2D.RowColumnKey<R,C> toKey(long index)
Description copied from interface:Structure1D.IndexMapperIn 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:
toKeyin interfaceStructure1D.IndexMapper<R>
-
toRowIndex
public long toRowIndex(R rowKey)
-
toRowKey
public R toRowKey(long index)
-
-