Interface MapToFactory


  • public interface MapToFactory
    • Field Detail

      • LOG

        static final org.apache.commons.logging.Log LOG
    • Method Detail

      • create

        static AMapToData create​(int size,
                                 int[] values,
                                 int nUnique)
      • create

        static AMapToData create​(int size,
                                 int numTuples)
        Create and allocate a map with the given size and support for upto the num tuples argument of values
        Parameters:
        size - The number of cells to allocate
        numTuples - The maximum value to be able to represent inside the map.
        Returns:
        A new map
      • resize

        static AMapToData resize​(AMapToData d,
                                 int numTuples)
        Reshape the map, to a smaller instance if applicable. Note that it returns the input if the input is the smallest representation that fits, otherwise it will return something that is smaller.
        Parameters:
        d - The Input mat to potentially reduce the size of.
        numTuples - The number of tuples that should be in the resulting map
        Returns:
        The returned hopefully reduced map.
      • resizeForce

        static AMapToData resizeForce​(AMapToData d,
                                      MapToFactory.MAP_TYPE t)
        Force the mapping into an other mapping type. This method is unsafe since if there is overflows in the conversions, they are not handled. Also if the change is into the same type a new map is allocated anyway.
        Parameters:
        d - The map to resize.
        t - The type to resize to.
        Returns:
        A new allocated mapToData with the specified type.
      • estimateInMemorySize

        static long estimateInMemorySize​(int size,
                                         int numTuples)