Skip to main content

Curve

Class of functions on which NetCal operators are defined. They are piecewise affine and ultimately pseudo-periodic. Pseudo-periodic means that f(t+d)=f(t)+cf(t + d) = f(t) + c, where cc is the step gained after each pseudo-period. Ultimately means that the function has such property for tTt \ge T.

note

Implementation of data structure described in [BT08] Section 4.1

public class Curve : IToCodeString, Unipi.Nancy.Utility.IStableHashCode

Inheritance ObjectCurve
Implements IToCodeString, IStableHashCode

Properties

PseudoPeriodStart

Point in time after which the curve has a pseudo-periodic behavior.

note

Referred to as TT or Rank in [BT08] Section 4.1

public Rational PseudoPeriodStart { get; set; }

Property Value

Rational

PseudoPeriodLength

Time length of each pseudo-period.

note

Referred to as dd in [BT08] Section 4.1

public Rational PseudoPeriodLength { get; set; }

Property Value

Rational

PseudoPeriodHeight

Static value gain applied after each pseudo-period. If it's 0, the curve is truly periodic.

note

Referred to as cc in [BT08] Section 4.1

public Rational PseudoPeriodHeight { get; set; }

Property Value

Rational

PseudoPeriodSlope

Average slope of curve in pseudo-periodic behavior. If it's 0, the curve is truly periodic.

public Rational PseudoPeriodSlope { get; }

Property Value

Rational

FirstPseudoPeriodEnd

End time of the first pseudo period.

public Rational FirstPseudoPeriodEnd { get; }

Property Value

Rational

SecondPseudoPeriodEnd

End time of the second pseudo period.

public Rational SecondPseudoPeriodEnd { get; }

Property Value

Rational

BaseSequence

Sequence describing behavior of the curve in [0,T+d[[0, T + d[. Combined with the UPP property, this is also allows to derive f(t)f(t) for any tT+dt \ge T + d.

note

Referred to as [t1,...,tk][t_1, ..., t_k] in [BT08] Section 4.1

public Sequence BaseSequence { get; set; }

Property Value

Sequence

IsFinite

True if the curve has finite value for any tt.

public bool IsFinite { get; }

Property Value

Boolean

FirstFiniteTime

The first instant around which the curve is not infinite. Does not specify whether it's inclusive or not, i.e. if f(t)f(t) is finite.

public Rational FirstFiniteTime { get; }

Property Value

Rational

FirstFiniteTimeExceptOrigin

The first instant around which the curve is not infinite, excluding the origin point. Does not specify whether it's inclusive or not, i.e. if f(t)f(t) is finite.

public Rational FirstFiniteTimeExceptOrigin { get; }

Property Value

Rational

FirstNonZeroTime

The first instant around which the curve is not 0. Does not specify whether it's inclusive or not, i.e. if f(t)=0f(\overline{t}) = 0.

public Rational FirstNonZeroTime { get; }

Property Value

Rational

PseudoPeriodStartInfimum

Returns the minimum TLT_L such that f(t+d)=f(t)+cf(t + d) = f(t) + c for all t>TLt > T_L. It is the infimum of all valid PseudoPeriodStart, i.e. TL=inf{Tf(t+d)=f(t)+ctT}T_L = \inf\{ T | f(t + d) = f(t) + c \forall t \ge T \}.

public Rational PseudoPeriodStartInfimum { get; }

Property Value

Rational

IsZero

True if the curve is 0 for all tt.

public bool IsZero { get; }

Property Value

Boolean

IsPlusInfinite

True if the curve has ++\infty value for any tt.

public bool IsPlusInfinite { get; }

Property Value

Boolean

IsMinusInfinite

True if the curve has -\infty value for any tt.

public bool IsMinusInfinite { get; }

Property Value

Boolean

IsContinuous

True if there is no infinite value or discontinuity within the curve.

public bool IsContinuous { get; }

Property Value

Boolean

IsContinuousExceptOrigin

True if there is no discontinuity within the curve, except at most in origin.

public bool IsContinuousExceptOrigin { get; }

Property Value

Boolean

IsLeftContinuous

True if there is no left-discontinuity within the curve.

public bool IsLeftContinuous { get; }

Property Value

Boolean

IsRightContinuous

True if there is no right-discontinuity within the curve.

public bool IsRightContinuous { get; }

Property Value

Boolean

IsNonNegative

True if the curve is non-negative, i.e. f(t)0f(t) \ge 0 for any tt.

public bool IsNonNegative { get; }

Property Value

Boolean

FirstNonNegativeTime

The first instant around which the curve is non-negative. Does not specify whether it's inclusive or not, i.e. if f(t)>=0f(\overline{t}) >= 0.

public Rational FirstNonNegativeTime { get; }

Property Value

Rational

IsNonDecreasing

True if for any t>st > s, f(t)f(s)f(t) \ge f(s).

public bool IsNonDecreasing { get; }

Property Value

Boolean

IsUltimatelyFinite

True if for all tt \ge PseudoPeriodStart the curve is finite.

note

This property does not check if f(t),t<f(t), t < PseudoPeriodStart is either infinite, finite or both.

public bool IsUltimatelyFinite { get; }

Property Value

Boolean

IsUltimatelyInfinite

True if, for b{,+}b \in \{-\infty, +\infty\} and some TT, f(t)=bf(t) = b for all tTt \ge T.

public bool IsUltimatelyInfinite { get; }

Property Value

Boolean

IsUltimatelyPlain

True if for all t>t > PseudoPeriodStart the curve is either always finite or always infinite.

note

Defined in [BT08], Definition 1.

public bool IsUltimatelyPlain { get; }

Property Value

Boolean

IsPlain

True if ff is plain, i.e., it is either a) always finite, b) always plus or minus infinite (without changing sign), or c) finite up to a TT, then always plus or minus infinite (without changing sign)

note

Formally defined in [BT08], Definition 1.

public bool IsPlain { get; }

Property Value

Boolean

IsUltimatelyAffine

True if for all tt \ge PseudoPeriodStart the curve is affine.

public bool IsUltimatelyAffine { get; }

Property Value

Boolean

IsUltimatelyConstant

True if for tt \ge PseudoPeriodStart the curve is constant.

public bool IsUltimatelyConstant { get; }

Property Value

Boolean

IsSubAdditive

True if the curve is sub-additive, i.e. f(t+s)f(t)+f(s)f(t+s) \le f(t) + f(s).

note

Based on [Zippo23] Lemma 9.3: f(0)0,ff(0) \ge 0, f is sub-additive     f=ff\iff f^\circ = f^\circ \otimes f^\circ, where ff^\circ is defined in WithZeroOrigin(). Can be computationally expensive the first time it is invoked, the result is cached afterwards.

public bool IsSubAdditive { get; }

Property Value

Boolean

IsRegularSubAdditive

True if the curve is sub-additive with f(0)=0f(0) = 0.

public bool IsRegularSubAdditive { get; }

Property Value

Boolean

IsSuperAdditive

True if the curve is super-additive, i.e. f(t+s)f(t)+f(s)f(t+s) \ge f(t) + f(s).

note

Based on [Zippo23] Lemma 9.4: ff is super-additive     f=ff\iff f^\circ = f^\circ \overline{\otimes} f^\circ, where ff^\circ is defined in WithZeroOrigin(). Can be computationally expensive the first time it is invoked, the result is cached afterwards.

public bool IsSuperAdditive { get; }

Property Value

Boolean

IsRegularSuperAdditive

True if the curve is super-additive with f(0)=0f(0) = 0.

public bool IsRegularSuperAdditive { get; }

Property Value

Boolean

IsConcave

Tests if the curve is concave, i.e. for any two points (t,f(t))(t, f(t)) the straight line joining them is below ff.

note

The property is checked via the following property: ff is concave     \iff a) ff is continuous, or it is continuous for t>0t > 0 and f(0)f(0+)f(0) \le f(0^+), and b) ff is composed of segments with decreasing slopes.

public bool IsConcave { get; }

Property Value

Boolean

IsRegularConcave

Tests if the curve is concave with f(0)=0f(0) = 0.

public bool IsRegularConcave { get; }

Property Value

Boolean

IsConvex

Tests if the curve is convex, i.e. for any two points (t,f(t))(t, f(t)) the straight line joining them is above ff.

note

The property is checked via the following property: ff is convex     \iff a) ff is continuous, or it is continuous for t>0t > 0 and f(0)f(0+)f(0) \ge f(0^+), and b) ff is composed of segments with increasing slopes.

public bool IsConvex { get; }

Property Value

Boolean

IsRegularConvex

Tests if the curve is convex with f(0)=0f(0) = 0.

public bool IsRegularConvex { get; }

Property Value

Boolean

HasTransient

True if pseudo-periodic behavior starts at T>0T > 0.

public bool HasTransient { get; }

Property Value

Boolean

TransientSequence

Sequence describing the curve in [0,T[[0, T[, before pseudo-periodic behavior.

public Sequence TransientSequence { get; }

Property Value

Sequence

TransientElements

Elements describing the curve from [0,T[[0, T[, before pseudo-periodic behavior.

note

Referred to as [t1,...,ti01][t_1, ..., t_{i_0 - 1}] in [BT08] Section 4.1

public IEnumerable<Element> TransientElements { get; }

Property Value

IEnumerable<Element>

PseudoPeriodicSequence

Sequence describing the pseudo-periodic behavior of the curve in [T,T+d[[T, T + d[.

public Sequence PseudoPeriodicSequence { get; }

Property Value

Sequence

PseudoPeriodicElements

Elements describing the pseudo-periodic behavior of the curve in [T,T+d[[T, T + d[.

note

Referred to as [ti0,...,tk][t_{i_0}, ..., t_k] in [BT08] Section 4.1

public IEnumerable<Element> PseudoPeriodicElements { get; }

Property Value

IEnumerable<Element>

Constructors

Curve(Sequence, Rational, Rational, Rational)

Constructor.

public Curve(Sequence baseSequence, Rational pseudoPeriodStart, Rational pseudoPeriodLength, Rational pseudoPeriodHeight)

Parameters

baseSequence Sequence
Describes the curve in [0,T+d[[0, T + d[.

pseudoPeriodStart Rational
Time from which the curve is pseudo-periodic, TT.

pseudoPeriodLength Rational
Length of each pseudo-period, dd.

pseudoPeriodHeight Rational
Height gained after each pseudo-period, cc.

Curve(Sequence, Rational, Rational, Rational, Boolean)

Constructor.

public Curve(Sequence baseSequence, Rational pseudoPeriodStart, Rational pseudoPeriodLength, Rational pseudoPeriodHeight, bool isPartialCurve)

Parameters

baseSequence Sequence
Describes the curve in [0,T+d[[0, T + d[.

pseudoPeriodStart Rational
Time from which the curve is pseudo-periodic, TT.

pseudoPeriodLength Rational
Length of each pseudo-period, dd.

pseudoPeriodHeight Rational
Height gained after each pseudo-period, cc.

isPartialCurve Boolean
True if the curve is partially described, and should be filled by pre- and post-pending ++\infty to BaseSequence.

Curve(Curve)

Copy constructor.

public Curve(Curve other)

Parameters

other Curve
The Curve object to copy from.

Methods

IsContinuousAt(Rational)

True if the curve is continuous at time.

public bool IsContinuousAt(Rational time)

Parameters

time Rational

Returns

Boolean

IsLeftContinuousAt(Rational)

True if the curve is continuous at time.

public bool IsLeftContinuousAt(Rational time)

Parameters

time Rational

Returns

Boolean

IsRightContinuousAt(Rational)

True if the curve is continuous at time.

public bool IsRightContinuousAt(Rational time)

Parameters

time Rational

Returns

Boolean

IsNonNegativeOverInterval(Rational, Nullable<Rational>, Boolean, Boolean)

True if the curve is non-negative over the given interval, i.e. i.e. f(t)0f(t) \ge 0 for any tt in the given interval.

public bool IsNonNegativeOverInterval(Rational start, Nullable<Rational> end, bool isStartIncluded, bool isEndIncluded)

Parameters

start Rational
Start of the interval.

end Nullable<Rational>
End of the interval. If not specified, it is assumed ++\infty.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed. If end is ++\infty, it has no effect.

Returns

Boolean

Exceptions

ArgumentException
If an invalid interval is given.

IsNonDecreasingOverInterval(Rational, Nullable<Rational>, Boolean, Boolean)

True if for any pair t,st,s in the given interval, t>st > s, f(t)f(s)f(t) \ge f(s).

public bool IsNonDecreasingOverInterval(Rational start, Nullable<Rational> end, bool isStartIncluded, bool isEndIncluded)

Parameters

start Rational
Start of the interval.

end Nullable<Rational>
End of the interval. If not specified, it is assumed ++\infty.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed. If end is ++\infty, it has no effect.

Returns

Boolean

Exceptions

ArgumentException
If an invalid interval is given.

IsLeftContinuousOverInterval(Rational, Nullable<Rational>, Boolean, Boolean)

True if for any t0t_0 interior (from the left) to the given interval, limtt0f(t)=f(t0)lim_{t \to t_0^-}{f(t)} = f(t_0).

note

See [Zippo23] Definition 14.4

public bool IsLeftContinuousOverInterval(Rational start, Nullable<Rational> end, bool isStartIncluded, bool isEndIncluded)

Parameters

start Rational
Start of the interval.

end Nullable<Rational>
End of the interval. If not specified, it is assumed ++\infty.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed. If end is ++\infty, it has no effect.

Returns

Boolean

Exceptions

ArgumentException
If an invalid interval is given.

IsRightContinuousOverInterval(Rational, Nullable<Rational>, Boolean, Boolean)

True if for any t0t_0 interior (from the right) to the given interval, limtt0+f(t)=f(t0)lim_{t \to t_0^+}{f(t)} = f(t_0).

note

See [Zippo23] Definition 14.5

public bool IsRightContinuousOverInterval(Rational start, Nullable<Rational> end, bool isStartIncluded, bool isEndIncluded)

Parameters

start Rational
Start of the interval.

end Nullable<Rational>
End of the interval. If not specified, it is assumed ++\infty.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed. If end is ++\infty, it has no effect.

Returns

Boolean

Exceptions

ArgumentException
If an invalid interval is given.

PlusInfinite()

Constructs a curve that is equal to ++\infty over any tt.

public static Curve PlusInfinite()

Returns

Curve

MinusInfinite()

Constructs a curve that is equal to -\infty over any tt.

public static Curve MinusInfinite()

Returns

Curve

Zero()

Constructs a curve that is equal to 0 over any tt.

public static Curve Zero()

Returns

Curve

Equals(Object)

public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

GetHashCode()

public int GetHashCode()

Returns

Int32

GetStableHashCode()

A stable hashcode.

public int GetStableHashCode()

Returns

Int32

Equivalent(Curve, ComputationSettings)

True if the curves represent the same function.

public bool Equivalent(Curve curve, ComputationSettings settings)

Parameters

curve Curve

settings ComputationSettings

Returns

Boolean

Equivalent(Curve, Curve, ComputationSettings)

True if the curves represent the same function.

public static bool Equivalent(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve

b Curve

settings ComputationSettings

Returns

Boolean

Equivalent(IEnumerable<Curve>, ComputationSettings)

True if all the curves in the set represent the same function.

public static bool Equivalent(IEnumerable<Curve> curves, ComputationSettings settings)

Parameters

curves IEnumerable<Curve>

settings ComputationSettings

Returns

Boolean

Exceptions

ArgumentException

EquivalentAfter(Curve, Curve, Rational, Boolean, ComputationSettings)

True if, starting from time, the curves represent the same function.

public static bool EquivalentAfter(Curve a, Curve b, Rational time, bool isStartIncluded, ComputationSettings settings)

Parameters

a Curve

b Curve

time Rational

isStartIncluded Boolean
If true, time is included in the comparison.

settings ComputationSettings

Returns

Boolean

FindFirstInequivalence(Curve, Curve, ComputationSettings)

Returns the first time around which the functions represented by the curves differ. Returns null if the two curves represent the same function. Mostly useful to debug curves that should be equivalent.

public static Nullable<Rational> FindFirstInequivalence(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve

b Curve

settings ComputationSettings

Returns

Nullable<Rational>

FindFirstInequivalenceAfter(Curve, Curve, Rational, Boolean, ComputationSettings)

Returns the first time around which the functions represented by the curves differ. Returns null if the two curves represent the same function. Mostly useful to debug curves that should be equivalent.

public static Nullable<Rational> FindFirstInequivalenceAfter(Curve a, Curve b, Rational time, bool isStartIncluded, ComputationSettings settings)

Parameters

a Curve

b Curve

time Rational

isStartIncluded Boolean
If true, time is included in the comparison.

settings ComputationSettings

Returns

Nullable<Rational>

EquivalentExceptOrigin(Curve, ComputationSettings)

True if the curves represent the same function, except for origin.

public bool EquivalentExceptOrigin(Curve curve, ComputationSettings settings)

Parameters

curve Curve

settings ComputationSettings

Returns

Boolean

EquivalentExceptOrigin(Curve, Curve, ComputationSettings)

True if the curves represent the same function, except for origin.

public static bool EquivalentExceptOrigin(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve

b Curve

settings ComputationSettings

Returns

Boolean

Dominance(Curve, Curve, ComputationSettings)

Checks if there is dominance between the curves given and, if so, returns their order.

note

If there is no dominance, the ordering has no actual meaning

public static ValueTuple<bool, Curve, Curve> Dominance(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve

b Curve

settings ComputationSettings

Returns

ValueTuple<Boolean, Curve, Curve>

AsymptoticDominance(Curve, Curve, ComputationSettings)

Checks if there is asymptotic dominance between the curves given and, if so, returns their order.

note

If there is no dominance, the ordering has no actual meaning

public static ValueTuple<bool, Curve, Curve> AsymptoticDominance(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve

b Curve

settings ComputationSettings

Returns

ValueTuple<Boolean, Curve, Curve>

Negate()

Returns the opposite function, g(t)=f(t)g(t) = -f(t).

public Curve Negate()

Returns

Curve

ValueAt(Rational, ComputationSettings)

Computes the value of the curve at given time tt.

public Rational ValueAt(Rational time, ComputationSettings settings)

Parameters

time Rational
The time of sampling.

settings ComputationSettings

Returns

Rational
The value of f(t)f(t).

RightLimitAt(Rational)

Computes the right limit of the curve at given time tt.

public Rational RightLimitAt(Rational time)

Parameters

time Rational
The target time of the limit.

Returns

Rational
The value of f(t+)f(t^+).

LeftLimitAt(Rational)

Computes the left limit of the curve at given time tt.

public Rational LeftLimitAt(Rational time)

Parameters

time Rational
The target time of the limit.

Returns

Rational
The value of f(t)f(t^-).

Exceptions

ArgumentException
The argument is 0, as a curve is not defined for t<0t < 0.

GetElementAt(Rational, ComputationSettings)

Returns the Element that describes the curve in time t.

public Element GetElementAt(Rational time, ComputationSettings settings)

Parameters

time Rational
Time t of the sample.

settings ComputationSettings

Returns

Element
The element describing the curve at time t.

Exceptions

ArgumentException
Thrown if t is less than 0.

GetSegmentBefore(Rational)

Returns the Segment that describes the curve before time t.

public Segment GetSegmentBefore(Rational time)

Parameters

time Rational
Time t of the sample.

Returns

Segment
The describing the curve before time t, or null if there is none.

Exceptions

ArgumentException
Thrown if time 0 is given, as a curve is not defined before 0.

GetSegmentAfter(Rational, Boolean)

Returns the Segment that describes the curve after time tt.

public Segment GetSegmentAfter(Rational time, bool autoMerge)

Parameters

time Rational
Time t of the sample.

autoMerge Boolean

If true, it seeks for possible merges to return the longest finite-length segment, i.e., such that either ff is not differentiable at its end time or the segment length extends to ++\infty.

Returns

Segment
The describing the curve after time t.

Match(Element, ComputationSettings)

True if the given element matches, in its support, with the curve.

public bool Match(Element element, ComputationSettings settings)

Parameters

element Element

settings ComputationSettings

Returns

Boolean

Match(Sequence, ComputationSettings)

True if the given sequence matches, in its interval, with the curve.

public bool Match(Sequence sequence, ComputationSettings settings)

Parameters

sequence Sequence

settings ComputationSettings

Returns

Boolean

CutAsEnumerable(Rational, Rational, Boolean, Boolean, ComputationSettings)

Returns a cut of the curve limited to the given interval.

note

Optimized for minimal allocations.

public IEnumerable<Element> CutAsEnumerable(Rational cutStart, Rational cutEnd, bool isStartIncluded, bool isEndIncluded, ComputationSettings settings)

Parameters

cutStart Rational
Left endpoint of the interval.

cutEnd Rational
Right endpoint of the interval.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed.

settings ComputationSettings

Returns

IEnumerable<Element>
A list of elements equivalently defined within the given interval.

Cut(Rational, Rational, Boolean, Boolean, ComputationSettings)

Returns a cut of the curve limited to the given interval.

public Sequence Cut(Rational cutStart, Rational cutEnd, bool isStartIncluded, bool isEndIncluded, ComputationSettings settings)

Parameters

cutStart Rational
Left endpoint of the interval.

cutEnd Rational
Right endpoint of the interval.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed.

settings ComputationSettings

Returns

Sequence
A sequence equivalently defined within the given interval.

Extend(Rational, ComputationSettings)

Generates an extended view on the curve, describing it in [0,tend[[0, t_{end}[.

note

This is a shorthand for Cut(Rational, Rational, Boolean, Boolean, ComputationSettings) which follows, minus the restrictions, the definition in [BT08] Section 4.1

public Sequence Extend(Rational targetEnd, ComputationSettings settings)

Parameters

targetEnd Rational

Exclusive end tendt_{end} of the resulting Sequence. It is not required to be greater than FirstPseudoPeriodEnd.

settings ComputationSettings

Returns

Sequence
A sequence equivalently defined from 0 to tendt_{end}.

Count(Rational, Rational, Boolean, Boolean)

Returns the number of elements of a cut of the curve limited to the given interval.

public int Count(Rational cutStart, Rational cutEnd, bool isStartIncluded, bool isEndIncluded)

Parameters

cutStart Rational
Left endpoint of the interval.

cutEnd Rational
Right endpoint of the interval.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed.

Returns

Int32
The number of elements of the sequence equivalently defined within the given interval.

TimeAt(Rational)

Computes the first time the curve is at or above given value, i.e., f1(x)=inf{t:f(t)x}f^{-1}_\downarrow(x) = \inf \left\{ t : f(t) \ge x \right \}

note

The current implementation uses ToUpperNonDecreasing() and LowerPseudoInverse(). Thus it is useful as a shortcut but not to optimize computation of f1(x)f^{-1}_\downarrow(x) for a single point.

public Rational TimeAt(Rational value)

Parameters

value Rational
The value to reach.

Returns

Rational
The first time t at which f(t)f(t) = value, or ++\infty if it is never reached.

Decompose(Nullable<Rational>, Boolean, Boolean)

Splits the curve into two, ftf_t and fpf_p, so that f=ftfpf = f_t \wedge f_p (if minDecomposition is true) or f=ftfpf = f_t \vee f_p (if minDecomposition is false).

public ValueTuple<Curve, Curve> Decompose(Nullable<Rational> splitTime, bool leftIncludesEndPoint, bool minDecomposition)

Parameters

splitTime Nullable<Rational>
Time at which to split the curve. Defaults to PseudoPeriodStart.

leftIncludesEndPoint Boolean

If true, and splitTime is T>0T > 0, the support of ftf_t will be [0,T][0, T]. If false, it will be [0,T[[0, T[.

minDecomposition Boolean

If true (default), the parts have value ++\infty outside their support, i.e., they can be recomposed by computing their minimum. Conversely, if false the parts have value -\infty outside their support, i.e., they can be recomposed by computing their maximum.

Returns

ValueTuple<Curve, Curve>
A tuple containing the two parts. If is 0, the left part will be null.

Exceptions

ArgumentException
If is 0\le 0.

ToString()

Returns string serialization in Json format.

public string ToString()

Returns

String

FromJson(String)

Deserializes a Curve.

public static Curve FromJson(string json)

Parameters

json String

Returns

Curve

ToCodeString(Boolean, Int32)

Returns a string containing C# code to create this Curve. Useful to copy and paste from a debugger into another test or notebook for further investigation.

public string ToCodeString(bool formatted, int indentation)

Parameters

formatted Boolean

indentation Int32

Returns

String

Scale(Rational)

Scales the curve by a multiplicative factor, i.e. g(t)=kf(t)g(t) = k \cdot f(t).

public Curve Scale(Rational scaling)

Parameters

scaling Rational

Returns

Curve

DelayBy(Rational)

Delays the curve, adding a 0-valued padding at the start.

public Curve DelayBy(Rational delay)

Parameters

delay Rational

Returns

Curve

AnticipateBy(Rational)

Anticipates the curve, removing the parts from 0 to the given time.

public Curve AnticipateBy(Rational time)

Parameters

time Rational

Returns

Curve

VerticalShift(Rational, Boolean)

Shifts the curve vertically by an additive factor, i.e. g(t)=k+f(t)g(t) = k + f(t).

public Curve VerticalShift(Rational shift, bool exceptOrigin)

Parameters

shift Rational

exceptOrigin Boolean

Returns

Curve

ToNonNegative()

Computes a non-negative version of this curve, i.e. a curve g(t)=f(t)g(t) = f(t) if f(t)>0f(t) > 0, g(t)=0g(t) = 0 otherwise.

note

Implements the non-negative closure defined in [DNC18] p. 45 .

public Curve ToNonNegative()

Returns

Curve

ToUpperNonDecreasing()

Computes the upper non-decreasing closure of this curve, i.e., the lowest curve g(t)f(t)g(t) \ge f(t) so that g(t+s)g(t)g(t + s) \ge g(t) for any t,s0t, s \ge 0.

note

This implements the upper non-decreasing closure defined in [DNC18] p. 45, although the implementation differs.

public Curve ToUpperNonDecreasing()

Returns

Curve

ToLowerNonDecreasing()

Computes the lower non-decreasing closure of this curve, i.e., the highest curve g(t)f(t)g(t) \le f(t) so that g(t+s)g(t)g(t + s) \ge g(t) for any t,s0t, s \ge 0.

public Curve ToLowerNonDecreasing()

Returns

Curve

ToLeftContinuous()

Computes a left-continuous version of this curve.

public Curve ToLeftContinuous()

Returns

Curve

ToRightContinuous()

Computes a right-continuous version of this curve.

public Curve ToRightContinuous()

Returns

Curve

WithZeroOrigin()

Enforces f(0)=0f(0) = 0, i.e. it returns f=min(f,δ0)f^\circ = \min \left( f, \delta_0 \right).

public Curve WithZeroOrigin()

Returns

Curve

LowerPseudoInverse()

Computes the lower pseudo-inverse function, f1(x)=inf{t:f(t)x}=sup{t:f(t)<x}f^{-1}_\downarrow(x) = \inf \left\{ t : f(t) \ge x \right\} = \sup \left\{ t : f(t) < x \right\}.

note

The result of this operation is left-continuous, thus is revertible, i.e. (f1)1=f\left(f^{-1}_\downarrow\right)^{-1}_\downarrow = f, only if ff is left-continuous, see [DNC18] § 3.2.1 . Algorithmic properties discussed in [ZNS23b].

public Curve LowerPseudoInverse()

Returns

Curve

Exceptions

ArgumentException
If the curve is not non-decreasing.

UpperPseudoInverse()

Computes the upper pseudo-inverse function, f1(x)=inf{t:f(t)>x}=sup{t:f(t)x}f^{-1}_\uparrow(x) = \inf\{ t : f(t) > x \} = \sup\{ t : f(t) \le x \}.

note

The result of this operation is right-continuous. If ff is right-continuous and f(t)>0f(t) > 0 for t>0t > 0, then the operation is revertible, i.e., (f1)1=f\left(f^{-1}_\uparrow\right)^{-1}_\uparrow = f, see [DNC18] § 3.2.1. Algorithmic properties discussed in [ZNS23b].

public Curve UpperPseudoInverse()

Returns

Curve

Exceptions

ArgumentException
If the curve is not non-decreasing.

LowerPseudoInverseOverInterval(Rational, Nullable<Rational>, Boolean, Boolean)

Computes the lower pseudo-inverse function over interval II, f,I1(x)f^{-1}_{\downarrow,I}(x). The support of the result will be the interval f(I)f(I), defined as the smallest interval containing all f(x)f(x) for xIx \in I. If 0I0 \in I, the support is extended to start from 0.

note

Defined and discussed in [ZNS23a].

public Curve LowerPseudoInverseOverInterval(Rational start, Nullable<Rational> end, bool isStartIncluded, bool isEndIncluded)

Parameters

start Rational
Start of the interval.

end Nullable<Rational>
End of the interval. If not specified, it is assumed ++\infty.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed. If end is ++\infty, it has no effect.

Returns

Curve

Exceptions

ArgumentException
If an invalid interval is given.

ArgumentException
If the curve is not non-decreasing or non-negative.

UpperPseudoInverseOverInterval(Rational, Nullable<Rational>, Boolean, Boolean)

Computes the upper pseudo-inverse function over interval DD, f,D1(x)f^{-1}_{\uparrow,D}(x). The support of the result will be the interval f(I)f(I), defined as the smallest interval containing all f(x)f(x) for xIx \in I.

note

Defined and discussed in [ZNS23a].

public Curve UpperPseudoInverseOverInterval(Rational start, Nullable<Rational> end, bool isStartIncluded, bool isEndIncluded)

Parameters

start Rational
Start of the interval.

end Nullable<Rational>
End of the interval. If not specified, it is assumed ++\infty.

isStartIncluded Boolean
If true, the interval is left-closed.

isEndIncluded Boolean
If true, the interval is right-closed. If end is ++\infty, it has no effect.

Returns

Curve

Exceptions

ArgumentException
If the curve is not non-decreasing or non-negative.

HorizontalDeviation(Curve, Curve, ComputationSettings)

Computes the horizontal deviation between the two curves, h(a,b)h(a, b). If a is an arrival curve and b a service curve, the result will be the worst-case delay.

public static Rational HorizontalDeviation(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve
Must be non-decreasing.

b Curve
Must be non-decreasing.

settings ComputationSettings

Returns

Rational
A non-negative horizontal deviation.

VerticalDeviation(Curve, Curve)

Computes the vertical deviation between the two curves, v(a,b)v(a, b). If a is an arrival curve and b a service curve, the result will be the worst-case backlog.

public static Rational VerticalDeviation(Curve a, Curve b)

Parameters

a Curve

b Curve

Returns

Rational
A non-negative vertical deviation.

SupValue()

If the curve is upper-bounded, i.e., exists xx such that f(t)xf(t) \le x for any t0t \ge 0, returns infx\inf x. Otherwise, returns ++\infty.

public Rational SupValue()

Returns

Rational

InfValue()

If the curve is lower-bounded, i.e., exists xx such that f(t)xf(t) \ge x for any t0t \ge 0, returns supx\sup x. Otherwise, returns -\infty.

public Rational InfValue()

Returns

Rational

Optimize()

Optimizes Curve representation by anticipating periodic start and reducing period length.

note

This method implements representation minimization, as discussed in [ZS23].

public Curve Optimize()

Returns

Curve
An equivalent minimal representation for the same curve.

Addition(Curve)

Implements (min, +)-algebra addition operation.

note

Defined in [BT08] Section 4.2

public Curve Addition(Curve b)

Parameters

b Curve
Second operand.

Returns

Curve
The curve resulting from the sum.

Addition(Curve, Curve)

Implements (min, +)-algebra addition operation.

note

Defined in [BT08] Section 4.2

public static Curve Addition(Curve a, Curve b)

Parameters

a Curve

b Curve

Returns

Curve
The curve resulting from the sum.

Addition(IEnumerable<Curve>, ComputationSettings)

Implements (min, +)-algebra addition operation over a set of curves.

public static Curve Addition(IEnumerable<Curve> curves, ComputationSettings settings)

Parameters

curves IEnumerable<Curve>

settings ComputationSettings

Returns

Curve
The curve resulting from the overall addition.

Addition(IReadOnlyCollection<Curve>, ComputationSettings)

Implements (min, +)-algebra addition operation over a set of curves.

public static Curve Addition(IReadOnlyCollection<Curve> curves, ComputationSettings settings)

Parameters

curves IReadOnlyCollection<Curve>

settings ComputationSettings

Returns

Curve
The curve resulting from the overall addition.

Subtraction(Curve, Boolean)

Implements subtraction operation between two curves.

public Curve Subtraction(Curve b, bool nonNegative)

Parameters

b Curve
Second operand.

nonNegative Boolean
If true, the result is non-negative.

Returns

Curve
The curve resulting from the subtraction.

Subtraction(Curve, Curve, Boolean)

Implements subtraction operation between two curves.

public static Curve Subtraction(Curve a, Curve b, bool nonNegative)

Parameters

a Curve
First operand.

b Curve
Second operand.

nonNegative Boolean
If true, the result is non-negative.

Returns

Curve
The curve resulting from the subtraction.

IsMinimumUltimatelyPseudoPeriodic(Curve, Curve)

True if fgf \wedge g is known to be ultimately pseudo-periodic. Tests the sufficient (but not necessary) conditions from [BT08].

note

If false, the result Minimum(Curve, ComputationSettings) may be invalid.

public static bool IsMinimumUltimatelyPseudoPeriodic(Curve f, Curve g)

Parameters

f Curve

g Curve

Returns

Boolean

Minimum(Curve, ComputationSettings)

Implements (min, +)-algebra minimum operation over two curves.

note

Defined in [BT08] Section 4.3

public Curve Minimum(Curve curve, ComputationSettings settings)

Parameters

curve Curve
Second operand.

settings ComputationSettings

Returns

Curve
The curve resulting from the minimum.

Minimum(Curve, Curve, ComputationSettings)

Implements (min, +)-algebra minimum operation over two curves.

note

Defined in [BT08] Section 4.3

public static Curve Minimum(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve
First operand.

b Curve
Second operand.

settings ComputationSettings

Returns

Curve
The curve resulting from the minimum.

Minimum(IReadOnlyCollection<Curve>, ComputationSettings)

Implements (min, +)-algebra minimum operation over a set of curves.

public static Curve Minimum(IReadOnlyCollection<Curve> curves, ComputationSettings settings)

Parameters

curves IReadOnlyCollection<Curve>

settings ComputationSettings

Returns

Curve
The curve resulting from the overall minimum.

Minimum(IEnumerable<Curve>, ComputationSettings)

Implements (min, +)-algebra minimum operation over a set of curves.

public static Curve Minimum(IEnumerable<Curve> curves, ComputationSettings settings)

Parameters

curves IEnumerable<Curve>

settings ComputationSettings

Returns

Curve
The curve resulting from the overall minimum.

IsMaximumUltimatelyPseudoPeriodic(Curve, Curve)

True if fgf \vee g is known to be ultimately pseudo-periodic. Tests the sufficient (but not necessary) conditions from [BT08].

note

If false, the result Maximum(Curve, ComputationSettings) may be invalid.

public static bool IsMaximumUltimatelyPseudoPeriodic(Curve f, Curve g)

Parameters

f Curve

g Curve

Returns

Boolean

Maximum(Curve, ComputationSettings)

Implements (max, +)-algebra maximum operation over two curves.

public Curve Maximum(Curve curve, ComputationSettings settings)

Parameters

curve Curve
Second operand.

settings ComputationSettings

Returns

Curve
The curve resulting from the maximum.

Maximum(Curve, Curve, ComputationSettings)

Implements (max, +)-algebra maximum operation over two curves.

public static Curve Maximum(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve
First operand.

b Curve
Second operand.

settings ComputationSettings

Returns

Curve
The curve resulting from the maximum.

Maximum(IReadOnlyCollection<Curve>, ComputationSettings)

Implements (max, +)-algebra maximum operation over a set of curves.

public static Curve Maximum(IReadOnlyCollection<Curve> curves, ComputationSettings settings)

Parameters

curves IReadOnlyCollection<Curve>

settings ComputationSettings

Returns

Curve
The curve resulting from the overall maximum.

Maximum(IEnumerable<Curve>, ComputationSettings)

Implements (max, +)-algebra maximum operation over a set of curves.

public static Curve Maximum(IEnumerable<Curve> curves, ComputationSettings settings)

Parameters

curves IEnumerable<Curve>

settings ComputationSettings

Returns

Curve
The curve resulting from the overall maximum.

Minimum(Element, ComputationSettings)

Computes the minimum between the curve and element. The element is considered to have e(t)=+e(t) = +\infty for any tt outside its support.

public Curve Minimum(Element e, ComputationSettings settings)

Parameters

e Element

settings ComputationSettings

Returns

Curve

Minimum(Curve, Element, ComputationSettings)

Computes the minimum between the curve and element. The element is considered to have e(t)=+e(t) = +\infty for any tt outside its support.

public static Curve Minimum(Curve c, Element e, ComputationSettings settings)

Parameters

c Curve

e Element

settings ComputationSettings

Returns

Curve

Minimum(Sequence, ComputationSettings)

Computes the minimum between the curve and sequence. The sequence is considered to have s(t)=+s(t) = +\infty for any tt outside its support.

public Curve Minimum(Sequence s, ComputationSettings settings)

Parameters

s Sequence

settings ComputationSettings

Returns

Curve

Minimum(Curve, Sequence, ComputationSettings)

Computes the minimum between the curve and sequence. The sequence is considered to have s(t)=+s(t) = +\infty for any tt outside its support.

public static Curve Minimum(Curve c, Sequence s, ComputationSettings settings)

Parameters

c Curve

s Sequence

settings ComputationSettings

Returns

Curve

Maximum(Element, ComputationSettings)

Computes the maximum between the curve and element. The element is considered to have e(t)=e(t) = -\infty for any tt outside its support.

public Curve Maximum(Element e, ComputationSettings settings)

Parameters

e Element

settings ComputationSettings

Returns

Curve

Maximum(Curve, Element, ComputationSettings)

Computes the maximum between the curve and element. The element is considered to have e(t)=+e(t) = +\infty for any tt outside its support.

public static Curve Maximum(Curve c, Element e, ComputationSettings settings)

Parameters

c Curve

e Element

settings ComputationSettings

Returns

Curve

Maximum(Sequence, ComputationSettings)

Computes the maximum between the curve and sequence. The sequence is considered to have s(t)=+s(t) = +\infty for any tt outside its support.

public Curve Maximum(Sequence s, ComputationSettings settings)

Parameters

s Sequence

settings ComputationSettings

Returns

Curve

Maximum(Curve, Sequence, ComputationSettings)

Computes the maximum between the curve and sequence. The sequence is considered to have s(t)=+s(t) = +\infty for any tt outside its support.

public static Curve Maximum(Curve c, Sequence s, ComputationSettings settings)

Parameters

c Curve

s Sequence

settings ComputationSettings

Returns

Curve

Convolution(Curve, ComputationSettings)

Computes the convolution of the two curves, fgf \otimes g.

note

Described in [BT08] Section 4.4

public Curve Convolution(Curve curve, ComputationSettings settings)

Parameters

curve Curve

settings ComputationSettings

Returns

Curve
The curve resulting from the convolution.

Convolution(Curve, Curve, ComputationSettings)

Computes the convolution of the two curves, aba \otimes b.

note

Described in [BT08] Section 4.4

public static Curve Convolution(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve
First operand.

b Curve
Second operand.

settings ComputationSettings

Returns

Curve
The result of the convolution.

Convolution(IReadOnlyCollection<Curve>, ComputationSettings)

Computes the convolution of a set of curves, fi\bigotimes{f_i}.

public static Curve Convolution(IReadOnlyCollection<Curve> curves, ComputationSettings settings)

Parameters

curves IReadOnlyCollection<Curve>
The set of curves to be convolved.

settings ComputationSettings

Returns

Curve
The curve resulting from the overall convolution.

Convolution(IEnumerable<Curve>, ComputationSettings)

Computes the convolution of a set of curves, fi\bigotimes{f_i}.

note

Optimized for minimal allocations.

public static Curve Convolution(IEnumerable<Curve> curves, ComputationSettings settings)

Parameters

curves IEnumerable<Curve>
The set of curves to be convolved.

settings ComputationSettings

Returns

Curve
The curve resulting from the overall convolution.

EstimateConvolution(Curve, Boolean, ComputationSettings)

Computes the number of elementary convolutions involved in computing the (min,+) convolution of the two curves, avoiding allocations as much as possible.

public long EstimateConvolution(Curve curve, bool countElements, ComputationSettings settings)

Parameters

curve Curve

countElements Boolean

If true, instead of counting only how many convolutions are done, it counts how many convolution elements are produced.

settings ComputationSettings

Returns

Int64
The number of elementary convolutions involved in computing the result of the (min,+) convolution, or the number of elements resulting from these convolutions if is true.

EstimateConvolution(Curve, Curve, Boolean, ComputationSettings)

Computes the number of elementary convolutions involved in computing the (min,+) convolution of the two curves, avoiding allocations as much as possible.

public static long EstimateConvolution(Curve f, Curve g, bool countElements, ComputationSettings settings)

Parameters

f Curve
First operand.

g Curve
Second operand.

countElements Boolean

If true, instead of counting only how many convolutions are done, it counts how many convolution elements are produced.

settings ComputationSettings

Returns

Int64
The number of elementary convolutions involved in computing the result of the (min,+) convolution, or the number of elements resulting from these convolutions if is true.

EstimateMaxPlusConvolution(Curve, Boolean, ComputationSettings)

Computes the number of elementary convolutions involved in computing the (max,+) convolution of the two curves, avoiding allocations as much as possible.

public long EstimateMaxPlusConvolution(Curve curve, bool countElements, ComputationSettings settings)

Parameters

curve Curve
Second operand.

countElements Boolean

If true, instead of counting only how many convolutions are done, it counts how many convolution elements are produced.

settings ComputationSettings

Returns

Int64
The number of elementary convolutions involved in computing the result of the (max,+) convolution, or the number of elements resulting from these convolutions if is true.

EstimateMaxPlusConvolution(Curve, Curve, Boolean, ComputationSettings)

Computes the number of elementary convolutions involved in computing the (max,+) convolution of the two curves, avoiding allocations as much as possible.

public static long EstimateMaxPlusConvolution(Curve f, Curve g, bool countElements, ComputationSettings settings)

Parameters

f Curve
First operand.

g Curve
Second operand.

countElements Boolean

If true, instead of counting only how many convolutions are done, it counts how many convolution elements are produced.

settings ComputationSettings

Returns

Int64
The number of elementary convolutions involved in computing the result of the (max,+) convolution, or the number of elements resulting from these convolutions if is true.

Deconvolution(Curve, ComputationSettings)

Computes the deconvolution of two curves, fgf \oslash g.

note

The result is not forced to have f(0)=0f(0) = 0, see WithZeroOrigin() to have this property. Described in [BT08] Section 4.5 .

public Curve Deconvolution(Curve curve, ComputationSettings settings)

Parameters

curve Curve

settings ComputationSettings

Returns

Curve
The result of the deconvolution.

Deconvolution(Curve, Curve, ComputationSettings)

Computes the deconvolution of the two curves, aba \oslash b.

note

The result is not forced to have f(0)=0f(0) = 0, see WithZeroOrigin() to have this property. Described in [BT08] Section 4.5 .

public static Curve Deconvolution(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve
First operand.

b Curve
Second operand.

settings ComputationSettings

Returns

Curve
The result of the deconvolution

SubAdditiveClosure(Curve, ComputationSettings)

Computes the sub-additive closure of the curve.

note

Described in [BT08] Section 4.6 as algorithm 5

public static SubAdditiveCurve SubAdditiveClosure(Curve curve, ComputationSettings settings)

Parameters

curve Curve

settings ComputationSettings

Returns

SubAdditiveCurve
The result of the sub-additive closure.

SubAdditiveClosure(ComputationSettings)

Computes the sub-additive closure of the curve.

note

Described in [BT08] Section 4.6 as algorithm 5

public SubAdditiveCurve SubAdditiveClosure(ComputationSettings settings)

Parameters

settings ComputationSettings

Returns

SubAdditiveCurve
The result of the sub-additive closure.

MaxPlusConvolution(Curve, ComputationSettings)

Computes the max-plus convolution of the two curves, fgf \overline{\otimes} g.

note

Adapted from the min-plus convolution algorithm described in [BT08] Section 4.4

public Curve MaxPlusConvolution(Curve curve, ComputationSettings settings)

Parameters

curve Curve

settings ComputationSettings

Returns

Curve
The curve resulting from the max-plus convolution.

MaxPlusConvolution(Curve, Curve, ComputationSettings)

Computes the max-plus convolution of the two curves, fgf \overline{\otimes} g.

note

Adapted from the min-plus convolution algorithm described in [BT08] Section 4.4

public static Curve MaxPlusConvolution(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve
First operand.

b Curve
Second operand.

settings ComputationSettings

Returns

Curve
The result of the max-plus convolution

MaxPlusConvolution(IReadOnlyCollection<Curve>, ComputationSettings)

Computes the max-plus convolution of a set of curves.

note

Max-plus operators are defined through min-plus operators, see [DNC18] Section 2.4

public static Curve MaxPlusConvolution(IReadOnlyCollection<Curve> curves, ComputationSettings settings)

Parameters

curves IReadOnlyCollection<Curve>
The set of curves to be convolved.

settings ComputationSettings

Returns

Curve
The curve resulting from the overall max-plus convolution.

MaxPlusConvolution(IEnumerable<Curve>, ComputationSettings)

Computes the max-plus convolution of a set of curves, fgf \overline{\otimes} g.

note

Max-plus operators are defined through min-plus operators, see [DNC18] Section 2.4

public static Curve MaxPlusConvolution(IEnumerable<Curve> curves, ComputationSettings settings)

Parameters

curves IEnumerable<Curve>
The set of curves to be convolved.

settings ComputationSettings

Returns

Curve
The curve resulting from the overall max-plus convolution.

MaxPlusDeconvolution(Curve, ComputationSettings)

Computes the max-plus deconvolution of two curves.

note

Max-plus operators are defined through min-plus operators, see [DNC18] Section 2.4

public Curve MaxPlusDeconvolution(Curve curve, ComputationSettings settings)

Parameters

curve Curve

settings ComputationSettings

Returns

Curve
The result of the max-plus deconvolution.

MaxPlusDeconvolution(Curve, Curve, ComputationSettings)

Computes the max-plus deconvolution of the two curves

note

Max-plus operators are defined through min-plus operators, see [DNC18] Section 2.4

public static Curve MaxPlusDeconvolution(Curve a, Curve b, ComputationSettings settings)

Parameters

a Curve
First operand.

b Curve
Second operand.

settings ComputationSettings

Returns

Curve
The result of the max-plus deconvolution

SuperAdditiveClosure(Curve, ComputationSettings)

Computes the super-additive closure of the curve.

note

Max-plus operators are defined through min-plus operators, see [DNC18] Section 2.4

public static SuperAdditiveCurve SuperAdditiveClosure(Curve curve, ComputationSettings settings)

Parameters

curve Curve

settings ComputationSettings

Returns

SuperAdditiveCurve
The result of the super-additive closure.

SuperAdditiveClosure(ComputationSettings)

Computes the super-additive closure of the curve.

note

Max-plus operators are defined through min-plus operators, see [DNC18] Section 2.4

public SuperAdditiveCurve SuperAdditiveClosure(ComputationSettings settings)

Parameters

settings ComputationSettings

Returns

SuperAdditiveCurve
The result of the super-additive closure.

Composition(Curve, ComputationSettings)

Compute the composition of this curve, ff, and gg, i.e. f(g(t))f(g(t)).

note

Algorithmic properties discussed in [ZNS23b].

public Curve Composition(Curve g, ComputationSettings settings)

Parameters

g Curve
Inner function, must be non-negative and non-decreasing.

settings ComputationSettings

Returns

Curve
The result of the composition.

Exceptions

ArgumentException
If the operands are not defined as expected.

Composition(Curve, Curve, ComputationSettings)

Compute the composition f(g(t))f(g(t)).

note

Algorithmic properties discussed in [ZNS23b].

public static Curve Composition(Curve f, Curve g, ComputationSettings settings)

Parameters

f Curve
Outer function.

g Curve
Inner function, must be non-negative and non-decreasing.

settings ComputationSettings

Returns

Curve
The result of the composition.

Exceptions

ArgumentException
If the operands are not defined as expected.