src/DifferentiableFN.jl

changeset 25
90f92ee9cb81
parent 21
3b7fcc651585
child 27
62c62f451a41
equal deleted inserted replaced
24:da6c7475dd0e 25:90f92ee9cb81
1 module DifferentiableFN 1 module DifferentiableFN
2 2
3 using ..LinOps 3 using ..LinOps
4 4
5 export DiffF, 5 export Func,
6 DiffF,
6 value, 7 value,
7 differential, 8 differential,
8 adjoint_differential 9 adjoint_differential
9 10
10 abstract type DiffF{X,Y,T} end 11 abstract type Func{X,Y} end
12 abstract type DiffF{X,Y,T} <: Func{X, Y} end
11 13
12 function value(f :: D, x :: X) :: Y where {X, Y, T <: LinOp{X,Y}, D <: DiffF{X,Y,T}} 14 function value(f :: F, x :: X) :: Y where {X, Y, F <: Func{X,Y}}
13 @error "`value` unimplemented" 15 @error "`value` unimplemented"
14 end 16 end
15 17
16 # function (f :: D)(x::X) where {X, Y, T <: LinOp{X, Y}, D <: DiffF{X, Y, T}} 18 # function (f :: D)(x::X) where {X, Y, T <: LinOp{X, Y}, D <: DiffF{X, Y, T}}
17 # return value(x) 19 # return value(x)

mercurial