forked from potassco/potassco.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
group__SolveIter.html
248 lines (240 loc) · 13.8 KB
/
group__SolveIter.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!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.11"/>
<title>Clingo C API: Iterative Solving</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="clingo.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">Clingo C API
</div>
<div id="projectbrief">C API for clingo providing high level functions to control grounding and solving.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<!-- 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="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Iterative Solving<div class="ingroups"><a class="el" href="group__Control.html">Grounding and Solving</a></div></div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Iterative enumeration of models (without using callbacks). </p>
<p>Clingo provides two additional ways to handle solving: <a class="el" href="group__SolveIter.html">Iterative Solving</a> and <a class="el" href="group__SolveAsync.html">Asynchronous Solving</a>. With iterative solving, models are enumerated one by one by calling <a class="el" href="group__SolveIter.html#gab01a023960eca822843cd323ff21db0e">clingo_solve_iteratively_next()</a> and <a class="el" href="group__SolveIter.html#ga8a2a5d7eff10dc0c2e85c902ba700c32">clingo_solve_iteratively_get()</a> in a loop.</p>
<p>For an example, see <a class="el" href="solve-iteratively_8c-example.html">solve-iteratively.c</a>. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gaa3c0489d80175f3f2a51a2a8f7cb9d03"><td class="memItemLeft" align="right" valign="top">typedef struct clingo_solve_iteratively </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a></td></tr>
<tr class="memdesc:gaa3c0489d80175f3f2a51a2a8f7cb9d03"><td class="mdescLeft"> </td><td class="mdescRight">Search handle to enumerate models iteratively. <a href="#gaa3c0489d80175f3f2a51a2a8f7cb9d03">More...</a><br /></td></tr>
<tr class="separator:gaa3c0489d80175f3f2a51a2a8f7cb9d03"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab01a023960eca822843cd323ff21db0e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SolveIter.html#gab01a023960eca822843cd323ff21db0e">clingo_solve_iteratively_next</a> (<a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a> *handle, <a class="el" href="group__Model.html#gaaf9a93819f023f3cb8aa80598c46556b">clingo_model_t</a> **model)</td></tr>
<tr class="memdesc:gab01a023960eca822843cd323ff21db0e"><td class="mdescLeft"> </td><td class="mdescRight">Get the next model. <a href="#gab01a023960eca822843cd323ff21db0e">More...</a><br /></td></tr>
<tr class="separator:gab01a023960eca822843cd323ff21db0e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8a2a5d7eff10dc0c2e85c902ba700c32"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SolveIter.html#ga8a2a5d7eff10dc0c2e85c902ba700c32">clingo_solve_iteratively_get</a> (<a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a> *handle, <a class="el" href="group__Control.html#gae917a23b0591d181004ec88c4e3291c1">clingo_solve_result_bitset_t</a> *result)</td></tr>
<tr class="memdesc:ga8a2a5d7eff10dc0c2e85c902ba700c32"><td class="mdescLeft"> </td><td class="mdescRight">Get the solve result. <a href="#ga8a2a5d7eff10dc0c2e85c902ba700c32">More...</a><br /></td></tr>
<tr class="separator:ga8a2a5d7eff10dc0c2e85c902ba700c32"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga68671ff8611ff144adc24f5b809a1a3a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SolveIter.html#ga68671ff8611ff144adc24f5b809a1a3a">clingo_solve_iteratively_close</a> (<a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a> *handle)</td></tr>
<tr class="memdesc:ga68671ff8611ff144adc24f5b809a1a3a"><td class="mdescLeft"> </td><td class="mdescRight">Closes an active search. <a href="#ga68671ff8611ff144adc24f5b809a1a3a">More...</a><br /></td></tr>
<tr class="separator:ga68671ff8611ff144adc24f5b809a1a3a"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="gaa3c0489d80175f3f2a51a2a8f7cb9d03"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct clingo_solve_iteratively <a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Search handle to enumerate models iteratively. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Control.html#gab23442dc7576126b78422fc0554bf11d" title="Solve the currently grounded logic program enumerating models iteratively. ">clingo_control_solve_iteratively()</a> </dd></dl>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga68671ff8611ff144adc24f5b809a1a3a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_solve_iteratively_close </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a> * </td>
<td class="paramname"><em>handle</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Closes an active search. </p>
<p>There must be no function calls on the associated control object until this function has been called.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">handle</td><td>the target </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a></li>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af43eebc9503fef8d1b2b85f99bb63221" title="wrong usage of the clingo API or invalid input ">clingo_error_runtime</a> if solving fails </li>
</ul>
</dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="solve-iteratively_8c-example.html#a15">solve-iteratively.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga8a2a5d7eff10dc0c2e85c902ba700c32"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_solve_iteratively_get </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a> * </td>
<td class="paramname"><em>handle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__Control.html#gae917a23b0591d181004ec88c4e3291c1">clingo_solve_result_bitset_t</a> * </td>
<td class="paramname"><em>result</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the solve result. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">handle</td><td>the target </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>the solve result </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a></li>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af43eebc9503fef8d1b2b85f99bb63221" title="wrong usage of the clingo API or invalid input ">clingo_error_runtime</a> if solving fails </li>
</ul>
</dd></dl>
</div>
</div>
<a class="anchor" id="gab01a023960eca822843cd323ff21db0e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_solve_iteratively_next </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a> * </td>
<td class="paramname"><em>handle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__Model.html#gaaf9a93819f023f3cb8aa80598c46556b">clingo_model_t</a> ** </td>
<td class="paramname"><em>model</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the next model. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">handle</td><td>the target </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">model</td><td>the next model </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a></li>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af43eebc9503fef8d1b2b85f99bb63221" title="wrong usage of the clingo API or invalid input ">clingo_error_runtime</a> if solving fails </li>
</ul>
</dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="solve-iteratively_8c-example.html#a12">solve-iteratively.c</a>.</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Aug 18 2016 13:19:52 for Clingo C API by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>