AffineMaps.jl

AffineMaps.jl implements Affine maps. It provides the function object types Mul, Add, MulAdd and AddMul, as well as their inverses.

All function objects defined here support the implement/support the APIs of

Example:

using AffineMaps
using LinearAlgebra, InverseFunctions, ChangesOfVariables
A = rand(5, 5)
b = rand(5)
x = rand(5)

f = MulAdd(A, b)
y = f(x)
y ≈ A * x + b
inverse(f)(y) ≈ x
y, ladj = with_logabsdet_jacobian(f, x)
y ≈ A * x + b && ladj ≈ logabsdet(A)[1]