Class StructureAnyD.ReferenceMapper

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> long toIndex​(int dim, T key)  
      long toIndex​(java.lang.Object[] keys)
      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.
      <T> T toKey​(int dim, long index)  
      java.lang.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 by Structure1D.IndexMapper.toIndex(Object)).
      <T extends java.lang.Comparable<? super T>>
      T
      toKey​(long index, int dim)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • myStructure

        private final long[] myStructure
    • Method Detail

      • toIndex

        public <T> long toIndex​(int dim,
                                T key)
      • toIndex

        public long toIndex​(java.lang.Object[] keys)
        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 interface Structure1D.IndexMapper<java.lang.Object[]>
      • toKey

        public <T> T toKey​(int dim,
                           long index)
      • toKey

        public <T extends java.lang.Comparable<? super T>> T toKey​(long index,
                                                                   int dim)