add accumulate function to nb.Budget
Add possibility to overwrite function that is used for generating the total noise trace in an nb.Budget
. This is done by introducing the accumulate
class variable, which is set to the function to be used.
Stylistic question: uses direct assignment of function to accumulate
and then type(self).accumulate
to call this function. Considered using @staticmethod
, but I don't know of a way to make the overwrite as clear and succinct then.
Edited by Sebastian Steinlechner