You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<div class="block">Returns a single weight from the samples contained in the sketch.</div>
8417
8417
</dd>
8418
8418
<dt><a href="org/apache/datasketches/theta/CompactSketch.html#wrap(byte%5B%5D)" class="member-name-link">wrap(byte[])</a> - Static method in class org.apache.datasketches.theta.<a href="org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></dt>
8419
-
<dd> </dd>
8419
+
<dd>
8420
+
<div class="block">Wrap takes the sketch image in the given Memory and refers to it directly.</div>
8421
+
</dd>
8420
8422
<dt><a href="org/apache/datasketches/theta/CompactSketch.html#wrap(byte%5B%5D,long)" class="member-name-link">wrap(byte[], long)</a> - Static method in class org.apache.datasketches.theta.<a href="org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></dt>
8421
-
<dd> </dd>
8423
+
<dd>
8424
+
<div class="block">Wrap takes the sketch image in the given Memory and refers to it directly.</div>
8425
+
</dd>
8422
8426
<dt><a href="org/apache/datasketches/filters/bloomfilter/BloomFilter.html#wrap(org.apache.datasketches.memory.Memory)" class="member-name-link">wrap(Memory)</a> - Static method in class org.apache.datasketches.filters.bloomfilter.<a href="org/apache/datasketches/filters/bloomfilter/BloomFilter.html" title="class in org.apache.datasketches.filters.bloomfilter">BloomFilter</a></dt>
8423
8427
<dd>
8424
8428
<div class="block">Wraps the given Memory into this filter class.</div>
<divclass="member-signature"><spanclass="modifiers">public static</span> <spanclass="return-type"><ahref="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></span> <spanclass="element-name">wrap</span><wbr><spanclass="parameters">(byte[] bytes)</span></div>
355
+
<divclass="block">Wrap takes the sketch image in the given Memory and refers to it directly.
356
+
There is no data copying onto the java heap.
357
+
The wrap operation enables fast read-only merging and access to all the public read-only API.
358
+
359
+
<p>Only "Direct" Serialization Version 3 (i.e, OpenSource) sketches that have
360
+
been explicitly stored as direct sketches can be wrapped.
361
+
Wrapping earlier serial version sketches will result in a heapify operation.
362
+
These early versions were never designed to "wrap".</p>
363
+
364
+
<p>Wrapping any subclass of this class that is empty or contains only a single item will
365
+
result in heapified forms of empty and single item sketch respectively.
366
+
This is actually faster and consumes less overall memory.</p>
367
+
368
+
<p>This method checks if the DEFAULT_UPDATE_SEED was used to create the source Memory image.
369
+
Note that SerialVersion 1 sketches cannot be checked as they don't have a seedHash field,
370
+
so the resulting heapified CompactSketch will be given the hash of DEFAULT_UPDATE_SEED.</p></div>
371
+
<dlclass="notes">
372
+
<dt>Parameters:</dt>
373
+
<dd><code>bytes</code> - a byte array image of a Sketch that was created using the DEFAULT_UPDATE_SEED.
<dd>a CompactSketch backed by the given Memory except as above.</dd>
377
+
</dl>
351
378
</section>
352
379
</li>
353
380
<li>
354
381
<sectionclass="detail" id="wrap(byte[],long)">
355
382
<h3>wrap</h3>
356
383
<divclass="member-signature"><spanclass="modifiers">public static</span> <spanclass="return-type"><ahref="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></span> <spanclass="element-name">wrap</span><wbr><spanclass="parameters">(byte[] bytes,
357
384
long expectedSeed)</span></div>
385
+
<divclass="block">Wrap takes the sketch image in the given Memory and refers to it directly.
386
+
There is no data copying onto the java heap.
387
+
The wrap operation enables fast read-only merging and access to all the public read-only API.
388
+
389
+
<p>Only "Direct" Serialization Version 3 (i.e, OpenSource) sketches that have
390
+
been explicitly stored as direct sketches can be wrapped.
391
+
Wrapping earlier serial version sketches will result in a heapify operation.
392
+
These early versions were never designed to "wrap".</p>
393
+
394
+
<p>Wrapping any subclass of this class that is empty or contains only a single item will
395
+
result in heapified forms of empty and single item sketch respectively.
396
+
This is actually faster and consumes less overall memory.</p>
397
+
398
+
<p>This method checks if the given expectedSeed was used to create the source Memory image.
399
+
Note that SerialVersion 1 sketches cannot be checked as they don't have a seedHash field,
400
+
so the resulting heapified CompactSketch will be given the hash of the expectedSeed.</p></div>
401
+
<dlclass="notes">
402
+
<dt>Parameters:</dt>
403
+
<dd><code>bytes</code> - a byte array image of a Sketch that was created using the given expectedSeed.
0 commit comments