public long cardinality(){
switch (type) {
case EMPTY:
    return 0;
case EXPLICIT:
  return explicitStorage.size();
case SPARSE:
return (long)Math.ceil(sparseProbabilisticAlgorithmCardinality());
case FULL:
return (long)Math.ceil(fullProbabilisticAlgorithmCardinality());
default :
throw new RuntimeException("Unsupported HLL type " + type);
}
}

public long cardinality ( ) { switch ( type ) { case EMPTY : return 0 ; case EXPLICIT : return explicitStorage . size ( ) ; case SPARSE : return ( long ) Math . ceil ( sparseProbabilisticAlgorithmCardinality ( ) ) ; case FULL : return ( long ) Math . ceil ( fullProbabilisticAlgorithmCardinality ( ) ) ; default : throw new RuntimeException ( "Unsupported HLL type " + type ) ; } }
computes the cardinality of the hll .
