estimator.cost.Cost.repeat

Contents

estimator.cost.Cost.repeat#

Cost.repeat(times, select=None)[source]#

Return a report with all costs multiplied by times.

Parameters:
  • times – the number of times it should be run

  • select – toggle which fields ought to be repeated and which should not

Returns:

a new cost estimate

EXAMPLE:

>>> from estimator.cost import Cost
>>> c0 = Cost(a=1, b=2)
>>> c0.register_impermanent(a=True, b=False)
>>> c0.repeat(1000)
a: 1000, b: 2, ↻: 1000

TESTS:

>>> from estimator.cost import Cost
>>> Cost(rop=1).repeat(1000).repeat(1000)
rop: ≈2^19.9, ↻: ≈2^19.9