net.sf.farrago.util
Class FarragoCardinalityEstimator.SparseLongArray
java.lang.Object
net.sf.farrago.util.FarragoCardinalityEstimator.SparseLongArray
- Enclosing class:
- FarragoCardinalityEstimator
private static class FarragoCardinalityEstimator.SparseLongArray
- extends Object
Method Summary |
long |
get(long index)
|
void |
increment(long index)
|
void |
set(long index,
long value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GENERIC_THRESHOLD
private final long GENERIC_THRESHOLD
- See Also:
- Constant Field Values
base
private final long[] base
- Storage for the first N (
GENERIC_THRESHOLD
) indices.
generic
private final Map<Long,Long> generic
- Generic storage for any other index;
FarragoCardinalityEstimator.SparseLongArray
public FarragoCardinalityEstimator.SparseLongArray()
get
public long get(long index)
set
public void set(long index,
long value)
increment
public void increment(long index)