SciML / ADTypes.jl

Repository for automatic differentiation backend types
https://sciml.github.io/ADTypes.jl/
MIT License
37 stars 11 forks source link

Update the Type Hierarchy #14

Closed avik-pal closed 1 year ago

avik-pal commented 1 year ago

Is it possible to modify the current type hierarchy that is currently present to something like AbstractDifferentiation?

Proposed Hierarchy

abstract type AbstractADType end

abstract type AbstractReverseModeAD <: AbstractADType end
abstract type AbstractForwardModeAD <: AbstractADType end
abstract type AbstractFiniteDifferencesMode <: AbstractADType end
abstract type AbstractSymbolicDifferentiationMode <: AbstractADType end

abstract type AbstractSparseReverseModeAD <: AbstractReverseModeAD end
abstract type AbstractSparseForwardModeAD <: AbstractForwardModeAD end
abstract type AbstractSparseFiniteDifferencesAD <: AbstractFiniteDifferencesMode end

(Maybe with the presence of ModellingToolkit and FiniteDifferences the package should be called something other than ADTypes.jl but that is a separate topic of discussion)