Add basic Func to DifferentiableFN

Mon, 22 Mar 2021 22:26:08 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 22 Mar 2021 22:26:08 -0500
changeset 25
90f92ee9cb81
parent 24
da6c7475dd0e
child 26
f075aca8485b

Add basic Func to DifferentiableFN

src/DifferentiableFN.jl file | annotate | diff | comparison | revisions
--- a/src/DifferentiableFN.jl	Sat Feb 20 19:10:50 2021 -0500
+++ b/src/DifferentiableFN.jl	Mon Mar 22 22:26:08 2021 -0500
@@ -2,14 +2,16 @@
 
 using ..LinOps
 
-export DiffF,
+export Func,
+       DiffF,
        value,
        differential,
        adjoint_differential
 
-abstract type DiffF{X,Y,T} end
+abstract type Func{X,Y} end
+abstract type DiffF{X,Y,T} <: Func{X, Y} end
 
-function value(f :: D, x :: X) :: Y where {X, Y, T <: LinOp{X,Y}, D <: DiffF{X,Y,T}}
+function value(f :: F, x :: X) :: Y where {X, Y, F <: Func{X,Y}}
     @error "`value` unimplemented"
 end
 

mercurial