# 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) + c$, where $c$ is the step gained after each pseudo-period. Ultimately means that the function has such property for $t \ge T$.

Implementation of data structure described in [BT08] Section 4.1

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

Inheritance Object → Curve

Implements IToCodeString, IStableHashCode

## Properties

**PseudoPeriodStart**

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

Referred to as $T$ or Rank in [BT08] Section 4.1

`public Rational PseudoPeriodStart { get; set; }`

#### Property Value

**PseudoPeriodLength**

Time length of each pseudo-period.

Referred to as $d$ in [BT08] Section 4.1

`public Rational PseudoPeriodLength { get; set; }`

#### Property Value

**PseudoPeriodHeight**

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

Referred to as $c$ in [BT08] Section 4.1

`public Rational PseudoPeriodHeight { get; set; }`

#### Property Value

**PseudoPeriodSlope**

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

`public Rational PseudoPeriodSlope { get; }`

#### Property Value

**FirstPseudoPeriodEnd**

End time of the first pseudo period.

`public Rational FirstPseudoPeriodEnd { get; }`

#### Property Value

**SecondPseudoPeriodEnd**

End time of the second pseudo period.

`public Rational SecondPseudoPeriodEnd { get; }`

#### Property Value

**BaseSequence**

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

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

`public Sequence BaseSequence { get; set; }`

#### Property Value

**IsFinite**

True if the curve has finite value for any $t$.

`public bool IsFinite { get; }`

#### Property Value

**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)$ is finite.

`public Rational FirstFiniteTime { get; }`

#### Property Value

**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)$ is finite.

`public Rational FirstFiniteTimeExceptOrigin { get; }`

#### Property Value

**FirstNonZeroTime**

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

`public Rational FirstNonZeroTime { get; }`

#### Property Value

**PseudoPeriodStartInfimum**

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

`public Rational PseudoPeriodStartInfimum { get; }`

#### Property Value

**IsZero**

True if the curve is 0 for all $t$.

`public bool IsZero { get; }`

#### Property Value

**IsPlusInfinite**

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

`public bool IsPlusInfinite { get; }`

#### Property Value

**IsMinusInfinite**

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

`public bool IsMinusInfinite { get; }`

#### Property Value

**IsContinuous**

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

`public bool IsContinuous { get; }`

#### Property Value

**IsContinuousExceptOrigin**

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

`public bool IsContinuousExceptOrigin { get; }`

#### Property Value

**IsLeftContinuous**

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

`public bool IsLeftContinuous { get; }`

#### Property Value

**IsRightContinuous**

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

`public bool IsRightContinuous { get; }`

#### Property Value

**IsNonNegative**

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

`public bool IsNonNegative { get; }`

#### Property Value

**FirstNonNegativeTime**

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

`public Rational FirstNonNegativeTime { get; }`

#### Property Value

**IsNonDecreasing**

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

`public bool IsNonDecreasing { get; }`

#### Property Value

**IsUltimatelyFinite**

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

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

`public bool IsUltimatelyFinite { get; }`

#### Property Value

**IsUltimatelyInfinite**

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

`public bool IsUltimatelyInfinite { get; }`

#### Property Value

**IsUltimatelyPlain**

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

Defined in [BT08], Definition 1.

`public bool IsUltimatelyPlain { get; }`

#### Property Value

**IsPlain**

True if $f$ 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 $T$, then always plus or minus infinite (without changing sign)

Formally defined in [BT08], Definition 1.

`public bool IsPlain { get; }`

#### Property Value

**IsUltimatelyAffine**

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

`public bool IsUltimatelyAffine { get; }`

#### Property Value

**IsUltimatelyConstant**

True if for $t \ge$ PseudoPeriodStart the curve is constant.

`public bool IsUltimatelyConstant { get; }`

#### Property Value

**IsSubAdditive**

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

Based on [Zippo23] Lemma 9.3: $f(0) \ge 0, f$ is sub-additive $\iff f^\circ = f^\circ \otimes f^\circ$, where $f^\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

**IsRegularSubAdditive**

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

`public bool IsRegularSubAdditive { get; }`

#### Property Value

**IsSuperAdditive**

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

Based on [Zippo23] Lemma 9.4: $f$ is super-additive $\iff f^\circ = f^\circ \overline{\otimes} f^\circ$, where $f^\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

**IsRegularSuperAdditive**

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

`public bool IsRegularSuperAdditive { get; }`

#### Property Value

**IsConcave**

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

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

`public bool IsConcave { get; }`

#### Property Value

**IsRegularConcave**

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

`public bool IsRegularConcave { get; }`

#### Property Value

**IsConvex**

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

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

`public bool IsConvex { get; }`

#### Property Value

**IsRegularConvex**

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

`public bool IsRegularConvex { get; }`

#### Property Value

**HasTransient**

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

`public bool HasTransient { get; }`

#### Property Value

**TransientSequence**

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

`public Sequence TransientSequence { get; }`

#### Property Value

**TransientElements**

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

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

`public IEnumerable<Element> TransientElements { get; }`

#### Property Value

**PseudoPeriodicSequence**

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

`public Sequence PseudoPeriodicSequence { get; }`

#### Property Value

**PseudoPeriodicElements**

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

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

`public IEnumerable<Element> PseudoPeriodicElements { get; }`

#### Property Value

## 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[$.

`pseudoPeriodStart`

Rational

Time from which the curve is pseudo-periodic, $T$.

`pseudoPeriodLength`

Rational

Length of each pseudo-period, $d$.

`pseudoPeriodHeight`

Rational

Height gained after each pseudo-period, $c$.

**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[$.

`pseudoPeriodStart`

Rational

Time from which the curve is pseudo-periodic, $T$.

`pseudoPeriodLength`

Rational

Length of each pseudo-period, $d$.

`pseudoPeriodHeight`

Rational

Height gained after each pseudo-period, $c$.

`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

**IsLeftContinuousAt(Rational)**

True if the curve is continuous at `time`

.

`public bool IsLeftContinuousAt(Rational time)`

#### Parameters

`time`

Rational

#### Returns

**IsRightContinuousAt(Rational)**

True if the curve is continuous at `time`

.

`public bool IsRightContinuousAt(Rational time)`

#### Parameters

`time`

Rational

#### Returns

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

True if the curve is non-negative over the given interval, i.e. i.e. $f(t) \ge 0$ for any $t$ 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

#### Exceptions

ArgumentException

If an invalid interval is given.

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

True if for any pair $t,s$ in the given interval, $t > 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

#### Exceptions

ArgumentException

If an invalid interval is given.

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

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

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

#### Exceptions

ArgumentException

If an invalid interval is given.

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

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

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

#### Exceptions

ArgumentException

If an invalid interval is given.

**PlusInfinite()**

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

`public static Curve PlusInfinite()`

#### Returns

**MinusInfinite()**

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

`public static Curve MinusInfinite()`

#### Returns

**Zero()**

Constructs a curve that is equal to 0 over any $t$.

`public static Curve Zero()`

#### Returns

**Equals(Object)**

`public bool Equals(object obj)`

#### Parameters

`obj`

Object

#### Returns

**GetHashCode()**

`public int GetHashCode()`

#### Returns

**GetStableHashCode()**

A stable hashcode.

`public int GetStableHashCode()`

#### Returns

**Equivalent(Curve, ComputationSettings)**

True if the curves represent the same function.

`public bool Equivalent(Curve curve, ComputationSettings settings)`

#### Parameters

`curve`

Curve

`settings`

ComputationSettings

#### Returns

**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

**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

#### Exceptions

**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

**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

**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

**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

**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

**Dominance(Curve, Curve, ComputationSettings)**

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

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.

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)$.

`public Curve Negate()`

#### Returns

**ValueAt(Rational, ComputationSettings)**

Computes the value of the curve at given time $t$.

`public Rational ValueAt(Rational time, ComputationSettings settings)`

#### Parameters

`time`

Rational

The time of sampling.

`settings`

ComputationSettings

#### Returns

Rational

The value of $f(t)$.

**RightLimitAt(Rational)**

Computes the right limit of the curve at given time $t$.

`public Rational RightLimitAt(Rational time)`

#### Parameters

`time`

Rational

The target time of the limit.

#### Returns

Rational

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

**LeftLimitAt(Rational)**

Computes the left limit of the curve at given time $t$.

`public Rational LeftLimitAt(Rational time)`

#### Parameters

`time`

Rational

The target time of the limit.

#### Returns

Rational

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

#### Exceptions

ArgumentException

The argument is 0, as a curve is not defined for $t < 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 $t$.

`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 $f$ 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

**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

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

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

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, t_{end}[$.

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 $t_{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 $t_{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., $f^{-1}_\downarrow(x) = \inf \left\{ t : f(t) \ge x \right \}$

The current implementation uses ToUpperNonDecreasing() and LowerPseudoInverse(). Thus it is useful as a shortcut but not to optimize computation of $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)$ = value, or $+\infty$ if it is never reached.

**Decompose(Nullable<Rational>, Boolean, Boolean)**

Splits the curve into two, $f_t$ and $f_p$,
so that $f = f_t \wedge f_p$ (if `minDecomposition`

is true)
or $f = 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 > 0$, the support of $f_t$ will be $[0, T]$.
If false, it will be $[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 $\le 0$.

**ToString()**

Returns string serialization in Json format.

`public string ToString()`

#### Returns

**FromJson(String)**

Deserializes a Curve.

`public static Curve FromJson(string json)`

#### Parameters

`json`

String

#### Returns

**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

**Scale(Rational)**

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

`public Curve Scale(Rational scaling)`

#### Parameters

`scaling`

Rational

#### Returns

**DelayBy(Rational)**

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

`public Curve DelayBy(Rational delay)`

#### Parameters

`delay`

Rational

#### Returns

**AnticipateBy(Rational)**

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

`public Curve AnticipateBy(Rational time)`

#### Parameters

`time`

Rational

#### Returns

**VerticalShift(Rational, Boolean)**

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

`public Curve VerticalShift(Rational shift, bool exceptOrigin)`

#### Parameters

`shift`

Rational

`exceptOrigin`

Boolean

#### Returns

**ToNonNegative()**

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

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

`public Curve ToNonNegative()`

#### Returns

**ToUpperNonDecreasing()**

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

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

`public Curve ToUpperNonDecreasing()`

#### Returns

**ToLowerNonDecreasing()**

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

`public Curve ToLowerNonDecreasing()`

#### Returns

**ToLeftContinuous()**

Computes a left-continuous version of this curve.

`public Curve ToLeftContinuous()`

#### Returns

**ToRightContinuous()**

Computes a right-continuous version of this curve.

`public Curve ToRightContinuous()`

#### Returns

**WithZeroOrigin()**

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

`public Curve WithZeroOrigin()`

#### Returns

**LowerPseudoInverse()**

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

`public Curve LowerPseudoInverse()`

#### Returns

#### Exceptions

ArgumentException

If the curve is not non-decreasing.

**UpperPseudoInverse()**

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

`public Curve UpperPseudoInverse()`

#### Returns

#### Exceptions

ArgumentException

If the curve is not non-decreasing.

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

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

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

#### 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 $D$, $f^{-1}_{\uparrow,D}(x)$. The support of the result will be the interval $f(I)$, defined as the smallest interval containing all $f(x)$ for $x \in I$.

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

#### 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)$.
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)$.
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 $x$ such that $f(t) \le x$ for any $t \ge 0$, returns $\inf x$. Otherwise, returns $+\infty$.

`public Rational SupValue()`

#### Returns

**InfValue()**

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

`public Rational InfValue()`

#### Returns

**Optimize()**

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

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.

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.

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 $f \wedge g$ is known to be ultimately pseudo-periodic. Tests the sufficient (but not necessary) conditions from [BT08].

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

`public static bool IsMinimumUltimatelyPseudoPeriodic(Curve f, Curve g)`

#### Parameters

`f`

Curve

`g`

Curve

#### Returns

**Minimum(Curve, ComputationSettings)**

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

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.

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 $f \vee g$ is known to be ultimately pseudo-periodic. Tests the sufficient (but not necessary) conditions from [BT08].

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

`public static bool IsMaximumUltimatelyPseudoPeriodic(Curve f, Curve g)`

#### Parameters

`f`

Curve

`g`

Curve

#### Returns

**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) = +\infty$ for any $t$ outside its support.

`public Curve Minimum(Element e, ComputationSettings settings)`

#### Parameters

`e`

Element

`settings`

ComputationSettings

#### Returns

**Minimum(Curve, Element, ComputationSettings)**

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

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

#### Parameters

`c`

Curve

`e`

Element

`settings`

ComputationSettings

#### Returns

**Minimum(Sequence, ComputationSettings)**

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

`public Curve Minimum(Sequence s, ComputationSettings settings)`

#### Parameters

`s`

Sequence

`settings`

ComputationSettings

#### Returns

**Minimum(Curve, Sequence, ComputationSettings)**

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

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

#### Parameters

`c`

Curve

`s`

Sequence

`settings`

ComputationSettings

#### Returns

**Maximum(Element, ComputationSettings)**

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

`public Curve Maximum(Element e, ComputationSettings settings)`

#### Parameters

`e`

Element

`settings`

ComputationSettings

#### Returns

**Maximum(Curve, Element, ComputationSettings)**

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

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

#### Parameters

`c`

Curve

`e`

Element

`settings`

ComputationSettings

#### Returns

**Maximum(Sequence, ComputationSettings)**

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

`public Curve Maximum(Sequence s, ComputationSettings settings)`

#### Parameters

`s`

Sequence

`settings`

ComputationSettings

#### Returns

**Maximum(Curve, Sequence, ComputationSettings)**

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

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

#### Parameters

`c`

Curve

`s`

Sequence

`settings`

ComputationSettings

#### Returns

**Convolution(Curve, ComputationSettings)**

Computes the convolution of the two curves, $f \otimes g$.

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, $a \otimes b$.

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, $\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, $\bigotimes{f_i}$.

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

`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, $f \oslash g$.

The result is not forced to have $f(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, $a \oslash b$.

The result is not forced to have $f(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.

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.

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, $f \overline{\otimes} g$.

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, $f \overline{\otimes} g$.

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.

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, $f \overline{\otimes} g$.

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.

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

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.

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.

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, $f$, and $g$, i.e. $f(g(t))$.

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))$.

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.