@@ -30,9 +30,27 @@ function assertions end
3030
3131Tells whether or not the `transform` is revertible, i.e. supports a
3232[`revert`](@ref) function. Defaults to `false` for new transform types.
33+
34+ Transforms can be revertible and yet don't be invertible. Invertibility
35+ is a mathematical concept, whereas revertibility is a computational concept.
36+
37+ See also [`isinvertible`](@ref).
3338"""
3439function isrevertible end
3540
41+ """
42+ isinvertible(transform)
43+
44+ Tells whether or not the `transform` is invertible, i.e. supports a
45+ [`inv`](@ref) function. Defaults to `false` for new transform types.
46+
47+ Transforms can be invertible in the mathematical sense, i.e., there
48+ exists a one-to-one mapping between input and output spaces.
49+
50+ See also [`isrevertible`](@ref).
51+ """
52+ function isinvertible end
53+
3654"""
3755 prep = preprocess(transform, object)
3856
@@ -79,6 +97,10 @@ isrevertible(transform::Transform) =
7997 isrevertible (typeof (transform))
8098isrevertible (:: Type{<:Transform} ) = false
8199
100+ isinvertible (transform:: Transform ) =
101+ isinvertible (typeof (transform))
102+ isinvertible (:: Type{<:Transform} ) = false
103+
82104preprocess (transform:: Transform , object) = nothing
83105
84106(transform:: Transform )(object) =
0 commit comments