Class MultiModalIntVector

  • All Implemented Interfaces:
    IntVector

    public class MultiModalIntVector
    extends java.lang.Object
    implements IntVector
    an implementation of IntVector that uses a mix of backing arrays of type int, char, and byte array, in an attempt to save space for common data structures.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int get​(int x)  
      int getMaxIndex()  
      void print()  
      void set​(int x, int value)  
      • Methods inherited from class java.lang.Object

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

      • MultiModalIntVector

        public MultiModalIntVector​(int defaultValue)
      • MultiModalIntVector

        public MultiModalIntVector​(int defaultValue,
                                   int initialSize)
    • Method Detail

      • get

        public int get​(int x)
        Specified by:
        get in interface IntVector
      • set

        public void set​(int x,
                        int value)
        Specified by:
        set in interface IntVector
      • getMaxIndex

        public int getMaxIndex()
        Specified by:
        getMaxIndex in interface IntVector
        Returns:
        max i s.t set(i) was called.
      • print

        public void print()