Skip to content

Commit

Permalink
Export Jacobian Tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill committed Apr 23, 2024
1 parent 91bddf9 commit 47a65a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/SparseConnectivityTracer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ import SparseArrays: sparse
abstract type AbstractTracer <: Number end

include("tracer_connectivity.jl")
include("tracer_jacobian.jl")
include("conversion.jl")
include("operators.jl")
include("overload_connectivity.jl")
include("overload_jacobian.jl")
include("connectivity.jl")
include("adtypes.jl")

export ConnectivityTracer, connectivitytracer
export JacobianTracer, jacobiantracer
export trace_input
export inputs
export connectivity
Expand Down
6 changes: 4 additions & 2 deletions src/tracer_jacobian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Number type keeping track of input indices of previous computations with non-zer
See also the convenience constructor [`jacobiantracer`](@ref).
For a higher-level interface, refer to [`connectivity`](@ref).
"""
struct JacobianTracer <: Number
struct JacobianTracer <: AbstractTracer
inputs::BitSet # indices of connected, enumerated inputs
end

const EMPTY_JACOBIAN_TRACER = JacobianTracer(BitSet())
const EMPTY_JACOBIAN_TRACER = JacobianTracer(BitSet())
empty(::Type{JacobianTracer}) = EMPTY_CONNECTIVITY_TRACER
empty(::JacobianTracer) = EMPTY_CONNECTIVITY_TRACER

# We have to be careful when defining constructors:
# Generic code expecting "regular" numbers `x` will sometimes convert them
Expand Down

0 comments on commit 47a65a9

Please sign in to comment.