File: a00075.html

package info (click to toggle)
bmagic 3.4.0-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,208 kB
  • ctags: 2,500
  • sloc: cpp: 9,399; ansic: 3,142; sh: 2,430; makefile: 340
file content (248 lines) | stat: -rw-r--r-- 16,694 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>BitMagic: bmalgo.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="examples.html">Examples</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">src</a></div>
<h1>bmalgo.h File Reference</h1><code>#include "<a class="el" href="a00102.html">bm.h</a>"</code><br>
<code>#include "<a class="el" href="a00106.html">bmfunc.h</a>"</code><br>
<code>#include "<a class="el" href="a00105.html">bmdef.h</a>"</code><br>
<code>#include "<a class="el" href="a00108.html">bmundef.h</a>"</code><br>

<p>
Include dependency graph for bmalgo.h:<p><center><img src="a00131.png" border="0" usemap="#bmalgo.h_map" alt=""></center>
<map name="bmalgo.h_map">
<area href="a00074.html" shape="rect" coords="129,328,169,349" alt="">
<area href="a00077.html" shape="rect" coords="228,5,284,27" alt="">
<area href="a00078.html" shape="rect" coords="224,555,288,576" alt="">
<area href="a00080.html" shape="rect" coords="220,600,292,621" alt="">
<area href="a00076.html" shape="rect" coords="221,96,291,117" alt="">
<area href="a00079.html" shape="rect" coords="224,192,288,213" alt="">
<area href="a00081.html" shape="rect" coords="223,328,289,349" alt="">
<area href="a00082.html" shape="rect" coords="220,237,292,259" alt="">
</map>

<p>
This graph shows which files directly or indirectly include this file:<p><center><img src="a00132.png" border="0" usemap="#bmalgo.hdep_map" alt=""></center>
<map name="bmalgo.hdep_map">
<area href="a00091.html" shape="rect" coords="129,5,217,26" alt="">
</map>

<p>
<a href="a00103.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html">bm</a></td></tr>

<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00101.html#ga5">distance_metric</a> { <br>
&nbsp;&nbsp;<a class="el" href="a00101.html#gga5a36">COUNT_AND</a>, 
<a class="el" href="a00101.html#gga5a37">COUNT_XOR</a>, 
<a class="el" href="a00101.html#gga5a38">COUNT_OR</a>, 
<a class="el" href="a00101.html#gga5a39">COUNT_SUB_AB</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="a00101.html#gga5a40">COUNT_SUB_BA</a>, 
<a class="el" href="a00101.html#gga5a41">COUNT_A</a>, 
<a class="el" href="a00101.html#gga5a42">COUNT_B</a>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Distance metrics codes defined for vectors A and B.  <a href="a00101.html#ga5">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#a146">combine_count_operation_with_block</a> (const <a class="el" href="a00092.html#a10">bm::word_t</a> *blk, unsigned gap, const <a class="el" href="a00092.html#a10">bm::word_t</a> *arg_blk, int arg_gap, <a class="el" href="a00092.html#a10">bm::word_t</a> *temp_blk, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal function computes different distance metrics.  <a href="#a146"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00101.html#ga0">distance_operation</a> (const BV &amp;bv1, const BV &amp;bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Distance computing template function.  <a href="a00101.html#ga0"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00092.html#a9">bm::id_t</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00101.html#ga1">count_and</a> (const BV &amp;bv1, const BV &amp;bv2)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes bitcount of AND operation of two bitsets.  <a href="a00101.html#ga1"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00092.html#a9">bm::id_t</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00101.html#ga2">count_xor</a> (const BV &amp;bv1, const BV &amp;bv2)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes bitcount of XOR operation of two bitsets.  <a href="a00101.html#ga2"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00092.html#a9">bm::id_t</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00101.html#ga3">count_sub</a> (const BV &amp;bv1, const BV &amp;bv2)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes bitcount of SUB operation of two bitsets.  <a href="a00101.html#ga3"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00092.html#a9">bm::id_t</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00101.html#ga4">count_or</a> (const BV &amp;bv1, const BV &amp;bv2)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes bitcount of OR operation of two bitsets.  <a href="a00101.html#ga4"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class It&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">It&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00092.html#a152">block_range_scan</a> (It first, It last, unsigned nblock, unsigned *max_id)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal algorithms scans the input for the block range limit.  <a href="#a152"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV, class It&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00100.html#ga0">combine_or</a> (BV &amp;bv, It first, It last)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">OR Combine bitvector and the iterable sequence.  <a href="a00100.html#ga0"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV, class It&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00100.html#ga1">combine_xor</a> (BV &amp;bv, It first, It last)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">XOR Combine bitvector and the iterable sequence.  <a href="a00100.html#ga1"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV, class It&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00100.html#ga2">combine_sub</a> (BV &amp;bv, It first, It last)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">SUB Combine bitvector and the iterable sequence.  <a href="a00100.html#ga2"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV, class It&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00100.html#ga3">combine_and</a> (BV &amp;bv, It first, It last)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">AND Combine bitvector and the iterable sequence.  <a href="a00100.html#ga3"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="a00092.html#a9">bm::id_t</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00100.html#ga4">count_intervals</a> (const BV &amp;bv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute number of bit intervals (GAPs) in the bitvector.  <a href="a00100.html#ga4"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class BV, class It&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00100.html#ga5">export_array</a> (BV &amp;bv, It first, It last)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Export bitset from an array of binary data representing the bit vector.  <a href="a00100.html#ga5"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="file_a152" doxytag="bmalgo.h::block_range_scan"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="mdPrefix" colspan="4">
template&lt;class It&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top">It block_range_scan           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">It&nbsp;</td>
          <td class="mdname" nowrap> <em>first</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>It&nbsp;</td>
          <td class="mdname" nowrap> <em>last</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>nblock</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned *&nbsp;</td>
          <td class="mdname" nowrap> <em>max_id</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Internal algorithms scans the input for the block range limit. 
<p>

<p>
Definition at line <a class="el" href="a00103.html#l00520">520</a> of file <a class="el" href="a00103.html">bmalgo.h</a>.
<p>
References <a class="el" href="a00105.html#l00014">BM_ASSERT</a>.
<p>
Referenced by <a class="el" href="a00103.html#l00550">bm::combine_or()</a>, <a class="el" href="a00103.html#l00707">bm::combine_sub()</a>, and <a class="el" href="a00103.html#l00626">bm::combine_xor()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="file_a146" doxytag="bmalgo.h::combine_count_operation_with_block"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void combine_count_operation_with_block           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a00092.html#a10">bm::word_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>blk</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>gap</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <a class="el" href="a00092.html#a10">bm::word_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>arg_blk</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>arg_gap</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="a00092.html#a10">bm::word_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>temp_blk</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>distance_metric_descriptor *&nbsp;</td>
          <td class="mdname" nowrap> <em>dmit</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>distance_metric_descriptor *&nbsp;</td>
          <td class="mdname" nowrap> <em>dmit_end</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Internal function computes different distance metrics. 
<p>

<p>
Definition at line <a class="el" href="a00103.html#l00099">99</a> of file <a class="el" href="a00103.html">bmalgo.h</a>.
<p>
References <a class="el" href="a00106.html#l02021">bm::bit_block_calc_count()</a>, <a class="el" href="a00106.html#l02728">bm::bit_operation_and_count()</a>, <a class="el" href="a00106.html#l02781">bm::bit_operation_or_count()</a>, <a class="el" href="a00106.html#l02752">bm::bit_operation_sub_count()</a>, <a class="el" href="a00106.html#l03081">bm::bit_operation_xor_count()</a>, <a class="el" href="a00105.html#l00057">BMGAP_PTR</a>, <a class="el" href="a00106.html#l00547">bm::gap_bit_count()</a>, <a class="el" href="a00106.html#l01280">bm::gap_bitset_and_count()</a>, <a class="el" href="a00106.html#l01390">bm::gap_bitset_or_count()</a>, <a class="el" href="a00106.html#l01316">bm::gap_bitset_sub_count()</a>, <a class="el" href="a00106.html#l01350">bm::gap_bitset_xor_count()</a>, <a class="el" href="a00106.html#l01456">bm::gap_convert_to_bitset()</a>, <a class="el" href="a00106.html#l02357">bm::gap_operation_and()</a>, <a class="el" href="a00106.html#l02408">bm::gap_operation_or()</a>, <a class="el" href="a00106.html#l02440">bm::gap_operation_sub()</a>, <a class="el" href="a00106.html#l02382">bm::gap_operation_xor()</a>, <a class="el" href="a00103.html#l00070">bm::distance_metric_descriptor::metric</a>, and <a class="el" href="a00103.html#l00071">bm::distance_metric_descriptor::result</a>.
<p>
Referenced by <a class="el" href="a00103.html#l00352">bm::distance_operation()</a>.    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Thu Apr 20 13:29:00 2006 for BitMagic by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>
</body>
</html>