static < T > VarOptItemsSketch < T > newInstanceAsGadget ( final int k ) { final VarOptItemsSketch < T > sketch = new VarOptItemsSketch <> ( k , DEFAULT_RESIZE_FACTOR ) ; sketch . marks_ = new ArrayList <> ( sketch . currItemsAlloc_ ) ; return sketch ; }
Construct a varopt sketch for use as a unioning gadget meaning the array of marked elements is also initialized .