# Various internals

## Intervals

`ContinuousTransformations._maybe_segment`

— Function.```
_maybe_segment(a, b)
```

Helper function for forming a segment when possible. Internal, not exported.

## Univariate transformations

`abstract type RRStability`

Trait that is useful for domain and image calculations. See `RRStable`

.

`struct RRStable <: ContinuousTransformations.RRStability`

Trait that indicates that a univariate transformation

maps $ℝ$ to $ℝ$,

supports mapping intervals, and

maps subtypes of

`AbstractInterval`

to the same type.

`struct NotRRStable <: ContinuousTransformations.RRStability`

Trait that indicates that a univariate transformation is *not* `RRStable`

.

`ContinuousTransformations.RR_stability`

— Function.```
RR_stability(?)
```

Return either the trait `RRStable`

and `NotRRStable`

.

`ContinuousTransformations.composed_domain`

— Function.`composed_domain(f_RR_stability, g_RR_stability, f, g)`

`ContinuousTransformations.composed_image`

— Function.`composed_image(f_RR_stability, g_RR_stability, f, g)`

`ContinuousTransformations.default_transformation`

— Function.`default_transformation(dom, img)`

Return a transformation from `dom`

that can be mapped to `img`

using `affine_bridge`

.

`ContinuousTransformations.affine_bridge`

— Function.`affine_bridge(interval1, interval1)`

Return an affine transformation between two intervals of the same type.

## Printing

`ContinuousTransformations.rhs_string`

— Function.`rhs_string(transformation, term)`

Return the formula representing the hand side of the `transformation`

, with `term`

as the argument.

## Utilities

```
@define_isapprox(T, fields)
```

Define an `isapprox`

method, comparing the given fields in type `T`

.

```
@define_singleton(name_and_supertype)
@define_singleton(name_and_supertype, constant)
```

Define a singleton type with the given name and supertype (specified as `name <: supertype`

), and a constant which defaults to the name in uppercase.

`ContinuousTransformations._fma`

— Function.`_fma(x, y, z)`

Placeholder for `Base.fma`

until https://github.com/JuliaDiff/ReverseDiff.jl/issues/86 is fixed.