freegs.optimise.weighted_sum

Contents

freegs.optimise.weighted_sum#

freegs.optimise.weighted_sum(*args)[source]#

Combine measures together

Returns a function which takes a single argument (the equilibrium), and passes it to a set of given functions. These functions are assumed to return values, which are multiplied by weights, summed and returned.

args should be either functions or pairs of functions and weights. If no weights are supplied then a weight of 1.0 is assumed.