iw.function_fab

stairsum

iw.function_fab.stairsum.stairsum()

stairsum function This function computes the sum of two stairs functions. The stairs functions are assumed to be right continuous, with discontinuities at points q, qq, and respective values at this points given respectively by R and RR

  • Inputs:

Parameters
  • q (1d double array) – vector of the discontinuities points of the first function

  • R (1d double array) – vector of the same length as q, containing the values of the first function at points given by q

  • qq (1d double array) – vector of the discontinuities points of the second function

  • RR (1d double array) – vector of the same length as qq, containing the values of the second function at points given by qq

  • Output:

Returns

tuple of (qs, Rs) where qs vector of the discontinuities points of the sum of the two functions. Due to the continuity, some of the values of q or qq are ignored and Rs vector of the same length as qs, containing the values of the sum of the two

Return type

tuple of 2 arrays