emergency commit
[cl-cudd.git] / distr / mtr / doc / mtrAllDet.html
blobe7b78907433f8ae93004b4684fecfda4cfd51727
1 <html>
2 <head><title>The mtr package (Internal) </title></head>
3 <body>
5 <h1>The mtr package (Internal) </h1>
6 <h2>Internal data structures of the mtr package</h2>
7 <h3></h3>
8 <hr>
9 <ul>
10 <li><a href="mtrExtAbs.html"><h3>External abstracts</h3></a>
11 <li><a href="mtrAllAbs.html"><h3>All abstracts</h3></a>
12 <li><a href="mtrExtDet.html#prototypes"><h3>External functions</h3></a>
13 <li><a href="mtrAllDet.html#prototypes"><h3>All functions</h3></a>
14 </ul>
16 <hr>
18 <a name="description">
19 In this package all definitions are external.
20 </a>
22 <hr>
23 <!-- Function Prototypes and description -->
25 <dl>
26 <a name="prototypes"></a>
27 <dt><pre>
28 MtrNode * <i></i>
29 <a name="Mtr_AllocNode"><b>Mtr_AllocNode</b></a>(
30 <b></b> <i></i>
32 </pre>
33 <dd> Allocates new tree node. Returns pointer to node.
34 <p>
36 <dd> <b>Side Effects</b> None
37 <p>
39 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_DeallocNode">Mtr_DeallocNode</a>
40 </code>
42 <dt><pre>
43 MtrNode * <i></i>
44 <a name="Mtr_CopyTree"><b>Mtr_CopyTree</b></a>(
45 MtrNode * <b>node</b>, <i></i>
46 int <b>expansion</b> <i></i>
48 </pre>
49 <dd> Makes a copy of tree. If parameter expansion is greater than 1, it will expand the tree by that factor. It is an error for expansion to be less than 1. Returns a pointer to the copy if successful; NULL otherwise.
50 <p>
52 <dd> <b>Side Effects</b> None
53 <p>
55 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_InitTree">Mtr_InitTree</a>
56 </code>
58 <dt><pre>
59 MtrNode * <i></i>
60 <a name="Mtr_CreateFirstChild"><b>Mtr_CreateFirstChild</b></a>(
61 MtrNode * <b>parent</b> <i></i>
63 </pre>
64 <dd> Creates a new node and makes it the first child of parent. Returns pointer to new child.
65 <p>
67 <dd> <b>Side Effects</b> None
68 <p>
70 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_MakeFirstChild">Mtr_MakeFirstChild</a>
71 <a href="mtrAllDet.html#Mtr_CreateLastChild">Mtr_CreateLastChild</a>
72 </code>
74 <dt><pre>
75 MtrNode * <i></i>
76 <a name="Mtr_CreateLastChild"><b>Mtr_CreateLastChild</b></a>(
77 MtrNode * <b>parent</b> <i></i>
79 </pre>
80 <dd> Creates a new node and makes it the last child of parent. Returns pointer to new child.
81 <p>
83 <dd> <b>Side Effects</b> None
84 <p>
86 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_MakeLastChild">Mtr_MakeLastChild</a>
87 <a href="mtrAllDet.html#Mtr_CreateFirstChild">Mtr_CreateFirstChild</a>
88 </code>
90 <dt><pre>
91 void <i></i>
92 <a name="Mtr_DeallocNode"><b>Mtr_DeallocNode</b></a>(
93 MtrNode * <b>node</b> <i>node to be deallocated</i>
95 </pre>
96 <dd> Deallocates tree node.
97 <p>
99 <dd> <b>Side Effects</b> None
102 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_AllocNode">Mtr_AllocNode</a>
103 </code>
105 <dt><pre>
106 MtrNode * <i></i>
107 <a name="Mtr_DissolveGroup"><b>Mtr_DissolveGroup</b></a>(
108 MtrNode * <b>group</b> <i>group to be dissolved</i>
110 </pre>
111 <dd> Merges the children of `group' with the children of its parent. Disposes of the node pointed by group. If group is the root of the group tree, this procedure leaves the tree unchanged. Returns the pointer to the parent of `group' upon successful termination; NULL otherwise.
114 <dd> <b>Side Effects</b> None
117 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_MakeGroup">Mtr_MakeGroup</a>
118 </code>
120 <dt><pre>
121 MtrNode * <i></i>
122 <a name="Mtr_FindGroup"><b>Mtr_FindGroup</b></a>(
123 MtrNode * <b>root</b>, <i>root of the group tree</i>
124 unsigned int <b>low</b>, <i>lower bound of the group</i>
125 unsigned int <b>size</b> <i>upper bound of the group</i>
127 </pre>
128 <dd> Finds a group with size leaves starting at low, if it exists. This procedure relies on the low and size fields of each node. It also assumes that the children of each node are sorted in order of increasing low. Returns the pointer to the root of the group upon successful termination; NULL otherwise.
131 <dd> <b>Side Effects</b> None
134 <dt><pre>
135 void <i></i>
136 <a name="Mtr_FreeTree"><b>Mtr_FreeTree</b></a>(
137 MtrNode * <b>node</b> <i></i>
139 </pre>
140 <dd> Disposes of tree rooted at node.
143 <dd> <b>Side Effects</b> None
146 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_InitTree">Mtr_InitTree</a>
147 </code>
149 <dt><pre>
150 MtrNode * <i></i>
151 <a name="Mtr_InitGroupTree"><b>Mtr_InitGroupTree</b></a>(
152 int <b>lower</b>, <i></i>
153 int <b>size</b> <i></i>
155 </pre>
156 <dd> Allocate new tree with one node, whose low and size fields are specified by the lower and size parameters. Returns pointer to tree root.
159 <dd> <b>Side Effects</b> None
162 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_InitTree">Mtr_InitTree</a>
163 <a href="mtrAllDet.html#Mtr_FreeTree">Mtr_FreeTree</a>
164 </code>
166 <dt><pre>
167 MtrNode * <i></i>
168 <a name="Mtr_InitTree"><b>Mtr_InitTree</b></a>(
169 <b></b> <i></i>
171 </pre>
172 <dd> Initializes tree with one node. Returns pointer to node.
175 <dd> <b>Side Effects</b> None
178 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_FreeTree">Mtr_FreeTree</a>
179 <a href="mtrAllDet.html#Mtr_InitGroupTree">Mtr_InitGroupTree</a>
180 </code>
182 <dt><pre>
183 void <i></i>
184 <a name="Mtr_MakeFirstChild"><b>Mtr_MakeFirstChild</b></a>(
185 MtrNode * <b>parent</b>, <i></i>
186 MtrNode * <b>child</b> <i></i>
188 </pre>
189 <dd> Makes child the first child of parent.
192 <dd> <b>Side Effects</b> None
195 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_MakeLastChild">Mtr_MakeLastChild</a>
196 <a href="mtrAllDet.html#Mtr_CreateFirstChild">Mtr_CreateFirstChild</a>
197 </code>
199 <dt><pre>
200 MtrNode * <i></i>
201 <a name="Mtr_MakeGroup"><b>Mtr_MakeGroup</b></a>(
202 MtrNode * <b>root</b>, <i>root of the group tree</i>
203 unsigned int <b>low</b>, <i>lower bound of the group</i>
204 unsigned int <b>size</b>, <i>upper bound of the group</i>
205 unsigned int <b>flags</b> <i>flags for the new group</i>
207 </pre>
208 <dd> Makes a new group with size leaves starting at low. If the new group intersects an existing group, it must either contain it or be contained by it. This procedure relies on the low and size fields of each node. It also assumes that the children of each node are sorted in order of increasing low. In case of a valid request, the flags of the new group are set to the value passed in `flags.' This can also be used to change the flags of an existing group. Returns the pointer to the root of the new group upon successful termination; NULL otherwise. If the group already exists, the pointer to its root is returned.
211 <dd> <b>Side Effects</b> None
214 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_DissolveGroup">Mtr_DissolveGroup</a>
215 <a href="mtrAllDet.html#Mtr_ReadGroups">Mtr_ReadGroups</a>
216 <a href="mtrAllDet.html#Mtr_FindGroup">Mtr_FindGroup</a>
217 </code>
219 <dt><pre>
220 void <i></i>
221 <a name="Mtr_MakeLastChild"><b>Mtr_MakeLastChild</b></a>(
222 MtrNode * <b>parent</b>, <i></i>
223 MtrNode * <b>child</b> <i></i>
225 </pre>
226 <dd> Makes child the last child of parent.
229 <dd> <b>Side Effects</b> None
232 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_MakeFirstChild">Mtr_MakeFirstChild</a>
233 <a href="mtrAllDet.html#Mtr_CreateLastChild">Mtr_CreateLastChild</a>
234 </code>
236 <dt><pre>
237 void <i></i>
238 <a name="Mtr_MakeNextSibling"><b>Mtr_MakeNextSibling</b></a>(
239 MtrNode * <b>first</b>, <i></i>
240 MtrNode * <b>second</b> <i></i>
242 </pre>
243 <dd> Makes second the next sibling of first. Second becomes a child of the parent of first.
246 <dd> <b>Side Effects</b> None
249 <dt><pre>
250 void <i></i>
251 <a name="Mtr_PrintGroups"><b>Mtr_PrintGroups</b></a>(
252 MtrNode * <b>root</b>, <i>root of the group tree</i>
253 int <b>silent</b> <i>flag to check tree syntax only</i>
255 </pre>
256 <dd> Prints the groups as a parenthesized list. After each group, the group's flag are printed, preceded by a `|'. For each flag (except MTR_TERMINAL) a character is printed. <ul> <li>F: MTR_FIXED <li>N: MTR_NEWNODE <li>S: MTR_SOFT </ul> The second argument, silent, if different from 0, causes Mtr_PrintGroups to only check the syntax of the group tree.
259 <dd> <b>Side Effects</b> None
262 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_PrintTree">Mtr_PrintTree</a>
263 </code>
265 <dt><pre>
266 void <i></i>
267 <a name="Mtr_PrintTree"><b>Mtr_PrintTree</b></a>(
268 MtrNode * <b>node</b> <i></i>
270 </pre>
271 <dd> Prints a tree, one node per line.
274 <dd> <b>Side Effects</b> None
277 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_PrintGroups">Mtr_PrintGroups</a>
278 </code>
280 <dt><pre>
281 MtrNode * <i></i>
282 <a name="Mtr_ReadGroups"><b>Mtr_ReadGroups</b></a>(
283 FILE * <b>fp</b>, <i>file pointer</i>
284 int <b>nleaves</b> <i>number of leaves of the new tree</i>
286 </pre>
287 <dd> Reads groups from a file and creates a group tree. Each group is specified by three fields: <xmp> low size flags. </xmp> Low and size are (short) integers. Flags is a string composed of the following characters (with associated translation): <ul> <li>D: MTR_DEFAULT <li>F: MTR_FIXED <li>N: MTR_NEWNODE <li>S: MTR_SOFT <li>T: MTR_TERMINAL </ul> Normally, the only flags that are needed are D and F. Groups and fields are separated by white space (spaces, tabs, and newlines). Returns a pointer to the group tree if successful; NULL otherwise.
290 <dd> <b>Side Effects</b> None
293 <dd> <b>See Also</b> <code><a href="mtrAllDet.html#Mtr_InitGroupTree">Mtr_InitGroupTree</a>
294 <a href="mtrAllDet.html#Mtr_MakeGroup">Mtr_MakeGroup</a>
295 </code>
297 <dt><pre>
298 int <i></i>
299 <a name="Mtr_SwapGroups"><b>Mtr_SwapGroups</b></a>(
300 MtrNode * <b>first</b>, <i>first node to be swapped</i>
301 MtrNode * <b>second</b> <i>second node to be swapped</i>
303 </pre>
304 <dd> Swaps two children of a tree node. Adjusts the high and low fields of the two nodes and their descendants. The two children must be adjacent. However, first may be the younger sibling of second. Returns 1 in case of success; 0 otherwise.
307 <dd> <b>Side Effects</b> None
311 </dl>
313 <hr>
315 Generated automatically by <code>extdoc</code> on 970123
317 </body></html>