1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
|
<!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.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BitMagic-C++: bm::rank_compressor< BV > 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="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">BitMagic-C++
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<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&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacebm.html">bm</a></li><li class="navelem"><a class="el" href="classbm_1_1rank__compressor.html">rank_compressor</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">bm::rank_compressor< BV > Class Template Reference<div class="ingroups"><a class="el" href="group__bmagic.html">BitMagic Library</a> » <a class="el" href="group__bvector.html">bvector<> container</a> » <a class="el" href="group__setalgo.html">bvector<> algorithms</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Algorithms for rank compression of bit-vector.
<a href="classbm_1_1rank__compressor.html#details">More...</a></p>
<p><code>#include <<a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for bm::rank_compressor< BV >:</div>
<div class="dyncontent">
<div class="center"><img src="classbm_1_1rank__compressor__inherit__graph.png" border="0" usemap="#bm_1_1rank__compressor_3_01BV_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="bm_1_1rank__compressor_3_01BV_01_4_inherit__map" id="bm_1_1rank__compressor_3_01BV_01_4_inherit__map">
<area shape="rect" title="Algorithms for rank compression of bit-vector." alt="" coords="5,5,153,47"/>
<area shape="rect" href="classbm_1_1rank__compressor.html" title=" " alt="" coords="5,109,153,151"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a5679f4467161dc8f79319d9567c9788a"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classbm_1_1rank__compressor.html#a5679f4467161dc8f79319d9567c9788a">buffer_cap</a> { <a class="el" href="classbm_1_1rank__compressor.html#a5679f4467161dc8f79319d9567c9788aa55db2bd669ffae10c0d9d74d7bf35744">n_buffer_cap</a> = 1024
}</td></tr>
<tr class="separator:a5679f4467161dc8f79319d9567c9788a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5f529c238713832c166c72ccfc847533"><td class="memItemLeft" align="right" valign="top">typedef BV </td><td class="memItemRight" valign="bottom"><a class="el" href="classbm_1_1rank__compressor.html#a5f529c238713832c166c72ccfc847533">bvector_type</a></td></tr>
<tr class="separator:a5f529c238713832c166c72ccfc847533"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a805eff657a6285d1c7168988fa4f48e1"><td class="memItemLeft" align="right" valign="top">typedef BV::size_type </td><td class="memItemRight" valign="bottom"><a class="el" href="classbm_1_1rank__compressor.html#a805eff657a6285d1c7168988fa4f48e1">size_type</a></td></tr>
<tr class="separator:a805eff657a6285d1c7168988fa4f48e1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae2160f0764c5fa4665f412e73aa92295"><td class="memItemLeft" align="right" valign="top">typedef BV::rs_index_type </td><td class="memItemRight" valign="bottom"><a class="el" href="classbm_1_1rank__compressor.html#ae2160f0764c5fa4665f412e73aa92295">rs_index_type</a></td></tr>
<tr class="separator:ae2160f0764c5fa4665f412e73aa92295"><td class="memSeparator" colspan="2"> </td></tr>
</table><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:a42f314905fb8119d0bd574c4765f31fe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbm_1_1rank__compressor.html#a42f314905fb8119d0bd574c4765f31fe">decompress</a> (BV &bv_target, const BV &bv_idx, const BV &bv_src)</td></tr>
<tr class="memdesc:a42f314905fb8119d0bd574c4765f31fe"><td class="mdescLeft"> </td><td class="mdescRight">Rank decompression. <a href="classbm_1_1rank__compressor.html#a42f314905fb8119d0bd574c4765f31fe">More...</a><br /></td></tr>
<tr class="separator:a42f314905fb8119d0bd574c4765f31fe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad915e9f0fb1862c3f05cbe36229cfc45"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbm_1_1rank__compressor.html#ad915e9f0fb1862c3f05cbe36229cfc45">compress</a> (BV &bv_target, const BV &bv_idx, const BV &bv_src)</td></tr>
<tr class="memdesc:ad915e9f0fb1862c3f05cbe36229cfc45"><td class="mdescLeft"> </td><td class="mdescRight">Rank compression algorithm based on two palallel iterators/enumerators set of source vector gets re-mapped in accord with the index/rank vector. <a href="classbm_1_1rank__compressor.html#ad915e9f0fb1862c3f05cbe36229cfc45">More...</a><br /></td></tr>
<tr class="separator:ad915e9f0fb1862c3f05cbe36229cfc45"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a59956fb7f893a11bd7ed963fc7ef5cca"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbm_1_1rank__compressor.html#a59956fb7f893a11bd7ed963fc7ef5cca">compress_by_source</a> (BV &bv_target, const BV &bv_idx, const <a class="el" href="classbm_1_1rank__compressor.html#ae2160f0764c5fa4665f412e73aa92295">rs_index_type</a> &bc_idx, const BV &bv_src)</td></tr>
<tr class="memdesc:a59956fb7f893a11bd7ed963fc7ef5cca"><td class="mdescLeft"> </td><td class="mdescRight">Source vector priority + index based rank. <a href="classbm_1_1rank__compressor.html#a59956fb7f893a11bd7ed963fc7ef5cca">More...</a><br /></td></tr>
<tr class="separator:a59956fb7f893a11bd7ed963fc7ef5cca"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template<typename BV><br />
class bm::rank_compressor< BV ></h3>
<p>Algorithms for rank compression of bit-vector. </p>
<ol type="1">
<li>Source vector (bv_src) is a subset of index vector (bv_idx)</li>
<li>As a subset it can be collapsed using bit-rank method, where each position in the source vector is defined by population count (range) [0..index_position] (count_range()) As a result all integer set of source vector gets re-mapped in accord with the index vector. </li>
</ol>
<p class="definition">Definition at line <a class="el" href="bmalgo_8h_source.html#l00407">407</a> of file <a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a5f529c238713832c166c72ccfc847533"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f529c238713832c166c72ccfc847533">◆ </a></span>bvector_type</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename BV > </div>
<table class="memname">
<tr>
<td class="memname">typedef BV <a class="el" href="classbm_1_1rank__compressor.html">bm::rank_compressor</a>< BV >::<a class="el" href="classbm_1_1rank__compressor.html#a5f529c238713832c166c72ccfc847533">bvector_type</a></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="bmalgo_8h_source.html#l00410">410</a> of file <a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>.</p>
</div>
</div>
<a id="ae2160f0764c5fa4665f412e73aa92295"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2160f0764c5fa4665f412e73aa92295">◆ </a></span>rs_index_type</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename BV > </div>
<table class="memname">
<tr>
<td class="memname">typedef BV::rs_index_type <a class="el" href="classbm_1_1rank__compressor.html">bm::rank_compressor</a>< BV >::<a class="el" href="classbm_1_1rank__compressor.html#ae2160f0764c5fa4665f412e73aa92295">rs_index_type</a></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="bmalgo_8h_source.html#l00412">412</a> of file <a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>.</p>
</div>
</div>
<a id="a805eff657a6285d1c7168988fa4f48e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a805eff657a6285d1c7168988fa4f48e1">◆ </a></span>size_type</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename BV > </div>
<table class="memname">
<tr>
<td class="memname">typedef BV::size_type <a class="el" href="classbm_1_1rank__compressor.html">bm::rank_compressor</a>< BV >::<a class="el" href="classbm_1_1rank__compressor.html#a805eff657a6285d1c7168988fa4f48e1">size_type</a></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="bmalgo_8h_source.html#l00411">411</a> of file <a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a5679f4467161dc8f79319d9567c9788a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5679f4467161dc8f79319d9567c9788a">◆ </a></span>buffer_cap</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename BV > </div>
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classbm_1_1rank__compressor.html#a5679f4467161dc8f79319d9567c9788a">bm::rank_compressor::buffer_cap</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a5679f4467161dc8f79319d9567c9788aa55db2bd669ffae10c0d9d74d7bf35744"></a>n_buffer_cap </td><td class="fielddoc"></td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="bmalgo_8h_source.html#l00413">413</a> of file <a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ad915e9f0fb1862c3f05cbe36229cfc45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad915e9f0fb1862c3f05cbe36229cfc45">◆ </a></span>compress()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class BV > </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classbm_1_1rank__compressor.html">bm::rank_compressor</a>< BV >::compress </td>
<td>(</td>
<td class="paramtype">BV & </td>
<td class="paramname"><em>bv_target</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const BV & </td>
<td class="paramname"><em>bv_idx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const BV & </td>
<td class="paramname"><em>bv_src</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Rank compression algorithm based on two palallel iterators/enumerators set of source vector gets re-mapped in accord with the index/rank vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bv_target</td><td>- target bit-vector </td></tr>
<tr><td class="paramname">bv_idx</td><td>- index (rank) vector used for address recalculation </td></tr>
<tr><td class="paramname">bv_src</td><td>- source vector for re-mapping </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="bmalgo_8h_source.html#l00452">452</a> of file <a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="bmsparsevec__compr_8h_source.html#l00889">bm::rsc_sparse_vector< Val, SV >::load_from()</a>.</p>
</div>
</div>
<a id="a59956fb7f893a11bd7ed963fc7ef5cca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59956fb7f893a11bd7ed963fc7ef5cca">◆ </a></span>compress_by_source()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class BV > </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classbm_1_1rank__compressor.html">bm::rank_compressor</a>< BV >::compress_by_source </td>
<td>(</td>
<td class="paramtype">BV & </td>
<td class="paramname"><em>bv_target</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const BV & </td>
<td class="paramname"><em>bv_idx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classbm_1_1rank__compressor.html#ae2160f0764c5fa4665f412e73aa92295">rs_index_type</a> & </td>
<td class="paramname"><em>bc_idx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const BV & </td>
<td class="paramname"><em>bv_src</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Source vector priority + index based rank. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classbm_1_1rank__compressor.html#ad915e9f0fb1862c3f05cbe36229cfc45" title="Rank compression algorithm based on two palallel iterators/enumerators set of source vector gets re-m...">compress</a> </dd></dl>
<p>Rank compressor visitor (functor)</p>
<p class="definition">Definition at line <a class="el" href="bmalgo_8h_source.html#l00602">602</a> of file <a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>.</p>
</div>
</div>
<a id="a42f314905fb8119d0bd574c4765f31fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42f314905fb8119d0bd574c4765f31fe">◆ </a></span>decompress()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class BV > </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classbm_1_1rank__compressor.html">bm::rank_compressor</a>< BV >::decompress </td>
<td>(</td>
<td class="paramtype">BV & </td>
<td class="paramname"><em>bv_target</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const BV & </td>
<td class="paramname"><em>bv_idx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const BV & </td>
<td class="paramname"><em>bv_src</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Rank decompression. </p>
<p class="definition">Definition at line <a class="el" href="bmalgo_8h_source.html#l00525">525</a> of file <a class="el" href="bmalgo_8h_source.html">bmalgo.h</a>.</p>
<p class="reference">Referenced by <a class="el" href="bmsparsevec__compr_8h_source.html#l00930">bm::rsc_sparse_vector< Val, SV >::load_to()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="bmalgo_8h_source.html">bmalgo.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
|