ConstantRateSegment

class ConstantRateSegment(crLower: Double, tLower: Double, duration: Double, rate: Double) : RateSegmentIfc

Author

rossetti

Parameters

crLower

represents the cumulative rate at the beginning of the segment, must be >=0

tLower

represents the time at the beginning of the segment, must be >=0

duration

represents the time duration of the segment, must be >=0

rate

represents the rate for the time segment, must be 0 < rate <= infinity

Constructors

Link copied to clipboard
constructor(crLower: Double, tLower: Double, duration: Double, rate: Double)

Properties

Link copied to clipboard

the width of the interval on the cumulative rate scale (crWidth = crUL - crLL)

Link copied to clipboard
open override val cumulativeRateLowerLimit: Double

the lower limit of the interval on cumulative rate scale

Link copied to clipboard
open override val cumulativeRateUpperLimit: Double

the upper limit of the interval on the cumulative rate scale

Link copied to clipboard
open override val rateAtLowerTimeLimit: Double

the rate for the interval

Link copied to clipboard
open override val rateAtUpperTimeLimit: Double

The rate at the upper time limit is undefined Double.NaN. The rate for the segment is constant throughout the interval but undefined at the end of the interval

Link copied to clipboard
open override val timeRangeLowerLimit: Double

the lower limit of the interval on the timescale

Link copied to clipboard
open override val timeRangeUpperLimit: Double

the upper limit of the interval on the timescale

Link copied to clipboard
open override val timeRangeWidth: Double

the width of the interval on the timescale (tWidth = tUL - tLL)

Functions

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

Returns true if the supplied time is within this rate segments time interval

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

Returns the value of the cumulative rate function for the interval given a value of time within that interval

Link copied to clipboard
open override fun instance(): ConstantRateSegment

Returns a new instance of the rate segment

Link copied to clipboard
open override fun inverseCumulativeRate(cumRate: Double): Double

Returns the inverse of the cumulative rate function given the interval and a cumulative rate value within that interval. Returns a time

Link copied to clipboard
fun rate(): Double

Returns the rate for the interval

open override fun rate(time: Double): Double

Gets the rate for the time within the interval

Link copied to clipboard
open override fun toString(): String