@Immutable
public class SparseArray<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SparseArray.Builder<T> |
Constructor and Description |
---|
SparseArray(int[] shape,
int[] track,
java.util.List<T> content,
int ndups) |
Modifier and Type | Method and Description |
---|---|
int |
calcIndex(int... index) |
int |
countMissing() |
int |
countNotMissing() |
java.util.List<T> |
getContent() |
T |
getContent(int idx) |
T |
getContent(int[] index) |
float |
getDensity() |
int |
getNdups() |
int |
getRank() |
int[] |
getShape() |
int |
getTotalSize() |
int[] |
getTrack() |
int |
getTrack(int idx) |
void |
showContent(java.util.Formatter f) |
void |
showInfo(java.util.Formatter info,
Counter all) |
public SparseArray(int[] shape, int[] track, java.util.List<T> content, int ndups)
public int calcIndex(int... index)
public T getContent(int idx)
public T getContent(int[] index)
public int[] getShape()
public int getRank()
public int getTotalSize()
public int[] getTrack()
public int getTrack(int idx)
public java.util.List<T> getContent()
public int countNotMissing()
public int countMissing()
public float getDensity()
public int getNdups()
public void showInfo(java.util.Formatter info, Counter all)
public void showContent(java.util.Formatter f)