pytvx.TvfSum

class pytvx.TvfSum(tvf_operands: Iterable[pytvx.PyTvf], const_val: float = 0.0)[source]

Bases: pytvx.PyTvf

A PyTvf that whose value at any given time is the sum of the values of a collection of other PyTvf instances at that time.

This class implements an optimization such that if two PyTvf instances are added the result is a new PyTvf that sums all the terms from the two instances.

Parameters
  • tvf_operands – The values to be summed up.

  • const_val – An optional constant value added to the sum.

Methods

indent_repr

__call__(t: float) float[source]

Compute the floating point value of this object at a given time.

Parameters

t – The time at which to evaluate.

Returns

The value at time t.

Return type

float