Intervals
The interval types are different from some other interval implementations in Julia. They do not specify if the interval is open or closed at an endpoint, and also encode infiniteness and semi-infiniteness in the type, for type stable code.
abstract type AbstractInterval
Abstract supertype for all univariate intervals. It is not specified whether they are open or closed.
RealLine()
The real line. Use the constant ℝ
.
ContinuousTransformations.ℝ
— Constant.A constant for the real line.
PositiveRay(left)
The real numbers above left
. See ℝ⁺
.
ContinuousTransformations.ℝ⁺
— Constant.The positive real numbers.
NegativeRay(right)
The real numbers below right
. See ℝ⁻
.
ContinuousTransformations.ℝ⁻
— Constant.The negative real numbers.
Segment(left, right)
The real numbers between left
and right
, with $-∞ < \text{left} < \text{right} < ∞$ enforced.
Intervals also support the following methods in Base
: minimum
, maximum
, in
, isfinite
, isinf
, extrema
.
Segment
s also support middle
, linspace
, and
ContinuousTransformations.width
— Function.width(s)
Width of a finite interval.
Univariate transformations
General interface
abstract type UnivariateTransformation <: ContinuousTransformations.ContinuousTransformation
Univariate monotone transformation, either increasing or decreasing on the whole domain (thus, a bijection).
ContinuousTransformations.isincreasing
— Function.isincreasing(transformation)
Return true
(false
), when the transformation is monotonically increasing (decreasing).
Specific transformations
ContinuousTransformations.Affine
— Type.ContinuousTransformations.IDENTITY
— Function.Identity (as an affine transformation).
Negation()
Mapping $ℝ → ℝ$ using $x ↦ -x$.
ContinuousTransformations.NEGATION
— Function.Negation()
Mapping $ℝ → ℝ$ using $x ↦ -x$.
Logistic()
Mapping $ℝ → (0,1)$ using $x ↦ 1/(1+\exp(-x))$.
ContinuousTransformations.LOGISTIC
— Function.Logistic()
Mapping $ℝ → (0,1)$ using $x ↦ 1/(1+\exp(-x))$.
ContinuousTransformations.Exp
— Type.Exp()
Mapping $ℝ → ℝ⁺$ using $x ↦ \exp(x)$.
ContinuousTransformations.EXP
— Function.Exp()
Mapping $ℝ → ℝ⁺$ using $x ↦ \exp(x)$.
ContinuousTransformations.Logit
— Type.Logit()
Mapping $(0,1) → ℝ$ using $x ↦ \log(x/(1-x))$.
ContinuousTransformations.LOGIT
— Function.Logit()
Mapping $(0,1) → ℝ$ using $x ↦ \log(x/(1-x))$.
ContinuousTransformations.Log
— Type.Log()
Mapping $ℝ → ℝ⁺$ using $x ↦ \exp(x)$.
ContinuousTransformations.LOG
— Function.Log()
Mapping $ℝ → ℝ⁺$ using $x ↦ \exp(x)$.
InvRealCircle()
Mapping $(-1,1) → ℝ$ using $x ↦ x/√(1-x^2)$.
ContinuousTransformations.INVREALCIRCLE
— Function.InvRealCircle()
Mapping $(-1,1) → ℝ$ using $x ↦ x/√(1-x^2)$.
RealCircle()
Mapping $ℝ → (-1,1)$ using $x ↦ x/√(1+x^2)$.
ContinuousTransformations.REALCIRCLE
— Function.RealCircle()
Mapping $ℝ → (-1,1)$ using $x ↦ x/√(1+x^2)$.
Composing transformations
ComposedTransformation(f, g)
Compose two univariate transformations, resulting in the mapping $f∘g$, or `x ↦ f(g(x))
.
Use the ∘
operator for construction.