-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patha00092.html
232 lines (223 loc) · 41.5 KB
/
a00092.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tesseract: /usr/src/tesseract-ocr.master/src/ccmain/fixspace.h File 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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">tesseract
 <span id="projectnumber">4.0.0-1-g2a2b</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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&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>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00092.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">fixspace.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a href="a00092_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa9c4bc6127388800d066093c261667ea"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#aa9c4bc6127388800d066093c261667ea">initialise_search</a> (WERD_RES_LIST &src_list, WERD_RES_LIST &new_list)</td></tr>
<tr class="separator:aa9c4bc6127388800d066093c261667ea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7373a91e50199f38d52143e22c269f92"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#a7373a91e50199f38d52143e22c269f92">transform_to_next_perm</a> (WERD_RES_LIST &words)</td></tr>
<tr class="separator:a7373a91e50199f38d52143e22c269f92"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3a25422c78dc87ddee3165c73a1d7ce7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00092.html#a3a25422c78dc87ddee3165c73a1d7ce7">fixspace_dbg</a> (<a class="el" href="a02542.html">WERD_RES</a> *word)</td></tr>
<tr class="separator:a3a25422c78dc87ddee3165c73a1d7ce7"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a3a25422c78dc87ddee3165c73a1d7ce7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a25422c78dc87ddee3165c73a1d7ce7">◆ </a></span>fixspace_dbg()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fixspace_dbg </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a02542.html">WERD_RES</a> * </td>
<td class="paramname"><em>word</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="a00089_source.html#l00825">825</a> of file <a class="el" href="a00089_source.html">fixspace.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00825"></a><span class="lineno"> 825</span>  {</div><div class="line"><a name="l00826"></a><span class="lineno"> 826</span>  <a class="code" href="a02610.html">TBOX</a> box = word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">bounding_box</a>();</div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> show_map_detail = <span class="keyword">false</span>;</div><div class="line"><a name="l00828"></a><span class="lineno"> 828</span>  int16_t i;</div><div class="line"><a name="l00829"></a><span class="lineno"> 829</span> </div><div class="line"><a name="l00830"></a><span class="lineno"> 830</span>  box.<a class="code" href="a02610.html#a61af64df548c7638bf005fcd8343c435">print</a>();</div><div class="line"><a name="l00831"></a><span class="lineno"> 831</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">" \"%s\" "</span>, word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00832"></a><span class="lineno"> 832</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"Blob count: %d (word); %d/%d (rebuild word)\n"</span>,</div><div class="line"><a name="l00833"></a><span class="lineno"> 833</span>  word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a174baefaa99afbfdbf444e4199f3b529">cblob_list</a>()->length(),</div><div class="line"><a name="l00834"></a><span class="lineno"> 834</span>  word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a0d5347723ece084faf8f3d0dba6dd219">NumBlobs</a>(),</div><div class="line"><a name="l00835"></a><span class="lineno"> 835</span>  word-><a class="code" href="a02542.html#a3a92c8c9750d78631d75998f008f366a">box_word</a>-><a class="code" href="a02410.html#a2505cb916ecbd87e4ba1a44654b1e078">length</a>());</div><div class="line"><a name="l00836"></a><span class="lineno"> 836</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#a124889539460b8c200b3186da4a692e0">print</a>(<a class="code" href="a00194.html#adff672a9cdb59d57a0d142954a6a3899">debug_fp</a>);</div><div class="line"><a name="l00837"></a><span class="lineno"> 837</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"\n"</span>);</div><div class="line"><a name="l00838"></a><span class="lineno"> 838</span>  <span class="keywordflow">if</span> (show_map_detail) {</div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"\"%s\"\n"</span>, word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00840"></a><span class="lineno"> 840</span>  <span class="keywordflow">for</span> (i = 0; word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[i] != <span class="charliteral">'\0'</span>; i++) {</div><div class="line"><a name="l00841"></a><span class="lineno"> 841</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"**** \"%c\" ****\n"</span>, word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[i]);</div><div class="line"><a name="l00842"></a><span class="lineno"> 842</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].<a class="code" href="a02618.html#a476689acf6a0c07a0f09452ef5ff79e8">full_print</a>(<a class="code" href="a00194.html#adff672a9cdb59d57a0d142954a6a3899">debug_fp</a>);</div><div class="line"><a name="l00843"></a><span class="lineno"> 843</span>  }</div><div class="line"><a name="l00844"></a><span class="lineno"> 844</span>  }</div><div class="line"><a name="l00845"></a><span class="lineno"> 845</span> </div><div class="line"><a name="l00846"></a><span class="lineno"> 846</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"Tess Accepted: %s\n"</span>, word-><a class="code" href="a02542.html#aa7f56655eb0e5164f2d2e85906475cb1">tess_accepted</a> ? <span class="stringliteral">"TRUE"</span> : <span class="stringliteral">"FALSE"</span>);</div><div class="line"><a name="l00847"></a><span class="lineno"> 847</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"Done flag: %s\n\n"</span>, word-><a class="code" href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">done</a> ? <span class="stringliteral">"TRUE"</span> : <span class="stringliteral">"FALSE"</span>);</div><div class="line"><a name="l00848"></a><span class="lineno"> 848</span> }</div><div class="ttc" id="a02542_html_a211ab5c5a13123ee7bdc7459d3363f9d"><div class="ttname"><a href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">WERD_RES::rebuild_word</a></div><div class="ttdeci">TWERD * rebuild_word</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00260">pageres.h:260</a></div></div>
<div class="ttc" id="a00194_html_adff672a9cdb59d57a0d142954a6a3899"><div class="ttname"><a href="a00194.html#adff672a9cdb59d57a0d142954a6a3899">debug_fp</a></div><div class="ttdeci">FILE * debug_fp</div><div class="ttdef"><b>Definition:</b> <a href="a00194_source.html#l00024">tessvars.cpp:24</a></div></div>
<div class="ttc" id="a02610_html_a61af64df548c7638bf005fcd8343c435"><div class="ttname"><a href="a02610.html#a61af64df548c7638bf005fcd8343c435">TBOX::print</a></div><div class="ttdeci">void print() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00278">rect.h:278</a></div></div>
<div class="ttc" id="a02542_html_ae24eb58be06cf275aee411d947fd31ef"><div class="ttname"><a href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">WERD_RES::reject_map</a></div><div class="ttdeci">REJMAP reject_map</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00287">pageres.h:287</a></div></div>
<div class="ttc" id="a02834_html_abf0a7b3c6ae39a46e5441f28f61de5de"><div class="ttname"><a href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">STRING::string</a></div><div class="ttdeci">const char * string() const</div><div class="ttdef"><b>Definition:</b> <a href="a00581_source.html#l00196">strngs.cpp:196</a></div></div>
<div class="ttc" id="a02618_html_a476689acf6a0c07a0f09452ef5ff79e8"><div class="ttname"><a href="a02618.html#a476689acf6a0c07a0f09452ef5ff79e8">REJMAP::full_print</a></div><div class="ttdeci">void full_print(FILE *fp)</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00335">rejctmap.cpp:335</a></div></div>
<div class="ttc" id="a02638_html_ad35a2fd78555195a3dedcdd01094d0d4"><div class="ttname"><a href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">WERD::bounding_box</a></div><div class="ttdeci">TBOX bounding_box() const</div><div class="ttdef"><b>Definition:</b> <a href="a00446_source.html#l00159">werd.cpp:159</a></div></div>
<div class="ttc" id="a02610_html"><div class="ttname"><a href="a02610.html">TBOX</a></div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00034">rect.h:34</a></div></div>
<div class="ttc" id="a02402_html_a0d5347723ece084faf8f3d0dba6dd219"><div class="ttname"><a href="a02402.html#a0d5347723ece084faf8f3d0dba6dd219">TWERD::NumBlobs</a></div><div class="ttdeci">int NumBlobs() const</div><div class="ttdef"><b>Definition:</b> <a href="a00230_source.html#l00432">blobs.h:432</a></div></div>
<div class="ttc" id="a02542_html_aa7f56655eb0e5164f2d2e85906475cb1"><div class="ttname"><a href="a02542.html#aa7f56655eb0e5164f2d2e85906475cb1">WERD_RES::tess_accepted</a></div><div class="ttdeci">bool tess_accepted</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00296">pageres.h:296</a></div></div>
<div class="ttc" id="a00596_html_a0c2bcd4462ec67ab0971b34a0f610f55"><div class="ttname"><a href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a></div><div class="ttdeci">DLLSYM void tprintf(const char *format,...)</div><div class="ttdef"><b>Definition:</b> <a href="a00596_source.html#l00037">tprintf.cpp:37</a></div></div>
<div class="ttc" id="a02638_html_a174baefaa99afbfdbf444e4199f3b529"><div class="ttname"><a href="a02638.html#a174baefaa99afbfdbf444e4199f3b529">WERD::cblob_list</a></div><div class="ttdeci">C_BLOB_LIST * cblob_list()</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00098">werd.h:98</a></div></div>
<div class="ttc" id="a02542_html_a2bd2ff4f993746fc87d3ee88357a4a88"><div class="ttname"><a href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">WERD_RES::done</a></div><div class="ttdeci">bool done</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00298">pageres.h:298</a></div></div>
<div class="ttc" id="a02410_html_a2505cb916ecbd87e4ba1a44654b1e078"><div class="ttname"><a href="a02410.html#a2505cb916ecbd87e4ba1a44654b1e078">tesseract::BoxWord::length</a></div><div class="ttdeci">int length() const</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00083">boxword.h:83</a></div></div>
<div class="ttc" id="a02606_html_adf200132afabc2ee6ec256e516011007"><div class="ttname"><a href="a02606.html#adf200132afabc2ee6ec256e516011007">WERD_CHOICE::unichar_string</a></div><div class="ttdeci">const STRING & unichar_string() const</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00541">ratngs.h:541</a></div></div>
<div class="ttc" id="a02542_html_a3d42ac7ec121263e757c9b7160dfd50d"><div class="ttname"><a href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">WERD_RES::best_choice</a></div><div class="ttdeci">WERD_CHOICE * best_choice</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00235">pageres.h:235</a></div></div>
<div class="ttc" id="a02542_html_a3a92c8c9750d78631d75998f008f366a"><div class="ttname"><a href="a02542.html#a3a92c8c9750d78631d75998f008f366a">WERD_RES::box_word</a></div><div class="ttdeci">tesseract::BoxWord * box_word</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00266">pageres.h:266</a></div></div>
<div class="ttc" id="a02618_html_a124889539460b8c200b3186da4a692e0"><div class="ttname"><a href="a02618.html#a124889539460b8c200b3186da4a692e0">REJMAP::print</a></div><div class="ttdeci">void print(FILE *fp)</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00323">rejctmap.cpp:323</a></div></div>
<div class="ttc" id="a02542_html_afc15fa7c1b5ad55d6772dea0d6865df1"><div class="ttname"><a href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">WERD_RES::word</a></div><div class="ttdeci">WERD * word</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00189">pageres.h:189</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aa9c4bc6127388800d066093c261667ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9c4bc6127388800d066093c261667ea">◆ </a></span>initialise_search()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void initialise_search </td>
<td>(</td>
<td class="paramtype">WERD_RES_LIST & </td>
<td class="paramname"><em>src_list</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">WERD_RES_LIST & </td>
<td class="paramname"><em>new_list</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="a00089_source.html#l00207">207</a> of file <a class="el" href="a00089_source.html">fixspace.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  {</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  WERD_RES_IT src_it(&src_list);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  WERD_RES_IT new_it(&new_list);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <a class="code" href="a02542.html">WERD_RES</a> *src_wd;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <a class="code" href="a02542.html">WERD_RES</a> *new_wd;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span> </div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">for</span> (src_it.mark_cycle_pt(); !src_it.cycled_list(); src_it.forward()) {</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  src_wd = src_it.data();</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keywordflow">if</span> (!src_wd-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a>) {</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  new_wd = <a class="code" href="a02542.html#a11b3e5ebfef7835732e2085742891363">WERD_RES::deep_copy</a>(src_wd);</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  new_wd-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  new_wd-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  new_it.add_after_then_move(new_wd);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  }</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  }</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> }</div><div class="ttc" id="a02542_html_a11b3e5ebfef7835732e2085742891363"><div class="ttname"><a href="a02542.html#a11b3e5ebfef7835732e2085742891363">WERD_RES::deep_copy</a></div><div class="ttdeci">static WERD_RES * deep_copy(const WERD_RES *src)</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00649">pageres.h:649</a></div></div>
<div class="ttc" id="a02542_html"><div class="ttname"><a href="a02542.html">WERD_RES</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00169">pageres.h:169</a></div></div>
<div class="ttc" id="a02542_html_a3d0f242e487b778a2139957e7ca3cc0b"><div class="ttname"><a href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">WERD_RES::combination</a></div><div class="ttdeci">bool combination</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00334">pageres.h:334</a></div></div>
<div class="ttc" id="a02542_html_a4ffd6b844b62d19df43effdc3faec8e3"><div class="ttname"><a href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">WERD_RES::part_of_combo</a></div><div class="ttdeci">bool part_of_combo</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00335">pageres.h:335</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a7373a91e50199f38d52143e22c269f92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7373a91e50199f38d52143e22c269f92">◆ </a></span>transform_to_next_perm()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void transform_to_next_perm </td>
<td>(</td>
<td class="paramtype">WERD_RES_LIST & </td>
<td class="paramname"><em>words</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="a00089_source.html#l00402">402</a> of file <a class="el" href="a00089_source.html">fixspace.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  {</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  WERD_RES_IT word_it(&words);</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  WERD_RES_IT prev_word_it(&words);</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <a class="code" href="a02542.html">WERD_RES</a> *word;</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <a class="code" href="a02542.html">WERD_RES</a> *prev_word;</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <a class="code" href="a02542.html">WERD_RES</a> *combo;</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <a class="code" href="a02638.html">WERD</a> *copy_word;</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  int16_t prev_right = -INT16_MAX;</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <a class="code" href="a02610.html">TBOX</a> box;</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  int16_t gap;</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  int16_t min_gap = INT16_MAX;</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span> </div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordflow">for</span> (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  word = word_it.data();</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="keywordflow">if</span> (!word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a>) {</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  box = word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">bounding_box</a>();</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">if</span> (prev_right > -INT16_MAX) {</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  gap = box.<a class="code" href="a02610.html#a8e9dce0d30d2213598cd4befe0028c99">left</a>() - prev_right;</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <span class="keywordflow">if</span> (gap < min_gap)</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  min_gap = gap;</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  }</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  prev_right = box.<a class="code" href="a02610.html#af74fa3bf628c9426cd6f1141a87dc2e0">right</a>();</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  }</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  }</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  <span class="keywordflow">if</span> (min_gap < INT16_MAX) {</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  prev_right = -INT16_MAX; <span class="comment">// back to start</span></div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  word_it.set_to_list(&words);</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="comment">// Note: we can't use cycle_pt due to inserted combos at start of list.</span></div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keywordflow">for</span> (; (prev_right == -INT16_MAX) || !word_it.at_first();</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  word_it.forward()) {</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  word = word_it.data();</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keywordflow">if</span> (!word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a>) {</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  box = word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">bounding_box</a>();</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keywordflow">if</span> (prev_right > -INT16_MAX) {</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  gap = box.<a class="code" href="a02610.html#a8e9dce0d30d2213598cd4befe0028c99">left</a>() - prev_right;</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  <span class="keywordflow">if</span> (gap <= min_gap) {</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  prev_word = prev_word_it.data();</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="keywordflow">if</span> (prev_word-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a>) {</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  combo = prev_word;</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="comment">/* Make a new combination and insert before</span></div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span> <span class="comment"> * the first word being joined. */</span></div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  copy_word = <span class="keyword">new</span> <a class="code" href="a02638.html">WERD</a>;</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  *copy_word = *(prev_word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>);</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="comment">// deep copy</span></div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  combo = <span class="keyword">new</span> <a class="code" href="a02542.html">WERD_RES</a>(copy_word);</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  combo-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> = <a class="code" href="a00014.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>;</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  combo-><a class="code" href="a02542.html#a42ec9dbb998f7da714ace13ee30cb86e">x_height</a> = prev_word-><a class="code" href="a02542.html#a42ec9dbb998f7da714ace13ee30cb86e">x_height</a>;</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  prev_word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  prev_word_it.add_before_then_move(combo);</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  }</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  combo-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#aa84fa612a8864def8df4b7df26168aca">set_flag</a>(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce">W_EOL</a>, word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#aec30b0c876cef5479c5db04aa8897358">flag</a>(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce">W_EOL</a>));</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a>) {</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  combo-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#ad856eb3b9230d14fe8f013bfd03d8828">join_on</a>(word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>);</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="comment">// Move blobs to combo</span></div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <span class="comment">// old combo no longer needed</span></div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="keyword">delete</span> word_it.extract();</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="comment">// Copy current wd to combo</span></div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  combo-><a class="code" href="a02542.html#a3badcd252947547aadeb3d2bfe2f980b">copy_on</a>(word);</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  }</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  combo-><a class="code" href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">done</a> = <a class="code" href="a00014.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>;</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  combo-><a class="code" href="a02542.html#a6ef9853bc0dca7249a30c897bcba4aba">ClearResults</a>();</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  prev_word_it = word_it; <span class="comment">// catch up</span></div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  }</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  }</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  prev_right = box.<a class="code" href="a02610.html#af74fa3bf628c9426cd6f1141a87dc2e0">right</a>();</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  }</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  }</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  words.clear(); <span class="comment">// signal termination</span></div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  }</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span> }</div><div class="ttc" id="a00014_html_aa8cecfc5c5c054d2875c03e77b7be15d"><div class="ttname"><a href="a00014.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a></div><div class="ttdeci">#define TRUE</div><div class="ttdef"><b>Definition:</b> <a href="a00014_source.html#l00051">capi.h:51</a></div></div>
<div class="ttc" id="a02638_html_ad35a2fd78555195a3dedcdd01094d0d4"><div class="ttname"><a href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">WERD::bounding_box</a></div><div class="ttdeci">TBOX bounding_box() const</div><div class="ttdef"><b>Definition:</b> <a href="a00446_source.html#l00159">werd.cpp:159</a></div></div>
<div class="ttc" id="a02610_html"><div class="ttname"><a href="a02610.html">TBOX</a></div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00034">rect.h:34</a></div></div>
<div class="ttc" id="a00449_html_ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce"><div class="ttname"><a href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce">W_EOL</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00035">werd.h:35</a></div></div>
<div class="ttc" id="a02542_html"><div class="ttname"><a href="a02542.html">WERD_RES</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00169">pageres.h:169</a></div></div>
<div class="ttc" id="a02638_html_aa84fa612a8864def8df4b7df26168aca"><div class="ttname"><a href="a02638.html#aa84fa612a8864def8df4b7df26168aca">WERD::set_flag</a></div><div class="ttdeci">void set_flag(WERD_FLAGS mask, bool value)</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00127">werd.h:127</a></div></div>
<div class="ttc" id="a02610_html_a8e9dce0d30d2213598cd4befe0028c99"><div class="ttname"><a href="a02610.html#a8e9dce0d30d2213598cd4befe0028c99">TBOX::left</a></div><div class="ttdeci">int16_t left() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00072">rect.h:72</a></div></div>
<div class="ttc" id="a02638_html_aec30b0c876cef5479c5db04aa8897358"><div class="ttname"><a href="a02638.html#aec30b0c876cef5479c5db04aa8897358">WERD::flag</a></div><div class="ttdeci">bool flag(WERD_FLAGS mask) const</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00126">werd.h:126</a></div></div>
<div class="ttc" id="a00014_html_aa93f0eb578d23995850d61f7d61c55c1"><div class="ttname"><a href="a00014.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a></div><div class="ttdeci">#define FALSE</div><div class="ttdef"><b>Definition:</b> <a href="a00014_source.html#l00052">capi.h:52</a></div></div>
<div class="ttc" id="a02542_html_a3badcd252947547aadeb3d2bfe2f980b"><div class="ttname"><a href="a02542.html#a3badcd252947547aadeb3d2bfe2f980b">WERD_RES::copy_on</a></div><div class="ttdeci">void copy_on(WERD_RES *word_res)</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00660">pageres.h:660</a></div></div>
<div class="ttc" id="a02638_html"><div class="ttname"><a href="a02638.html">WERD</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00059">werd.h:59</a></div></div>
<div class="ttc" id="a02542_html_a2bd2ff4f993746fc87d3ee88357a4a88"><div class="ttname"><a href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">WERD_RES::done</a></div><div class="ttdeci">bool done</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00298">pageres.h:298</a></div></div>
<div class="ttc" id="a02542_html_a3d0f242e487b778a2139957e7ca3cc0b"><div class="ttname"><a href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">WERD_RES::combination</a></div><div class="ttdeci">bool combination</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00334">pageres.h:334</a></div></div>
<div class="ttc" id="a02542_html_a42ec9dbb998f7da714ace13ee30cb86e"><div class="ttname"><a href="a02542.html#a42ec9dbb998f7da714ace13ee30cb86e">WERD_RES::x_height</a></div><div class="ttdeci">float x_height</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00311">pageres.h:311</a></div></div>
<div class="ttc" id="a02542_html_a6ef9853bc0dca7249a30c897bcba4aba"><div class="ttname"><a href="a02542.html#a6ef9853bc0dca7249a30c897bcba4aba">WERD_RES::ClearResults</a></div><div class="ttdeci">void ClearResults()</div><div class="ttdef"><b>Definition:</b> <a href="a00341_source.html#l01153">pageres.cpp:1153</a></div></div>
<div class="ttc" id="a02542_html_a4ffd6b844b62d19df43effdc3faec8e3"><div class="ttname"><a href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">WERD_RES::part_of_combo</a></div><div class="ttdeci">bool part_of_combo</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00335">pageres.h:335</a></div></div>
<div class="ttc" id="a02610_html_af74fa3bf628c9426cd6f1141a87dc2e0"><div class="ttname"><a href="a02610.html#af74fa3bf628c9426cd6f1141a87dc2e0">TBOX::right</a></div><div class="ttdeci">int16_t right() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00079">rect.h:79</a></div></div>
<div class="ttc" id="a02638_html_ad856eb3b9230d14fe8f013bfd03d8828"><div class="ttname"><a href="a02638.html#ad856eb3b9230d14fe8f013bfd03d8828">WERD::join_on</a></div><div class="ttdeci">void join_on(WERD *other)</div><div class="ttdef"><b>Definition:</b> <a href="a00446_source.html#l00210">werd.cpp:210</a></div></div>
<div class="ttc" id="a02542_html_afc15fa7c1b5ad55d6772dea0d6865df1"><div class="ttname"><a href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">WERD_RES::word</a></div><div class="ttdeci">WERD * word</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00189">pageres.h:189</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_fce9a394c0d2c636e610a0a34fe30580.html">tesseract-ocr.master</a></li><li class="navelem"><a class="el" href="dir_fd2783e80b2d56815818e17a68fc4d98.html">src</a></li><li class="navelem"><a class="el" href="dir_f676e76c9a53ee7edd5046de803da784.html">ccmain</a></li><li class="navelem"><a class="el" href="a00092.html">fixspace.h</a></li>
<li class="footer">Generated on Mon Oct 29 2018 11:03:51 for tesseract by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
</ul>
</div>
</body>
</html>