Class StructureAnyD.ReferenceMapper
java.lang.Object
org.ojalgo.structure.StructureAnyD.ReferenceMapper
- All Implemented Interfaces:
Structure1D.IndexMapper<Object[]>
- Enclosing interface:
StructureAnyD
public static class StructureAnyD.ReferenceMapper
extends Object
implements Structure1D.IndexMapper<Object[]>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Structure1D.IndexMapper<Object>[]private final long[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReferenceMapper(StructureAnyD structure, Structure1D.IndexMapper<Object>[] mappers) -
Method Summary
Modifier and TypeMethodDescription<T> longtoIndex(int dim, T key) longFor 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.<T> TtoKey(int dim, long index) Object[]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)).<T extends Comparable<? super T>>
TtoKey(long index, int dim) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Structure1D.IndexMapper
next, previous
-
Field Details
-
myMappers
-
myStructure
private final long[] myStructure
-
-
Constructor Details
-
ReferenceMapper
-
-
Method Details
-
toIndex
public <T> long toIndex(int dim, T key) -
toIndex
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<Object[]>
-
toKey
public <T> T toKey(int dim, long index) -
toKey
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<Object[]>
-
toKey
-