static CompactSketch compact ( final long [ ] cache , final boolean empty , final short seedHash , final int curCount , final long thetaLong ) { if ( ( curCount == 1 ) && ( thetaLong == Long . MAX_VALUE ) ) { return new SingleItemSketch ( cache [ 0 ] , seedHash ) ; } return new HeapCompactUnorderedSketch ( cache , empty , seedHash , curCount , thetaLong ) ; }
Constructs this sketch from correct valid arguments .