Class SparseArray<T>


  • @Immutable
    public class SparseArray<T>
    extends Object
    Store objects of type T in a sparse array. Conceptually a multidim array with shape[n] and totalsize. Stored as track[totalsize] = {0 = missing, else = index+1 into List content} So we dont have to store missing Ts.
    Since:
    11/24/13
    • Constructor Detail

      • SparseArray

        public SparseArray​(int[] shape,
                           int[] track,
                           List<T> content,
                           int ndups)
    • Method Detail

      • getContent

        @Nullable
        public T getContent​(int idx)
      • getContent

        public T getContent​(int[] index)
      • getShape

        public int[] getShape()
      • getRank

        public int getRank()
      • getTotalSize

        public int getTotalSize()
      • getTrack

        public int[] getTrack()
      • getTrack

        public int getTrack​(int idx)
      • getContent

        public List<T> getContent()
      • countNotMissing

        public int countNotMissing()
      • countMissing

        public int countMissing()
      • getDensity

        public float getDensity()
      • getNdups

        public int getNdups()
      • showMissing

        public void showMissing​(Formatter info)
      • showContent

        public void showContent​(Formatter f)
      • showTracks

        public void showTracks​(Formatter f)