geosolver.multimethod
index
/home/rick/Programming/Python/GeoSolver/geosolver/multimethod.py

Base classes for multi-valued assignments in methodgraphs

 
Classes
       
geosolver.method.Method
MultiMethod
SumProdMethod
MultiVariable

 
class MultiMethod(geosolver.method.Method)
    A Method that is executed for multiple alternative inputs, resulting
in multiple output values. 
 
Input may optionally contain MultiVariable instances.
There must be a single MultiVariable output variable 
 
Subclasses should implement the 'multi_execute' method, not overide the 'execute' method.
This method is called for every permutation of values of multi-valued input variables.
 
Any input variables that are instances of MultiVariable will be replaced by their
shadowed counterpart in the input map for multi_execute.
 
The 'multi_execute' method must return a list of possible values for the output variable.
The output values returned by subsequent calls multi-execute are collected and stored in the 
output MultiVariable.
 
  Methods defined here:
__init__(self)
Call this initialize after _inputs and _outputs has been set
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
class MultiVariable
    For representing multi-valued variables
 
  Methods defined here:
__init__(self, name=None)
__repr__(self)
__str__(self)

 
class SumProdMethod(MultiMethod)
    A MultiMethod that assigns the sum and product of its input to it's ouput MultiVariable
 
 
Method resolution order:
SumProdMethod
MultiMethod
geosolver.method.Method

Methods defined here:
__init__(self, a, b, c)
multi_execute(self, inmap)

Methods inherited from MultiMethod:
execute(self, inmap)
calls multi_execute for each permutation of multi-valued input variables and collects
result in multi-valued ouput variables. Subclasses should implement multi_execute.

Methods inherited from geosolver.method.Method:
inputs(self)
return a list of input variables
 
If an attribute '_inputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.
outputs(self)
return a list of output variables
 
If an attribute '_outputs' has been defined, a new list
with the contents of that attribute will be returned. 
Subclasses may choose to initialise this variable or to 
override this function.

 
Functions
       
test()