145 lines
9.3 KiB
HTML
145 lines
9.3 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module geosolver.multimethod</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>.multimethod</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/multimethod.py">/home/rick/Programming/Python/GeoSolver/geosolver/multimethod.py</a></font></td></tr></table>
|
|
<p><tt>Base classes for multi-valued assignments in methodgraphs</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.method.html#Method">geosolver.method.Method</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.multimethod.html#MultiMethod">MultiMethod</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.multimethod.html#SumProdMethod">SumProdMethod</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
</dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.multimethod.html#MultiVariable">MultiVariable</a>
|
|
</font></dt></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="MultiMethod">class <strong>MultiMethod</strong></a>(<a href="geosolver.method.html#Method">geosolver.method.Method</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A <a href="geosolver.method.html#Method">Method</a> that is executed for multiple alternative inputs, resulting<br>
|
|
in multiple output values. <br>
|
|
<br>
|
|
Input may optionally contain <a href="#MultiVariable">MultiVariable</a> instances.<br>
|
|
There must be a single <a href="#MultiVariable">MultiVariable</a> output variable <br>
|
|
<br>
|
|
Subclasses should implement the 'multi_execute' method, not overide the 'execute' method.<br>
|
|
This method is called for every permutation of values of multi-valued input variables.<br>
|
|
<br>
|
|
Any input variables that are instances of <a href="#MultiVariable">MultiVariable</a> will be replaced by their<br>
|
|
shadowed counterpart in the input map for multi_execute.<br>
|
|
<br>
|
|
The 'multi_execute' method must return a list of possible values for the output variable.<br>
|
|
The output values returned by subsequent calls multi-execute are collected and stored in the <br>
|
|
output <a href="#MultiVariable">MultiVariable</a>.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="MultiMethod-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Call this initialize after _inputs and _outputs has been set</tt></dd></dl>
|
|
|
|
<dl><dt><a name="MultiMethod-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="MultiMethod-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="MultiMethod-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="MultiVariable">class <strong>MultiVariable</strong></a></font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>For representing multi-valued variables<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="MultiVariable-__init__"><strong>__init__</strong></a>(self, name<font color="#909090">=None</font>)</dt></dl>
|
|
|
|
<dl><dt><a name="MultiVariable-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="MultiVariable-__str__"><strong>__str__</strong></a>(self)</dt></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="SumProdMethod">class <strong>SumProdMethod</strong></a>(<a href="geosolver.multimethod.html#MultiMethod">MultiMethod</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A <a href="#MultiMethod">MultiMethod</a> that assigns the sum and product of its input to it's ouput <a href="#MultiVariable">MultiVariable</a><br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="geosolver.multimethod.html#SumProdMethod">SumProdMethod</a></dd>
|
|
<dd><a href="geosolver.multimethod.html#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="SumProdMethod-__init__"><strong>__init__</strong></a>(self, a, b, c)</dt></dl>
|
|
|
|
<dl><dt><a name="SumProdMethod-multi_execute"><strong>multi_execute</strong></a>(self, inmap)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="geosolver.multimethod.html#MultiMethod">MultiMethod</a>:<br>
|
|
<dl><dt><a name="SumProdMethod-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="SumProdMethod-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="SumProdMethod-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="-test"><strong>test</strong></a>()</dt></dl>
|
|
</td></tr></table>
|
|
</body></html> |