net.sf.farrago.util
Class FarragoCardinalityEstimator.SparseLongArray

java.lang.Object
  extended by net.sf.farrago.util.FarragoCardinalityEstimator.SparseLongArray
Enclosing class:
FarragoCardinalityEstimator

private static class FarragoCardinalityEstimator.SparseLongArray
extends Object


Field Summary
private  long[] base
          Storage for the first N (GENERIC_THRESHOLD) indices.
private  Map<Long,Long> generic
          Generic storage for any other index;
private  long GENERIC_THRESHOLD
           
 
Constructor Summary
FarragoCardinalityEstimator.SparseLongArray()
           
 
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
 

Field Detail

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;

Constructor Detail

FarragoCardinalityEstimator.SparseLongArray

public FarragoCardinalityEstimator.SparseLongArray()
Method Detail

get

public long get(long index)

set

public void set(long index,
                long value)

increment

public void increment(long index)