1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
<title>BitMagic: sample2.cpp Source File</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.5 -->
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
<title>BitMagic: Distance metrics</title>
6
<link href="tabs.css" rel="stylesheet" type="text/css"/>
7
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10
<!-- Generated by Doxygen 1.6.1 -->
8
11
<div class="navigation" id="top">
11
14
<li><a href="index.html"><span>Main Page</span></a></li>
12
15
<li><a href="modules.html"><span>Modules</span></a></li>
13
16
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
14
<li><a href="classes.html"><span>Data Structures</span></a></li>
15
<li class="current"><a href="files.html"><span>Files</span></a></li>
17
<li><a href="annotated.html"><span>Data Structures</span></a></li>
18
<li><a href="files.html"><span>Files</span></a></li>
16
19
<li><a href="examples.html"><span>Examples</span></a></li>
19
<h1>sample2.cpp</h1><a href="a00098.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
20
<a name="l00002"></a>00002 <span class="comment">Copyright(c) 2002-2005 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com)</span>
21
<a name="l00003"></a>00003 <span class="comment"></span>
22
<a name="l00004"></a>00004 <span class="comment">Permission is hereby granted, free of charge, to any person </span>
23
<a name="l00005"></a>00005 <span class="comment">obtaining a copy of this software and associated documentation </span>
24
<a name="l00006"></a>00006 <span class="comment">files (the "Software"), to deal in the Software without restriction, </span>
25
<a name="l00007"></a>00007 <span class="comment">including without limitation the rights to use, copy, modify, merge, </span>
26
<a name="l00008"></a>00008 <span class="comment">publish, distribute, sublicense, and/or sell copies of the Software, </span>
27
<a name="l00009"></a>00009 <span class="comment">and to permit persons to whom the Software is furnished to do so, </span>
28
<a name="l00010"></a>00010 <span class="comment">subject to the following conditions:</span>
29
<a name="l00011"></a>00011 <span class="comment"></span>
30
<a name="l00012"></a>00012 <span class="comment">The above copyright notice and this permission notice shall be included </span>
31
<a name="l00013"></a>00013 <span class="comment">in all copies or substantial portions of the Software.</span>
32
<a name="l00014"></a>00014 <span class="comment"></span>
33
<a name="l00015"></a>00015 <span class="comment">THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, </span>
34
<a name="l00016"></a>00016 <span class="comment">EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES </span>
35
<a name="l00017"></a>00017 <span class="comment">OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. </span>
36
<a name="l00018"></a>00018 <span class="comment">IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, </span>
37
<a name="l00019"></a>00019 <span class="comment">DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, </span>
38
<a name="l00020"></a>00020 <span class="comment">ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR </span>
39
<a name="l00021"></a>00021 <span class="comment">OTHER DEALINGS IN THE SOFTWARE.</span>
40
<a name="l00022"></a>00022 <span class="comment">*/</span>
41
<a name="l00023"></a>00023 <span class="comment"></span>
42
<a name="l00024"></a>00024 <span class="comment">/** \example sample2.cpp</span>
43
<a name="l00025"></a>00025 <span class="comment"> Example demonstrates using set operations AND, OR, XOR, etc.</span>
44
<a name="l00026"></a>00026 <span class="comment"> For more information please visit: http://bmagic.sourceforge.net</span>
45
<a name="l00027"></a>00027 <span class="comment"> </span>
46
<a name="l00028"></a>00028 <span class="comment">*/</span>
47
<a name="l00029"></a>00029
48
<a name="l00030"></a>00030
49
<a name="l00031"></a>00031 <span class="preprocessor">#include <iostream></span>
50
<a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="a00082.html">bm.h</a>"</span>
51
<a name="l00033"></a>00033
52
<a name="l00034"></a>00034 <span class="keyword">using namespace </span>std;
53
<a name="l00035"></a>00035
54
<a name="l00036"></a><a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">00036</a> <span class="keywordtype">void</span> <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(<span class="keyword">const</span> <a class="code" href="a00040.html" title="bitvector with runtime compression of bits.">bm::bvector<></a>& bv)
55
<a name="l00037"></a>00037 {
56
<a name="l00038"></a>00038 <span class="keywordtype">unsigned</span> value = bv.<a class="code" href="a00040.html#f3129b35cabf0554d85711c085a8616d" title="Gets number of first bit which is ON.">get_first</a>();
57
<a name="l00039"></a>00039 <span class="keywordflow">do</span>
58
<a name="l00040"></a>00040 {
59
<a name="l00041"></a>00041 cout << value;
60
<a name="l00042"></a>00042 value = bv.<a class="code" href="a00040.html#def9c095a682a9857068c280e37c8240" title="Finds the number of the next bit ON.">get_next</a>(value);
61
<a name="l00043"></a>00043 <span class="keywordflow">if</span> (value)
62
<a name="l00044"></a>00044 {
63
<a name="l00045"></a>00045 cout << <span class="stringliteral">","</span>;
64
<a name="l00046"></a>00046 }
65
<a name="l00047"></a>00047 <span class="keywordflow">else</span>
66
<a name="l00048"></a>00048 {
67
<a name="l00049"></a>00049 <span class="keywordflow">break</span>;
68
<a name="l00050"></a>00050 }
69
<a name="l00051"></a>00051 } <span class="keywordflow">while</span>(1);
70
<a name="l00052"></a>00052 cout << endl;
71
<a name="l00053"></a>00053 }
72
<a name="l00054"></a>00054
73
<a name="l00055"></a><a class="code" href="a00098.html#840291bc02cba5474a4cb46a9b9566fe">00055</a> <span class="keywordtype">int</span> <a class="code" href="a00097.html#840291bc02cba5474a4cb46a9b9566fe">main</a>(<span class="keywordtype">void</span>)
74
<a name="l00056"></a>00056 {
75
<a name="l00057"></a>00057 <a class="code" href="a00040.html" title="bitvector with runtime compression of bits.">bm::bvector<></a> bv1;
76
<a name="l00058"></a>00058 <a class="code" href="a00040.html" title="bitvector with runtime compression of bits.">bm::bvector<></a> bv2;
77
<a name="l00059"></a>00059 <a class="code" href="a00040.html" title="bitvector with runtime compression of bits.">bm::bvector<></a> bv3;
78
<a name="l00060"></a>00060
79
<a name="l00061"></a>00061 bv1.<a class="code" href="a00040.html#bc85ec9da74de03ff7e2a6c836656dd8" title="Sets bit n if val is true, clears bit n if val is false.">set</a>(10);
80
<a name="l00062"></a>00062 bv1.<a class="code" href="a00040.html#bc85ec9da74de03ff7e2a6c836656dd8" title="Sets bit n if val is true, clears bit n if val is false.">set</a>(100);
81
<a name="l00063"></a>00063 bv1.<a class="code" href="a00040.html#bc85ec9da74de03ff7e2a6c836656dd8" title="Sets bit n if val is true, clears bit n if val is false.">set</a>(1000000);
82
<a name="l00064"></a>00064
83
<a name="l00065"></a>00065
84
<a name="l00066"></a>00066 bv2.<a class="code" href="a00040.html#bc85ec9da74de03ff7e2a6c836656dd8" title="Sets bit n if val is true, clears bit n if val is false.">set</a>(10);
85
<a name="l00067"></a>00067 bv2.<a class="code" href="a00040.html#bc85ec9da74de03ff7e2a6c836656dd8" title="Sets bit n if val is true, clears bit n if val is false.">set</a>(100);
86
<a name="l00068"></a>00068
87
<a name="l00069"></a>00069 <span class="comment">// Logical AND operation on bv2 (bv1 is the argument)</span>
88
<a name="l00070"></a>00070 <span class="comment">// bv2 = bv2 AND bv1</span>
89
<a name="l00071"></a>00071
90
<a name="l00072"></a>00072 bv3 = bv1 & bv2;
91
<a name="l00073"></a>00073 <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(bv3);
92
<a name="l00074"></a>00074
93
<a name="l00075"></a>00075 bv2 &= bv1; <span class="comment">// You also can use: bv2.bit_and(bv1);</span>
94
<a name="l00076"></a>00076 <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(bv2);
95
<a name="l00077"></a>00077
96
<a name="l00078"></a>00078 <span class="comment">// bv2 = bv2 OR bv1</span>
97
<a name="l00079"></a>00079
98
<a name="l00080"></a>00080 bv3 = bv1 | bv2;
99
<a name="l00081"></a>00081 <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(bv3);
100
<a name="l00082"></a>00082
101
<a name="l00083"></a>00083 bv2 |= bv1; <span class="comment">// You can also use: bv2.bit_or(bv1);</span>
102
<a name="l00084"></a>00084 <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(bv2);
103
<a name="l00085"></a>00085
104
<a name="l00086"></a>00086
105
<a name="l00087"></a>00087 bv1.<a class="code" href="a00040.html#bc85ec9da74de03ff7e2a6c836656dd8" title="Sets bit n if val is true, clears bit n if val is false.">set</a>(1000000, <span class="keyword">false</span>);
106
<a name="l00088"></a>00088
107
<a name="l00089"></a>00089 <span class="comment">// bv2 = bv2 SUB bv1</span>
108
<a name="l00090"></a>00090
109
<a name="l00091"></a>00091 bv3 = bv2 - bv1;
110
<a name="l00092"></a>00092 <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(bv3);
111
<a name="l00093"></a>00093
112
<a name="l00094"></a>00094 bv2 -= bv1; <span class="comment">// You can also use: bv2.bit_sub(bv1);</span>
113
<a name="l00095"></a>00095 <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(bv2);
114
<a name="l00096"></a>00096
115
<a name="l00097"></a>00097 <span class="comment">// bv2 XOR bv1</span>
116
<a name="l00098"></a>00098
117
<a name="l00099"></a>00099 bv3 = bv2 ^ bv1;
118
<a name="l00100"></a>00100 <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(bv3);
119
<a name="l00101"></a>00101
120
<a name="l00102"></a>00102 bv2 ^= bv1; <span class="comment">// You can also use: bv2.bit_xor(bv1);</span>
121
<a name="l00103"></a>00103 <a class="code" href="a00098.html#9682c30f1b194905b7c04449fdcda1e2">print_bvector</a>(bv2);
122
<a name="l00104"></a>00104
123
<a name="l00105"></a>00105 <span class="comment">// For lexicographical comparison there is set of overloaded</span>
124
<a name="l00106"></a>00106 <span class="comment">// operators and function compare.</span>
125
<a name="l00107"></a>00107
126
<a name="l00108"></a>00108 <span class="keywordflow">if</span> (bv2 == bv3)
127
<a name="l00109"></a>00109 {
128
<a name="l00110"></a>00110 cerr << <span class="stringliteral">"Equivalent. Comparison result = "</span>
129
<a name="l00111"></a>00111 << bv2.compare(bv3) << endl;
130
<a name="l00112"></a>00112 }
131
<a name="l00113"></a>00113 <span class="keywordflow">else</span>
132
<a name="l00114"></a>00114 {
133
<a name="l00115"></a>00115 cout << <span class="stringliteral">"Error."</span> << endl;
134
<a name="l00116"></a>00116 <span class="keywordflow">return</span> 1;
135
<a name="l00117"></a>00117 }
136
<a name="l00118"></a>00118
137
<a name="l00119"></a>00119
138
<a name="l00120"></a>00120 <span class="keywordflow">return</span> 0;
139
<a name="l00121"></a>00121 }
141
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Oct 12 12:16:39 2009 for BitMagic by
23
<div class="contents">
24
<h1>Distance metrics<br/>
26
[<a class="el" href="a00119.html">Set algorithms</a>]</small>
28
<p><div class="dynheader">
29
Collaboration diagram for Distance metrics:</div>
30
<div class="dynsection">
31
<center><table><tr><td><img src="a00120.png" border="0" alt="" usemap="#a00120_map"/>
32
<map name="a00120_map" id="a00120">
33
<area shape="rect" href="a00119.html" title="Set algorithms" alt="" coords="7,5,111,35"/></map></td></tr></table></center>
36
<table border="0" cellpadding="0" cellspacing="0">
37
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
38
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#gac38d64c8b27b652413a664cddd4d40ab">bm::distance_metric</a> { <br/>
39
<a class="el" href="a00120.html#ggac38d64c8b27b652413a664cddd4d40abacb39376469ba778e9a9099ddbae5e7ce">bm::COUNT_AND</a> = set_COUNT_AND,
40
<a class="el" href="a00120.html#ggac38d64c8b27b652413a664cddd4d40aba3e4861dde6e1179457ee0d3502ae8061">bm::COUNT_XOR</a> = set_COUNT_XOR,
41
<a class="el" href="a00120.html#ggac38d64c8b27b652413a664cddd4d40abad0bd2d56c8ebd03f55c01b3cc6faaaeb">bm::COUNT_OR</a> = set_COUNT_OR,
42
<a class="el" href="a00120.html#ggac38d64c8b27b652413a664cddd4d40aba9c101dab8904c0432f72ccce0a207e62">bm::COUNT_SUB_AB</a> = set_COUNT_SUB_AB,
44
<a class="el" href="a00120.html#ggac38d64c8b27b652413a664cddd4d40abafa036fb9d54bc659ed3c9e4185ccf400">bm::COUNT_SUB_BA</a> = set_COUNT_SUB_BA,
45
<a class="el" href="a00120.html#ggac38d64c8b27b652413a664cddd4d40abaac7947d53eb3acf81251ee4130e6a4a2">bm::COUNT_A</a> = set_COUNT_A,
46
<a class="el" href="a00120.html#ggac38d64c8b27b652413a664cddd4d40abac6dbadf2ab9405daa47dc0f10d082516">bm::COUNT_B</a> = set_COUNT_B
49
<tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Distance metrics codes defined for vectors A and B. </p>
50
<a href="a00120.html#gac38d64c8b27b652413a664cddd4d40ab">More...</a><br/></td></tr>
51
<tr><td colspan="2"><h2>Functions</h2></td></tr>
52
<tr><td class="memItemLeft" align="right" valign="top">distance_metric </td><td class="memItemRight" valign="bottom"><a class="el" href="a00120.html#ga158946ea41ca66c3e1bca62c92684788">bm::operation2metric</a> (set_operation op)</td></tr>
53
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert set operation into compatible distance metric. <a href="#ga158946ea41ca66c3e1bca62c92684788"></a><br/></td></tr>
54
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
55
<tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#ga815fef76f02576ab9ab58de0a45d8a4b">bm::distance_operation</a> (const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)</td></tr>
56
<tr><td class="mdescLeft"> </td><td class="mdescRight">Distance computing template function. <a href="#ga815fef76f02576ab9ab58de0a45d8a4b"></a><br/></td></tr>
57
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
58
<tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#gaa66525fd7a3f823d73678252a235982e">bm::distance_operation_any</a> (const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)</td></tr>
59
<tr><td class="mdescLeft"> </td><td class="mdescRight">Distance screening template function. <a href="#gaa66525fd7a3f823d73678252a235982e"></a><br/></td></tr>
60
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
61
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#gae451cb4b87e8c0859b0614d2ffb99737">bm::count_and</a> (const BV &bv1, const BV &bv2)</td></tr>
62
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes bitcount of AND operation of two bitsets. <a href="#gae451cb4b87e8c0859b0614d2ffb99737"></a><br/></td></tr>
63
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
64
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#ga2d5393e05bcfc540840a4cee67fb771f">bm::any_and</a> (const BV &bv1, const BV &bv2)</td></tr>
65
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes if there is any bit in AND operation of two bitsets. <a href="#ga2d5393e05bcfc540840a4cee67fb771f"></a><br/></td></tr>
66
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
67
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#gafc64a082dcaee07f70f7faf3e24f844e">bm::count_xor</a> (const BV &bv1, const BV &bv2)</td></tr>
68
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes bitcount of XOR operation of two bitsets. <a href="#gafc64a082dcaee07f70f7faf3e24f844e"></a><br/></td></tr>
69
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
70
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#ga2d63f41244b82d233acb53d88b326b82">bm::any_xor</a> (const BV &bv1, const BV &bv2)</td></tr>
71
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes if there is any bit in XOR operation of two bitsets. <a href="#ga2d63f41244b82d233acb53d88b326b82"></a><br/></td></tr>
72
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
73
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#ga902d8c1cd1f8a2538cd47d47f5d8d605">bm::count_sub</a> (const BV &bv1, const BV &bv2)</td></tr>
74
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes bitcount of SUB operation of two bitsets. <a href="#ga902d8c1cd1f8a2538cd47d47f5d8d605"></a><br/></td></tr>
75
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
76
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#gabde2e210b9b1edd190e1f5a9ff22344c">bm::any_sub</a> (const BV &bv1, const BV &bv2)</td></tr>
77
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes if there is any bit in SUB operation of two bitsets. <a href="#gabde2e210b9b1edd190e1f5a9ff22344c"></a><br/></td></tr>
78
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
79
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#ga803c564668703fc3bf80067570c2c905">bm::count_or</a> (const BV &bv1, const BV &bv2)</td></tr>
80
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes bitcount of OR operation of two bitsets. <a href="#ga803c564668703fc3bf80067570c2c905"></a><br/></td></tr>
81
<tr><td class="memTemplParams" colspan="2">template<class BV > </td></tr>
82
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00120.html#gaeda4f0cf54aa464cec09e740100caa79">bm::any_or</a> (const BV &bv1, const BV &bv2)</td></tr>
83
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes if there is any bit in OR operation of two bitsets. <a href="#gaeda4f0cf54aa464cec09e740100caa79"></a><br/></td></tr>
85
<hr/><a name="_details"></a><h2>Detailed Description</h2>
86
<p>Algorithms to compute binary distance metrics </p>
87
<hr/><h2>Enumeration Type Documentation</h2>
88
<a class="anchor" id="gac38d64c8b27b652413a664cddd4d40ab"></a><!-- doxytag: member="bm::distance_metric" ref="gac38d64c8b27b652413a664cddd4d40ab" args="" -->
90
<div class="memproto">
91
<table class="memname">
93
<td class="memname">enum <a class="el" href="a00120.html#gac38d64c8b27b652413a664cddd4d40ab">bm::distance_metric</a></td>
99
<p>Distance metrics codes defined for vectors A and B. </p>
100
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
101
<tr><td valign="top"><em><a class="anchor" id="ggac38d64c8b27b652413a664cddd4d40abacb39376469ba778e9a9099ddbae5e7ce"></a><!-- doxytag: member="COUNT_AND" ref="ggac38d64c8b27b652413a664cddd4d40abacb39376469ba778e9a9099ddbae5e7ce" args="" -->COUNT_AND</em> </td><td>
102
<p>(A & B).count() </p>
104
<tr><td valign="top"><em><a class="anchor" id="ggac38d64c8b27b652413a664cddd4d40aba3e4861dde6e1179457ee0d3502ae8061"></a><!-- doxytag: member="COUNT_XOR" ref="ggac38d64c8b27b652413a664cddd4d40aba3e4861dde6e1179457ee0d3502ae8061" args="" -->COUNT_XOR</em> </td><td>
105
<p>(A ^ B).count() </p>
107
<tr><td valign="top"><em><a class="anchor" id="ggac38d64c8b27b652413a664cddd4d40abad0bd2d56c8ebd03f55c01b3cc6faaaeb"></a><!-- doxytag: member="COUNT_OR" ref="ggac38d64c8b27b652413a664cddd4d40abad0bd2d56c8ebd03f55c01b3cc6faaaeb" args="" -->COUNT_OR</em> </td><td>
108
<p>(A | B).count() </p>
110
<tr><td valign="top"><em><a class="anchor" id="ggac38d64c8b27b652413a664cddd4d40aba9c101dab8904c0432f72ccce0a207e62"></a><!-- doxytag: member="COUNT_SUB_AB" ref="ggac38d64c8b27b652413a664cddd4d40aba9c101dab8904c0432f72ccce0a207e62" args="" -->COUNT_SUB_AB</em> </td><td>
111
<p>(A - B).count() </p>
113
<tr><td valign="top"><em><a class="anchor" id="ggac38d64c8b27b652413a664cddd4d40abafa036fb9d54bc659ed3c9e4185ccf400"></a><!-- doxytag: member="COUNT_SUB_BA" ref="ggac38d64c8b27b652413a664cddd4d40abafa036fb9d54bc659ed3c9e4185ccf400" args="" -->COUNT_SUB_BA</em> </td><td>
114
<p>(B - A).count() </p>
116
<tr><td valign="top"><em><a class="anchor" id="ggac38d64c8b27b652413a664cddd4d40abaac7947d53eb3acf81251ee4130e6a4a2"></a><!-- doxytag: member="COUNT_A" ref="ggac38d64c8b27b652413a664cddd4d40abaac7947d53eb3acf81251ee4130e6a4a2" args="" -->COUNT_A</em> </td><td>
119
<tr><td valign="top"><em><a class="anchor" id="ggac38d64c8b27b652413a664cddd4d40abac6dbadf2ab9405daa47dc0f10d082516"></a><!-- doxytag: member="COUNT_B" ref="ggac38d64c8b27b652413a664cddd4d40abac6dbadf2ab9405daa47dc0f10d082516" args="" -->COUNT_B</em> </td><td>
126
<p>Definition at line <a class="el" href="a00086_source.html#l00053">53</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
130
<hr/><h2>Function Documentation</h2>
131
<a class="anchor" id="ga2d5393e05bcfc540840a4cee67fb771f"></a><!-- doxytag: member="bm::any_and" ref="ga2d5393e05bcfc540840a4cee67fb771f" args="(const BV &bv1, const BV &bv2)" -->
132
<div class="memitem">
133
<div class="memproto">
134
<div class="memtemplate">
135
template<class BV > </div>
136
<table class="memname">
138
<td class="memname"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> bm::any_and </td>
140
<td class="paramtype">const BV & </td>
141
<td class="paramname"> <em>bv1</em>, </td>
144
<td class="paramkey"></td>
146
<td class="paramtype">const BV & </td>
147
<td class="paramname"> <em>bv2</em></td><td> </td>
152
<td></td><td></td><td><code> [inline]</code></td>
158
<p>Computes if there is any bit in AND operation of two bitsets. </p>
159
<dl><dt><b>Parameters:</b></dt><dd>
160
<table border="0" cellspacing="2" cellpadding="0">
161
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- Argument bit-vector. </td></tr>
162
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- Argument bit-vector. </td></tr>
166
<dl class="return"><dt><b>Returns:</b></dt><dd>non zero value if there is any bit </dd></dl>
168
<p>Definition at line <a class="el" href="a00086_source.html#l00959">959</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
170
<p>References <a class="el" href="a00086_source.html#l00055">bm::COUNT_AND</a>, <a class="el" href="a00086_source.html#l00807">bm::distance_operation_any()</a>, and <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>.</p>
174
<a class="anchor" id="gaeda4f0cf54aa464cec09e740100caa79"></a><!-- doxytag: member="bm::any_or" ref="gaeda4f0cf54aa464cec09e740100caa79" args="(const BV &bv1, const BV &bv2)" -->
175
<div class="memitem">
176
<div class="memproto">
177
<div class="memtemplate">
178
template<class BV > </div>
179
<table class="memname">
181
<td class="memname"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> bm::any_or </td>
183
<td class="paramtype">const BV & </td>
184
<td class="paramname"> <em>bv1</em>, </td>
187
<td class="paramkey"></td>
189
<td class="paramtype">const BV & </td>
190
<td class="paramname"> <em>bv2</em></td><td> </td>
195
<td></td><td></td><td><code> [inline]</code></td>
201
<p>Computes if there is any bit in OR operation of two bitsets. </p>
202
<dl><dt><b>Parameters:</b></dt><dd>
203
<table border="0" cellspacing="2" cellpadding="0">
204
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- Argument bit-vector. </td></tr>
205
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- Argument bit-vector. </td></tr>
209
<dl class="return"><dt><b>Returns:</b></dt><dd>non zero value if there is any bit </dd></dl>
211
<p>Definition at line <a class="el" href="a00086_source.html#l01061">1061</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
213
<p>References <a class="el" href="a00086_source.html#l00057">bm::COUNT_OR</a>, <a class="el" href="a00086_source.html#l00807">bm::distance_operation_any()</a>, and <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>.</p>
217
<a class="anchor" id="gabde2e210b9b1edd190e1f5a9ff22344c"></a><!-- doxytag: member="bm::any_sub" ref="gabde2e210b9b1edd190e1f5a9ff22344c" args="(const BV &bv1, const BV &bv2)" -->
218
<div class="memitem">
219
<div class="memproto">
220
<div class="memtemplate">
221
template<class BV > </div>
222
<table class="memname">
224
<td class="memname"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> bm::any_sub </td>
226
<td class="paramtype">const BV & </td>
227
<td class="paramname"> <em>bv1</em>, </td>
230
<td class="paramkey"></td>
232
<td class="paramtype">const BV & </td>
233
<td class="paramname"> <em>bv2</em></td><td> </td>
238
<td></td><td></td><td><code> [inline]</code></td>
244
<p>Computes if there is any bit in SUB operation of two bitsets. </p>
245
<dl><dt><b>Parameters:</b></dt><dd>
246
<table border="0" cellspacing="2" cellpadding="0">
247
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- Argument bit-vector. </td></tr>
248
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- Argument bit-vector. </td></tr>
252
<dl class="return"><dt><b>Returns:</b></dt><dd>non zero value if there is any bit </dd></dl>
254
<p>Definition at line <a class="el" href="a00086_source.html#l01028">1028</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
256
<p>References <a class="el" href="a00086_source.html#l00058">bm::COUNT_SUB_AB</a>, <a class="el" href="a00086_source.html#l00807">bm::distance_operation_any()</a>, and <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>.</p>
260
<a class="anchor" id="ga2d63f41244b82d233acb53d88b326b82"></a><!-- doxytag: member="bm::any_xor" ref="ga2d63f41244b82d233acb53d88b326b82" args="(const BV &bv1, const BV &bv2)" -->
261
<div class="memitem">
262
<div class="memproto">
263
<div class="memtemplate">
264
template<class BV > </div>
265
<table class="memname">
267
<td class="memname"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> bm::any_xor </td>
269
<td class="paramtype">const BV & </td>
270
<td class="paramname"> <em>bv1</em>, </td>
273
<td class="paramkey"></td>
275
<td class="paramtype">const BV & </td>
276
<td class="paramname"> <em>bv2</em></td><td> </td>
281
<td></td><td></td><td><code> [inline]</code></td>
287
<p>Computes if there is any bit in XOR operation of two bitsets. </p>
288
<dl><dt><b>Parameters:</b></dt><dd>
289
<table border="0" cellspacing="2" cellpadding="0">
290
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- Argument bit-vector. </td></tr>
291
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- Argument bit-vector. </td></tr>
295
<dl class="return"><dt><b>Returns:</b></dt><dd>non zero value if there is any bit </dd></dl>
297
<p>Definition at line <a class="el" href="a00086_source.html#l00993">993</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
299
<p>References <a class="el" href="a00086_source.html#l00056">bm::COUNT_XOR</a>, <a class="el" href="a00086_source.html#l00807">bm::distance_operation_any()</a>, and <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>.</p>
303
<a class="anchor" id="gae451cb4b87e8c0859b0614d2ffb99737"></a><!-- doxytag: member="bm::count_and" ref="gae451cb4b87e8c0859b0614d2ffb99737" args="(const BV &bv1, const BV &bv2)" -->
304
<div class="memitem">
305
<div class="memproto">
306
<div class="memtemplate">
307
template<class BV > </div>
308
<table class="memname">
310
<td class="memname"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> bm::count_and </td>
312
<td class="paramtype">const BV & </td>
313
<td class="paramname"> <em>bv1</em>, </td>
316
<td class="paramkey"></td>
318
<td class="paramtype">const BV & </td>
319
<td class="paramname"> <em>bv2</em></td><td> </td>
324
<td></td><td></td><td><code> [inline]</code></td>
330
<p>Computes bitcount of AND operation of two bitsets. </p>
331
<dl><dt><b>Parameters:</b></dt><dd>
332
<table border="0" cellspacing="2" cellpadding="0">
333
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- Argument bit-vector. </td></tr>
334
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- Argument bit-vector. </td></tr>
338
<dl class="return"><dt><b>Returns:</b></dt><dd>bitcount of the result </dd></dl>
339
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="a00009.html#a3">sample9.cpp</a>.</dd>
341
<p>Definition at line <a class="el" href="a00086_source.html#l00943">943</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
343
<p>References <a class="el" href="a00086_source.html#l00055">bm::COUNT_AND</a>, <a class="el" href="a00086_source.html#l00688">bm::distance_operation()</a>, and <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>.</p>
345
<p>Referenced by <a class="el" href="a00109_source.html#l00047">main()</a>.</p>
349
<a class="anchor" id="ga803c564668703fc3bf80067570c2c905"></a><!-- doxytag: member="bm::count_or" ref="ga803c564668703fc3bf80067570c2c905" args="(const BV &bv1, const BV &bv2)" -->
350
<div class="memitem">
351
<div class="memproto">
352
<div class="memtemplate">
353
template<class BV > </div>
354
<table class="memname">
356
<td class="memname"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> bm::count_or </td>
358
<td class="paramtype">const BV & </td>
359
<td class="paramname"> <em>bv1</em>, </td>
362
<td class="paramkey"></td>
364
<td class="paramtype">const BV & </td>
365
<td class="paramname"> <em>bv2</em></td><td> </td>
370
<td></td><td></td><td><code> [inline]</code></td>
376
<p>Computes bitcount of OR operation of two bitsets. </p>
377
<dl><dt><b>Parameters:</b></dt><dd>
378
<table border="0" cellspacing="2" cellpadding="0">
379
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- Argument bit-vector. </td></tr>
380
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- Argument bit-vector. </td></tr>
384
<dl class="return"><dt><b>Returns:</b></dt><dd>bitcount of the result </dd></dl>
386
<p>Definition at line <a class="el" href="a00086_source.html#l01045">1045</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
388
<p>References <a class="el" href="a00086_source.html#l00057">bm::COUNT_OR</a>, <a class="el" href="a00086_source.html#l00688">bm::distance_operation()</a>, and <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>.</p>
390
<p>Referenced by <a class="el" href="a00092_source.html#l02899">bm::iterator_deserializer< BV, SerialIterator >::deserialize()</a>.</p>
394
<a class="anchor" id="ga902d8c1cd1f8a2538cd47d47f5d8d605"></a><!-- doxytag: member="bm::count_sub" ref="ga902d8c1cd1f8a2538cd47d47f5d8d605" args="(const BV &bv1, const BV &bv2)" -->
395
<div class="memitem">
396
<div class="memproto">
397
<div class="memtemplate">
398
template<class BV > </div>
399
<table class="memname">
401
<td class="memname"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> bm::count_sub </td>
403
<td class="paramtype">const BV & </td>
404
<td class="paramname"> <em>bv1</em>, </td>
407
<td class="paramkey"></td>
409
<td class="paramtype">const BV & </td>
410
<td class="paramname"> <em>bv2</em></td><td> </td>
415
<td></td><td></td><td><code> [inline]</code></td>
421
<p>Computes bitcount of SUB operation of two bitsets. </p>
422
<dl><dt><b>Parameters:</b></dt><dd>
423
<table border="0" cellspacing="2" cellpadding="0">
424
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- Argument bit-vector. </td></tr>
425
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- Argument bit-vector. </td></tr>
429
<dl class="return"><dt><b>Returns:</b></dt><dd>bitcount of the result </dd></dl>
431
<p>Definition at line <a class="el" href="a00086_source.html#l01011">1011</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
433
<p>References <a class="el" href="a00086_source.html#l00058">bm::COUNT_SUB_AB</a>, <a class="el" href="a00086_source.html#l00688">bm::distance_operation()</a>, and <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>.</p>
437
<a class="anchor" id="gafc64a082dcaee07f70f7faf3e24f844e"></a><!-- doxytag: member="bm::count_xor" ref="gafc64a082dcaee07f70f7faf3e24f844e" args="(const BV &bv1, const BV &bv2)" -->
438
<div class="memitem">
439
<div class="memproto">
440
<div class="memtemplate">
441
template<class BV > </div>
442
<table class="memname">
444
<td class="memname"><a class="el" href="a00110.html#aa3824d882a037396370b16f2f0a8bf37">bm::id_t</a> bm::count_xor </td>
446
<td class="paramtype">const BV & </td>
447
<td class="paramname"> <em>bv1</em>, </td>
450
<td class="paramkey"></td>
452
<td class="paramtype">const BV & </td>
453
<td class="paramname"> <em>bv2</em></td><td> </td>
458
<td></td><td></td><td><code> [inline]</code></td>
464
<p>Computes bitcount of XOR operation of two bitsets. </p>
465
<dl><dt><b>Parameters:</b></dt><dd>
466
<table border="0" cellspacing="2" cellpadding="0">
467
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- Argument bit-vector. </td></tr>
468
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- Argument bit-vector. </td></tr>
472
<dl class="return"><dt><b>Returns:</b></dt><dd>bitcount of the result </dd></dl>
473
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="a00009.html#a2">sample9.cpp</a>.</dd>
475
<p>Definition at line <a class="el" href="a00086_source.html#l00977">977</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
477
<p>References <a class="el" href="a00086_source.html#l00056">bm::COUNT_XOR</a>, <a class="el" href="a00086_source.html#l00688">bm::distance_operation()</a>, and <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>.</p>
479
<p>Referenced by <a class="el" href="a00092_source.html#l02899">bm::iterator_deserializer< BV, SerialIterator >::deserialize()</a>, and <a class="el" href="a00109_source.html#l00047">main()</a>.</p>
483
<a class="anchor" id="ga815fef76f02576ab9ab58de0a45d8a4b"></a><!-- doxytag: member="bm::distance_operation" ref="ga815fef76f02576ab9ab58de0a45d8a4b" args="(const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)" -->
484
<div class="memitem">
485
<div class="memproto">
486
<div class="memtemplate">
487
template<class BV > </div>
488
<table class="memname">
490
<td class="memname">void bm::distance_operation </td>
492
<td class="paramtype">const BV & </td>
493
<td class="paramname"> <em>bv1</em>, </td>
496
<td class="paramkey"></td>
498
<td class="paramtype">const BV & </td>
499
<td class="paramname"> <em>bv2</em>, </td>
502
<td class="paramkey"></td>
504
<td class="paramtype">distance_metric_descriptor * </td>
505
<td class="paramname"> <em>dmit</em>, </td>
508
<td class="paramkey"></td>
510
<td class="paramtype">distance_metric_descriptor * </td>
511
<td class="paramname"> <em>dmit_end</em></td><td> </td>
516
<td></td><td></td><td><code> [inline]</code></td>
522
<p>Distance computing template function. </p>
523
<p>Function receives two bitvectors and an array of distance metrics (metrics pipeline). Function computes all metrics saves result into corresponding pipeline results (<a class="el" href="a00060.html#a94c955fe1ac46589d6edc8df7fd35cf6">distance_metric_descriptor::result</a>) An important detail is that function reuses metric descriptors, incrementing received values. It allows you to accumulate results from different calls in the pipeline.</p>
524
<dl><dt><b>Parameters:</b></dt><dd>
525
<table border="0" cellspacing="2" cellpadding="0">
526
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- argument bitvector 1 (A) </td></tr>
527
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- argument bitvector 2 (B) </td></tr>
528
<tr><td valign="top"></td><td valign="top"><em>dmit</em> </td><td>- pointer to first element of metric descriptors array Input-Output parameter, receives metric code as input, computation is added to "result" field </td></tr>
529
<tr><td valign="top"></td><td valign="top"><em>dmit_end</em> </td><td>- pointer to (last+1) element of metric descriptors array </td></tr>
533
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="a00009.html#a10">sample9.cpp</a>.</dd>
535
<p>Definition at line <a class="el" href="a00086_source.html#l00688">688</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
537
<p>References <a class="el" href="a00089_source.html#l00094">BM_IS_GAP</a>, <a class="el" href="a00089_source.html#l00136">BM_SET_MMX_GUARD</a>, <a class="el" href="a00086_source.html#l00114">bm::combine_count_operation_with_block()</a>, <a class="el" href="a00086_source.html#l00642">bm::distance_stage()</a>, and <a class="el" href="a00088_source.html#l00080">bm::set_array_size</a>.</p>
539
<p>Referenced by <a class="el" href="a00086_source.html#l00943">bm::count_and()</a>, <a class="el" href="a00086_source.html#l01045">bm::count_or()</a>, <a class="el" href="a00086_source.html#l01011">bm::count_sub()</a>, <a class="el" href="a00086_source.html#l00977">bm::count_xor()</a>, and <a class="el" href="a00109_source.html#l00047">main()</a>.</p>
543
<a class="anchor" id="gaa66525fd7a3f823d73678252a235982e"></a><!-- doxytag: member="bm::distance_operation_any" ref="gaa66525fd7a3f823d73678252a235982e" args="(const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)" -->
544
<div class="memitem">
545
<div class="memproto">
546
<div class="memtemplate">
547
template<class BV > </div>
548
<table class="memname">
550
<td class="memname">void bm::distance_operation_any </td>
552
<td class="paramtype">const BV & </td>
553
<td class="paramname"> <em>bv1</em>, </td>
556
<td class="paramkey"></td>
558
<td class="paramtype">const BV & </td>
559
<td class="paramname"> <em>bv2</em>, </td>
562
<td class="paramkey"></td>
564
<td class="paramtype">distance_metric_descriptor * </td>
565
<td class="paramname"> <em>dmit</em>, </td>
568
<td class="paramkey"></td>
570
<td class="paramtype">distance_metric_descriptor * </td>
571
<td class="paramname"> <em>dmit_end</em></td><td> </td>
576
<td></td><td></td><td><code> [inline]</code></td>
582
<p>Distance screening template function. </p>
583
<p>Function receives two bitvectors and an array of distance metrics (metrics pipeline). Function computes possybility of a metric(any bit) saves result into corresponding pipeline results (<a class="el" href="a00060.html#a94c955fe1ac46589d6edc8df7fd35cf6">distance_metric_descriptor::result</a>) An important detail is that function reuses metric descriptors, incrementing received values. It allows you to accumulate results from different calls in the pipeline.</p>
584
<dl><dt><b>Parameters:</b></dt><dd>
585
<table border="0" cellspacing="2" cellpadding="0">
586
<tr><td valign="top"></td><td valign="top"><em>bv1</em> </td><td>- argument bitvector 1 (A) </td></tr>
587
<tr><td valign="top"></td><td valign="top"><em>bv2</em> </td><td>- argument bitvector 2 (B) </td></tr>
588
<tr><td valign="top"></td><td valign="top"><em>dmit</em> </td><td>- pointer to first element of metric descriptors array Input-Output parameter, receives metric code as input, computation is added to "result" field </td></tr>
589
<tr><td valign="top"></td><td valign="top"><em>dmit_end</em> </td><td>- pointer to (last+1) element of metric descriptors array </td></tr>
594
<p>Definition at line <a class="el" href="a00086_source.html#l00807">807</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
596
<p>References <a class="el" href="a00089_source.html#l00094">BM_IS_GAP</a>, <a class="el" href="a00089_source.html#l00136">BM_SET_MMX_GUARD</a>, <a class="el" href="a00086_source.html#l00343">bm::combine_any_operation_with_block()</a>, <a class="el" href="a00086_source.html#l00642">bm::distance_stage()</a>, <a class="el" href="a00086_source.html#l00086">bm::distance_metric_descriptor::result</a>, and <a class="el" href="a00088_source.html#l00080">bm::set_array_size</a>.</p>
598
<p>Referenced by <a class="el" href="a00086_source.html#l00959">bm::any_and()</a>, <a class="el" href="a00086_source.html#l01061">bm::any_or()</a>, <a class="el" href="a00086_source.html#l01028">bm::any_sub()</a>, and <a class="el" href="a00086_source.html#l00993">bm::any_xor()</a>.</p>
602
<a class="anchor" id="ga158946ea41ca66c3e1bca62c92684788"></a><!-- doxytag: member="bm::operation2metric" ref="ga158946ea41ca66c3e1bca62c92684788" args="(set_operation op)" -->
603
<div class="memitem">
604
<div class="memproto">
605
<table class="memname">
607
<td class="memname">distance_metric bm::operation2metric </td>
609
<td class="paramtype">set_operation </td>
610
<td class="paramname"> <em>op</em></td>
611
<td> ) </td>
612
<td><code> [inline]</code></td>
618
<p>Convert set operation into compatible distance metric. </p>
620
<p>Definition at line <a class="el" href="a00086_source.html#l00069">69</a> of file <a class="el" href="a00086_source.html">bmalgo_impl.h</a>.</p>
622
<p>References <a class="el" href="a00089_source.html#l00047">BM_ASSERT</a>, <a class="el" href="a00090_source.html#l00231">bm::is_const_set_operation()</a>, <a class="el" href="a00090_source.html#l00217">bm::set_COUNT</a>, and <a class="el" href="a00090_source.html#l00224">bm::set_COUNT_B</a>.</p>
624
<p>Referenced by <a class="el" href="a00092_source.html#l02899">bm::iterator_deserializer< BV, SerialIterator >::deserialize()</a>.</p>
629
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Nov 22 10:49:42 2009 for BitMagic by
142
630
<a href="http://www.doxygen.org/index.html">
143
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
631
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>