203 lines
13 KiB
HTML
203 lines
13 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module geosolver.clsolver</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="geosolver.html"><font color="#ffffff">geosolver</font></a>.clsolver</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/rick/Programming/Python/GeoSolver/geosolver/clsolver.py">/home/rick/Programming/Python/GeoSolver/geosolver/clsolver.py</a></font></td></tr></table>
|
|
<p><tt>A generic geometric constraint solver. <br>
|
|
<br>
|
|
This module provides basic functionality for <br>
|
|
ClusterSolver2D and ClusterSolver3D.<br>
|
|
<br>
|
|
The solver finds a generic solution<br>
|
|
for problems formulated by Clusters. The generic solution <br>
|
|
is a directed acyclic graph of Clusters and Methods. Particilar problems<br>
|
|
and solutions are represented by a Configuration for each cluster.</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ee77aa">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.multimethod.html#MultiMethod">geosolver.multimethod.MultiMethod</a>(<a href="geosolver.method.html#Method">geosolver.method.Method</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.clsolver.html#ClusterMethod">ClusterMethod</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="geosolver.clsolver.html#PrototypeMethod">PrototypeMethod</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.notify.html#Notifier">geosolver.notify.Notifier</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.clsolver.html#ClusterSolver">ClusterSolver</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="ClusterMethod">class <strong>ClusterMethod</strong></a>(<a href="geosolver.multimethod.html#MultiMethod">geosolver.multimethod.MultiMethod</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A derive is a method such that a single ouput cluster is a <br>
|
|
subconsraint of a single input cluster.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="geosolver.clsolver.html#ClusterMethod">ClusterMethod</a></dd>
|
|
<dd><a href="geosolver.multimethod.html#MultiMethod">geosolver.multimethod.MultiMethod</a></dd>
|
|
<dd><a href="geosolver.method.html#Method">geosolver.method.Method</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="ClusterMethod-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="ClusterMethod-prototype_constraints"><strong>prototype_constraints</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="ClusterMethod-status_str"><strong>status_str</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.multimethod.html#MultiMethod">geosolver.multimethod.MultiMethod</a>:<br>
|
|
<dl><dt><a name="ClusterMethod-execute"><strong>execute</strong></a>(self, inmap)</dt><dd><tt>calls multi_execute for each permutation of multi-valued input variables and collects<br>
|
|
result in multi-valued ouput variables. Subclasses should implement multi_execute.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.method.html#Method">geosolver.method.Method</a>:<br>
|
|
<dl><dt><a name="ClusterMethod-inputs"><strong>inputs</strong></a>(self)</dt><dd><tt>return a list of input variables<br>
|
|
<br>
|
|
If an attribute '_inputs' has been defined, a new list<br>
|
|
with the contents of that attribute will be returned. <br>
|
|
Subclasses may choose to initialise this variable or to <br>
|
|
override this function.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterMethod-outputs"><strong>outputs</strong></a>(self)</dt><dd><tt>return a list of output variables<br>
|
|
<br>
|
|
If an attribute '_outputs' has been defined, a new list<br>
|
|
with the contents of that attribute will be returned. <br>
|
|
Subclasses may choose to initialise this variable or to <br>
|
|
override this function.</tt></dd></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="ClusterSolver">class <strong>ClusterSolver</strong></a>(<a href="geosolver.notify.html#Notifier">geosolver.notify.Notifier</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Constraints are Clusers: Rigids, Hedgehogs and Balloons. <br>
|
|
After adding each cluster, the solver tries to merge<br>
|
|
clusters, adding new clusters and methods between clusters.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="ClusterSolver-__init__"><strong>__init__</strong></a>(self, dimension)</dt><dd><tt>Create a new empty solver</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-add"><strong>add</strong></a>(self, cluster)</dt><dd><tt>Add a cluster. <br>
|
|
<br>
|
|
arguments:<br>
|
|
cluster: A Rigid</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-angles"><strong>angles</strong></a>(self)</dt><dd><tt>get list of angles</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-balloons"><strong>balloons</strong></a>(self)</dt><dd><tt>get list of balloons</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-contains"><strong>contains</strong></a>(self, obj)</dt></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-distances"><strong>distances</strong></a>(self)</dt><dd><tt>get list of distances</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-find_dependend"><strong>find_dependend</strong></a>(self, object)</dt><dd><tt>Return a list of objects that depend on given object directly.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-find_depends"><strong>find_depends</strong></a>(self, object)</dt><dd><tt>Return a list of objects that the given object depends on directly</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-get"><strong>get</strong></a>(self, cluster)</dt><dd><tt>Return a set of configurations associated with a cluster</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-hedgehogs"><strong>hedgehogs</strong></a>(self)</dt><dd><tt>get list of hedgehogs</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-is_top_level"><strong>is_top_level</strong></a>(self, object)</dt></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-methods"><strong>methods</strong></a>(self)</dt><dd><tt>get list of methods</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-remove"><strong>remove</strong></a>(self, cluster)</dt><dd><tt>Remove a cluster. <br>
|
|
All dependend objects are also removed.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-rigids"><strong>rigids</strong></a>(self)</dt><dd><tt>get list of rigids</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-set"><strong>set</strong></a>(self, cluster, configurations)</dt><dd><tt>Associate a list of configurations with a cluster</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-set_root"><strong>set_root</strong></a>(self, rigid)</dt><dd><tt>Make given rigid cluster the root cluster<br>
|
|
<br>
|
|
arguments:<br>
|
|
cluster: A Rigid</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-top_level"><strong>top_level</strong></a>(self)</dt><dd><tt>get top-level objects</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-variables"><strong>variables</strong></a>(self)</dt><dd><tt>get list of variables</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.notify.html#Notifier">geosolver.notify.Notifier</a>:<br>
|
|
<dl><dt><a name="ClusterSolver-add_listener"><strong>add_listener</strong></a>(self, listener)</dt><dd><tt>add a listener to the list (and self to listers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-rem_listener"><strong>rem_listener</strong></a>(self, listener)</dt><dd><tt>remove a listener from the list (and self from listers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ClusterSolver-send_notify"><strong>send_notify</strong></a>(self, message)</dt><dd><tt>send a message to all listeners</tt></dd></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="PrototypeMethod">class <strong>PrototypeMethod</strong></a>(<a href="geosolver.multimethod.html#MultiMethod">geosolver.multimethod.MultiMethod</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A <a href="#PrototypeMethod">PrototypeMethod</a> selects those solutions of a cluster for which<br>
|
|
the protoype and the solution satisfy the same constraints.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="geosolver.clsolver.html#PrototypeMethod">PrototypeMethod</a></dd>
|
|
<dd><a href="geosolver.multimethod.html#MultiMethod">geosolver.multimethod.MultiMethod</a></dd>
|
|
<dd><a href="geosolver.method.html#Method">geosolver.method.Method</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="PrototypeMethod-__init__"><strong>__init__</strong></a>(self, incluster, selclusters, outcluster, constraints)</dt></dl>
|
|
|
|
<dl><dt><a name="PrototypeMethod-multi_execute"><strong>multi_execute</strong></a>(self, inmap)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.multimethod.html#MultiMethod">geosolver.multimethod.MultiMethod</a>:<br>
|
|
<dl><dt><a name="PrototypeMethod-execute"><strong>execute</strong></a>(self, inmap)</dt><dd><tt>calls multi_execute for each permutation of multi-valued input variables and collects<br>
|
|
result in multi-valued ouput variables. Subclasses should implement multi_execute.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.method.html#Method">geosolver.method.Method</a>:<br>
|
|
<dl><dt><a name="PrototypeMethod-inputs"><strong>inputs</strong></a>(self)</dt><dd><tt>return a list of input variables<br>
|
|
<br>
|
|
If an attribute '_inputs' has been defined, a new list<br>
|
|
with the contents of that attribute will be returned. <br>
|
|
Subclasses may choose to initialise this variable or to <br>
|
|
override this function.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="PrototypeMethod-outputs"><strong>outputs</strong></a>(self)</dt><dd><tt>return a list of output variables<br>
|
|
<br>
|
|
If an attribute '_outputs' has been defined, a new list<br>
|
|
with the contents of that attribute will be returned. <br>
|
|
Subclasses may choose to initialise this variable or to <br>
|
|
override this function.</tt></dd></dl>
|
|
|
|
</td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#eeaa77">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-is_information_increasing"><strong>is_information_increasing</strong></a>(method)</dt></dl>
|
|
</td></tr></table>
|
|
</body></html> |