blob: 5b004c0fde63d8540c175144280e90a0f0242fe6 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>datasketches-cpp: var_opt_union&lt; T, A &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">datasketches-cpp
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacedatasketches.html">datasketches</a></li><li class="navelem"><a class="el" href="classdatasketches_1_1var__opt__union.html">var_opt_union</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classdatasketches_1_1var__opt__union-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">var_opt_union&lt; T, A &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Provides a unioning operation over <a class="el" href="classdatasketches_1_1var__opt__sketch.html" title="This sketch samples data from a stream of items.">var_opt_sketch</a> objects.
<a href="classdatasketches_1_1var__opt__union.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="var__opt__union_8hpp_source.html">var_opt_union.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a34ccfdbae9cae36faf1093e12da38d0c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#a34ccfdbae9cae36faf1093e12da38d0c">update</a> (const <a class="el" href="classdatasketches_1_1var__opt__sketch.html">var_opt_sketch</a>&lt; T, A &gt; &amp;sk)</td></tr>
<tr class="memdesc:a34ccfdbae9cae36faf1093e12da38d0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates this union with the given sketch This method takes an lvalue. <a href="classdatasketches_1_1var__opt__union.html#a34ccfdbae9cae36faf1093e12da38d0c">More...</a><br /></td></tr>
<tr class="separator:a34ccfdbae9cae36faf1093e12da38d0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0271e8119772f1bbefe7e4e6f82431a3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#a0271e8119772f1bbefe7e4e6f82431a3">update</a> (<a class="el" href="classdatasketches_1_1var__opt__sketch.html">var_opt_sketch</a>&lt; T, A &gt; &amp;&amp;sk)</td></tr>
<tr class="memdesc:a0271e8119772f1bbefe7e4e6f82431a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates this union with the given sketch This method takes an rvalue. <a href="classdatasketches_1_1var__opt__union.html#a0271e8119772f1bbefe7e4e6f82431a3">More...</a><br /></td></tr>
<tr class="separator:a0271e8119772f1bbefe7e4e6f82431a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28e630639a11dc71d7f72c4e0518b2fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdatasketches_1_1var__opt__sketch.html">var_opt_sketch</a>&lt; T, A &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#a28e630639a11dc71d7f72c4e0518b2fe">get_result</a> () const</td></tr>
<tr class="memdesc:a28e630639a11dc71d7f72c4e0518b2fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the varopt sketch resulting from the union of any input sketches. <a href="classdatasketches_1_1var__opt__union.html#a28e630639a11dc71d7f72c4e0518b2fe">More...</a><br /></td></tr>
<tr class="separator:a28e630639a11dc71d7f72c4e0518b2fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad20897c5c8bd47f5d4005989bead0e55"><td class="memItemLeft" align="right" valign="top"><a id="ad20897c5c8bd47f5d4005989bead0e55"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#ad20897c5c8bd47f5d4005989bead0e55">reset</a> ()</td></tr>
<tr class="memdesc:ad20897c5c8bd47f5d4005989bead0e55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the union to its default, empty state. <br /></td></tr>
<tr class="separator:ad20897c5c8bd47f5d4005989bead0e55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8762fed25b3024f07989976344dd0afb"><td class="memTemplParams" colspan="2">template&lt;typename SerDe = serde&lt;T&gt;&gt; </td></tr>
<tr class="memitem:a8762fed25b3024f07989976344dd0afb"><td class="memTemplItemLeft" align="right" valign="top">size_t&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#a8762fed25b3024f07989976344dd0afb">get_serialized_size_bytes</a> (const SerDe &amp;sd=SerDe()) const</td></tr>
<tr class="memdesc:a8762fed25b3024f07989976344dd0afb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes size needed to serialize the current state of the union. <a href="classdatasketches_1_1var__opt__union.html#a8762fed25b3024f07989976344dd0afb">More...</a><br /></td></tr>
<tr class="separator:a8762fed25b3024f07989976344dd0afb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d0c269c23926e93b1c7a9c00e86af97"><td class="memTemplParams" colspan="2">template&lt;typename SerDe = serde&lt;T&gt;&gt; </td></tr>
<tr class="memitem:a1d0c269c23926e93b1c7a9c00e86af97"><td class="memTemplItemLeft" align="right" valign="top">vector_bytes&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#a1d0c269c23926e93b1c7a9c00e86af97">serialize</a> (unsigned header_size_bytes=0, const SerDe &amp;sd=SerDe()) const</td></tr>
<tr class="memdesc:a1d0c269c23926e93b1c7a9c00e86af97"><td class="mdescLeft">&#160;</td><td class="mdescRight">NOTE: This method may be deprecated in a future version. <a href="classdatasketches_1_1var__opt__union.html#a1d0c269c23926e93b1c7a9c00e86af97">More...</a><br /></td></tr>
<tr class="separator:a1d0c269c23926e93b1c7a9c00e86af97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a538940c100e4353b3671ad452d3d3056"><td class="memTemplParams" colspan="2">template&lt;typename SerDe = serde&lt;T&gt;&gt; </td></tr>
<tr class="memitem:a538940c100e4353b3671ad452d3d3056"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#a538940c100e4353b3671ad452d3d3056">serialize</a> (std::ostream &amp;os, const SerDe &amp;sd=SerDe()) const</td></tr>
<tr class="memdesc:a538940c100e4353b3671ad452d3d3056"><td class="mdescLeft">&#160;</td><td class="mdescRight">NOTE: This method may be deprecated in a future version. <a href="classdatasketches_1_1var__opt__union.html#a538940c100e4353b3671ad452d3d3056">More...</a><br /></td></tr>
<tr class="separator:a538940c100e4353b3671ad452d3d3056"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed372241c10ffd041bee85602edb199a"><td class="memItemLeft" align="right" valign="top">string&lt; A &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#aed372241c10ffd041bee85602edb199a">to_string</a> () const</td></tr>
<tr class="memdesc:aed372241c10ffd041bee85602edb199a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints a summary of the union as a string. <a href="classdatasketches_1_1var__opt__union.html#aed372241c10ffd041bee85602edb199a">More...</a><br /></td></tr>
<tr class="separator:aed372241c10ffd041bee85602edb199a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:afc62fc9782cf19d45830a2b2527a6771"><td class="memTemplParams" colspan="2">template&lt;typename SerDe = serde&lt;T&gt;&gt; </td></tr>
<tr class="memitem:afc62fc9782cf19d45830a2b2527a6771"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classdatasketches_1_1var__opt__union.html">var_opt_union</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#afc62fc9782cf19d45830a2b2527a6771">deserialize</a> (std::istream &amp;is, const SerDe &amp;sd=SerDe(), const A &amp;allocator=A())</td></tr>
<tr class="memdesc:afc62fc9782cf19d45830a2b2527a6771"><td class="mdescLeft">&#160;</td><td class="mdescRight">NOTE: This method may be deprecated in a future version. <a href="classdatasketches_1_1var__opt__union.html#afc62fc9782cf19d45830a2b2527a6771">More...</a><br /></td></tr>
<tr class="separator:afc62fc9782cf19d45830a2b2527a6771"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7293f80212b67942ab29811b299bb8c6"><td class="memTemplParams" colspan="2">template&lt;typename SerDe = serde&lt;T&gt;&gt; </td></tr>
<tr class="memitem:a7293f80212b67942ab29811b299bb8c6"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classdatasketches_1_1var__opt__union.html">var_opt_union</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdatasketches_1_1var__opt__union.html#a7293f80212b67942ab29811b299bb8c6">deserialize</a> (const void *bytes, size_t size, const SerDe &amp;sd=SerDe(), const A &amp;allocator=A())</td></tr>
<tr class="memdesc:a7293f80212b67942ab29811b299bb8c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">NOTE: This method may be deprecated in a future version. <a href="classdatasketches_1_1var__opt__union.html#a7293f80212b67942ab29811b299bb8c6">More...</a><br /></td></tr>
<tr class="separator:a7293f80212b67942ab29811b299bb8c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T, typename A = std::allocator&lt;T&gt;&gt;<br />
class datasketches::var_opt_union&lt; T, A &gt;</h3>
<p>Provides a unioning operation over <a class="el" href="classdatasketches_1_1var__opt__sketch.html" title="This sketch samples data from a stream of items.">var_opt_sketch</a> objects. </p>
<p>This union allows the sample size k to float, possibly increasing or decreasing as warranted by the available data.</p>
<p>The union currently allows serialization and deserialization, even though transporting union objects seems to be an anti-pattern with most sketches. We currently provide it here because the <a class="el" href="classdatasketches_1_1var__opt__union.html#a28e630639a11dc71d7f72c4e0518b2fe" title="Gets the varopt sketch resulting from the union of any input sketches.">get_result()</a> call may need to discard samples and decrease k in order to return a valid sketch, even if future calls to <a class="el" href="classdatasketches_1_1var__opt__union.html#a34ccfdbae9cae36faf1093e12da38d0c" title="Updates this union with the given sketch This method takes an lvalue.">update()</a> would allow k to remain larger.</p>
<p>The (de)serialization methods may be deprecated and subsequently removed in future versions.</p>
<p>author Kevin Lang author Jon Malkin </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a34ccfdbae9cae36faf1093e12da38d0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34ccfdbae9cae36faf1093e12da38d0c">&#9670;&nbsp;</a></span>update() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void update </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classdatasketches_1_1var__opt__sketch.html">var_opt_sketch</a>&lt; T, A &gt; &amp;&#160;</td>
<td class="paramname"><em>sk</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Updates this union with the given sketch This method takes an lvalue. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sk</td><td>a sketch to add to the union </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a0271e8119772f1bbefe7e4e6f82431a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0271e8119772f1bbefe7e4e6f82431a3">&#9670;&nbsp;</a></span>update() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void update </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classdatasketches_1_1var__opt__sketch.html">var_opt_sketch</a>&lt; T, A &gt; &amp;&amp;&#160;</td>
<td class="paramname"><em>sk</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Updates this union with the given sketch This method takes an rvalue. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sk</td><td>a sketch to add to the union </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a28e630639a11dc71d7f72c4e0518b2fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28e630639a11dc71d7f72c4e0518b2fe">&#9670;&nbsp;</a></span>get_result()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdatasketches_1_1var__opt__sketch.html">var_opt_sketch</a>&lt; T, A &gt; get_result</td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the varopt sketch resulting from the union of any input sketches. </p>
<dl class="section return"><dt>Returns</dt><dd>a varopt sketch </dd></dl>
</div>
</div>
<a id="a8762fed25b3024f07989976344dd0afb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8762fed25b3024f07989976344dd0afb">&#9670;&nbsp;</a></span>get_serialized_size_bytes()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t get_serialized_size_bytes </td>
<td>(</td>
<td class="paramtype">const SerDe &amp;&#160;</td>
<td class="paramname"><em>sd</em> = <code>SerDe()</code></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes size needed to serialize the current state of the union. </p>
<p>This version is for all other types and can be expensive since every item needs to be looked at. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sd</td><td>instance of a SerDe </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>size in bytes needed to serialize this sketch </dd></dl>
</div>
</div>
<a id="a1d0c269c23926e93b1c7a9c00e86af97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d0c269c23926e93b1c7a9c00e86af97">&#9670;&nbsp;</a></span>serialize() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">vector_bytes serialize </td>
<td>(</td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>header_size_bytes</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const SerDe &amp;&#160;</td>
<td class="paramname"><em>sd</em> = <code>SerDe()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>NOTE: This method may be deprecated in a future version. </p>
<p>This method serializes the sketch as a vector of bytes. An optional header can be reserved in front of the sketch. It is a blank space of a given size. This header is used in Datasketches PostgreSQL extension. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">header_size_bytes</td><td>space to reserve in front of the sketch </td></tr>
<tr><td class="paramname">sd</td><td>instance of a SerDe </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a538940c100e4353b3671ad452d3d3056"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a538940c100e4353b3671ad452d3d3056">&#9670;&nbsp;</a></span>serialize() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void serialize </td>
<td>(</td>
<td class="paramtype">std::ostream &amp;&#160;</td>
<td class="paramname"><em>os</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const SerDe &amp;&#160;</td>
<td class="paramname"><em>sd</em> = <code>SerDe()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>NOTE: This method may be deprecated in a future version. </p>
<p>This method serializes the sketch into a given stream in a binary form </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">os</td><td>output stream </td></tr>
<tr><td class="paramname">sd</td><td>instance of a SerDe </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="afc62fc9782cf19d45830a2b2527a6771"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc62fc9782cf19d45830a2b2527a6771">&#9670;&nbsp;</a></span>deserialize() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classdatasketches_1_1var__opt__union.html">var_opt_union</a> deserialize </td>
<td>(</td>
<td class="paramtype">std::istream &amp;&#160;</td>
<td class="paramname"><em>is</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const SerDe &amp;&#160;</td>
<td class="paramname"><em>sd</em> = <code>SerDe()</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const A &amp;&#160;</td>
<td class="paramname"><em>allocator</em> = <code>A()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>NOTE: This method may be deprecated in a future version. </p>
<p>This method deserializes a union from a given stream. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">is</td><td>input stream </td></tr>
<tr><td class="paramname">sd</td><td>instance of a SerDe </td></tr>
<tr><td class="paramname">allocator</td><td>instance of an Allocator </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an instance of a union </dd></dl>
</div>
</div>
<a id="a7293f80212b67942ab29811b299bb8c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7293f80212b67942ab29811b299bb8c6">&#9670;&nbsp;</a></span>deserialize() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classdatasketches_1_1var__opt__union.html">var_opt_union</a> deserialize </td>
<td>(</td>
<td class="paramtype">const void *&#160;</td>
<td class="paramname"><em>bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const SerDe &amp;&#160;</td>
<td class="paramname"><em>sd</em> = <code>SerDe()</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const A &amp;&#160;</td>
<td class="paramname"><em>allocator</em> = <code>A()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>NOTE: This method may be deprecated in a future version. </p>
<p>This method deserializes a union from a given array of bytes. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bytes</td><td>pointer to the array of bytes </td></tr>
<tr><td class="paramname">size</td><td>the size of the array </td></tr>
<tr><td class="paramname">sd</td><td>instance of a SerDe </td></tr>
<tr><td class="paramname">allocator</td><td>instance of an Allocator </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an instance of a union </dd></dl>
</div>
</div>
<a id="aed372241c10ffd041bee85602edb199a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed372241c10ffd041bee85602edb199a">&#9670;&nbsp;</a></span>to_string()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string&lt; A &gt; to_string</td>
</tr>
</table>
</div><div class="memdoc">
<p>Prints a summary of the union as a string. </p>
<dl class="section return"><dt>Returns</dt><dd>the summary as a string </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>sampling/include/<a class="el" href="var__opt__sketch_8hpp_source.html">var_opt_sketch.hpp</a></li>
<li>sampling/include/<a class="el" href="var__opt__union_8hpp_source.html">var_opt_union.hpp</a></li>
<li>sampling/include/<a class="el" href="var__opt__union__impl_8hpp_source.html">var_opt_union_impl.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>