- java.lang.Object
-
- org.ojalgo.structure.Structure1D.BasicMapper<T>
-
- All Implemented Interfaces:
Structure1D.IndexMapper<T>
- Enclosing interface:
- Structure1D
public static class Structure1D.BasicMapper<T> extends java.lang.Object implements Structure1D.IndexMapper<T>
-
-
Constructor Summary
Constructors Constructor Description BasicMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) longindexForNewKey(T newKey)longtoIndex(T 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.TtoKey(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)).-
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
-
myKeys
private final java.util.List<T> myKeys
-
-
Method Detail
-
toIndex
public long toIndex(T 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<T>
-
toKey
public final T 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<T>
-
indexForNewKey
final long indexForNewKey(T newKey)
-
-