PiecewiseConstantRateFunction

Adds the segments represented by the duration, rate pairs The arrays must be the same length, not null, and have at least 1 pair

Author

rossetti

Parameters

durations

the durations

rates

the rates

Constructors

Link copied to clipboard
constructor(durations: DoubleArray, rates: DoubleArray)

Properties

Link copied to clipboard
open override val durations: DoubleArray

Get the durations as an array

Link copied to clipboard
open override val rates: DoubleArray

Get the rates as an array

Functions

Link copied to clipboard
open operator override fun contains(time: Double): Boolean

Returns true if the supplied time is within the time range of the rate function

Link copied to clipboard
open override fun findTimeInterval(time: Double): Int

Searches for the interval that the supplied time falls within. Returns -1 if no interval is found

Link copied to clipboard

Returns a copy of the piecewise constance rate function

open override fun instance(factor: Double): PiecewiseConstantRateFunction

Returns a copy of the piecewise constance rate function with each rate multiplied by the addFactor