Package SloppyCell :: Module Collections :: Class CalculationCollection
[hide private]

Class CalculationCollection

source code

         object --+        
                  |        
               list --+    
                      |    
KeyedList_mod.KeyedList --+
                          |
                         CalculationCollection


CalculationCollection(calculation name list)

An CalculationCollection unites a collection of calculations. It is
responsible for generating a master list of parameters and passing each
Calculation its appropriate parameters.

Individual calculations can be accessed via dictionary-type indexing.

XXX: Note that the parameter shuffling has not been extensively tested.

Instance Methods [hide private]
new list

__init__(self, calcList=[])
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
AddCalculation(self, calc)
LoadCalculations(calculations name list)
source code
 
Calculate(self, varsByCalc, params=None)
Calculate model predictions for everything in varsByCalc.
source code
 
CalculateSensitivity(self, varsByCalc, params=None)
Calculate sensitivities for model predictions of everything in varsByCalc.
source code
 
GetParameters(self)
Return a deep copy of the collections parameter KeyedList.
source code

Inherited from KeyedList_mod.KeyedList: __add__, __copy__, __deepcopy__, __delitem__, __delslice__, __iadd__, __imul__, __mul__, __repr__, __rmul__, __str__, append, copy, deepcopy, del_by_key, extend, get, getByKey, has_key, indexByKey, index_by_key, insert, insert_item, items, keys, pop, pop_item, pop_key, pop_value, remove, removeByKey, remove_by_key, remove_by_value, reverse, set, setByKey, setOrder, set_order, setdefault, sort, sort_by_key, sort_by_value, update, values

Inherited from list: __contains__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __reversed__, __setitem__, __setslice__, count, index

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, calcList=[])
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Returns:
new list

Overrides: object.__init__
(inherited documentation)

AddCalculation(self, calc)

source code 

LoadCalculations(calculations name list)

Adds the calculations in the list to the collection and adds their
parameters to the parameterSet

Calculate(self, varsByCalc, params=None)

source code 

Calculate model predictions for everything in varsByCalc.

varsByCalc is a dictionary of the form:
    dict[calc name][dep var] = ind var

The return dictionary is of the form:
    dictionary[calc name][dep var][ind var] = result

CalculateSensitivity(self, varsByCalc, params=None)

source code 

Calculate sensitivities for model predictions of everything in 
varsByCalc.

varsByCalc is a dictionary of the form:
    dict[calc name][dep var] = ind var

The return dictionary is of the form:
    dictionary[calc name][dep var][ind var][param] = result