diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index ff716c54..03dd1eea 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-09T16:38:07","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-09T22:14:19","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index f7b8dbd0..ca6d88de 100644 --- a/dev/index.html +++ b/dev/index.html @@ -7,7 +7,7 @@ 3×3 SparseArrays.SparseMatrixCSC{Bool, UInt64} with 4 stored entries: 1 ⋅ ⋅ 1 1 ⋅ - ⋅ ⋅ 1source
connectivity(f!, y, x)

Enumerates inputs x and primal outputs y after f!(y, x) and returns sparse connectivity matrix C of size (m, n) where C[i, j] is true if the compute graph connects the i-th entry in y to the j-th entry in x.

source

Internals

SparseConnectivityTracer works by pushing a Number type called Tracer through generic functions:

SparseConnectivityTracer.TracerType
Tracer(indexset) <: Number

Number type keeping track of input indices of previous computations.

See also the convenience constructor tracer. For a higher-level interface, refer to connectivity.

Examples

By enumerating inputs with tracers, we can keep track of input connectivities:

julia> xt = [tracer(1), tracer(2), tracer(3)]
+ ⋅  ⋅  1
source
connectivity(f!, y, x)

Enumerates inputs x and primal outputs y after f!(y, x) and returns sparse connectivity matrix C of size (m, n) where C[i, j] is true if the compute graph connects the i-th entry in y to the j-th entry in x.

source

Internals

SparseConnectivityTracer works by pushing a Number type called Tracer through generic functions:

SparseConnectivityTracer.TracerType
Tracer(indexset) <: Number

Number type keeping track of input indices of previous computations.

See also the convenience constructor tracer. For a higher-level interface, refer to connectivity.

Examples

By enumerating inputs with tracers, we can keep track of input connectivities:

julia> xt = [tracer(1), tracer(2), tracer(3)]
 3-element Vector{Tracer}:
  Tracer(1,)
  Tracer(2,)
@@ -57,8 +57,8 @@
 3-element Vector{Tracer}:
  Tracer(1, 2, 3, 5)
  Tracer(1, 2, 3, 5)
- Tracer(1, 2, 3, 5)
source
SparseConnectivityTracer.tracerFunction
tracer(index)
-tracer(indices)

Convenience constructor for Tracer from input indices.

source
SparseConnectivityTracer.trace_inputFunction
trace_input(x)

Enumerates input indices and constructs Tracers.

Example

julia> x = rand(3);
+ Tracer(1, 2, 3, 5)
source
SparseConnectivityTracer.tracerFunction
tracer(index)
+tracer(indices)

Convenience constructor for Tracer from input indices.

source
SparseConnectivityTracer.trace_inputFunction
trace_input(x)

Enumerates input indices and constructs Tracers.

Example

julia> x = rand(3);
 
 julia> f(x) = [x[1]^2, 2 * x[1] * x[2]^2, sin(x[3])];
 
@@ -72,14 +72,14 @@
 3-element Vector{Tracer}:
    Tracer(1,)
  Tracer(1, 2)
-   Tracer(3,)
source

The following utilities can be used to extract input indices from Tracers:

SparseConnectivityTracer.inputsFunction
inputs(tracer)

Return raw UInt64 input indices of a Tracer. See also sortedinputs.

Example

julia> t = tracer(1, 2, 4)
+   Tracer(3,)
source

The following utilities can be used to extract input indices from Tracers:

SparseConnectivityTracer.inputsFunction
inputs(tracer)

Return raw UInt64 input indices of a Tracer. See also sortedinputs.

Example

julia> t = tracer(1, 2, 4)
 Tracer(1, 2, 4)
 
 julia> inputs(t)
 3-element Vector{UInt64}:
  0x0000000000000004
  0x0000000000000002
- 0x0000000000000001
source
SparseConnectivityTracer.sortedinputsFunction
sortedinputs(tracer)
+ 0x0000000000000001
source
SparseConnectivityTracer.sortedinputsFunction
sortedinputs(tracer)
 sortedinputs([T=Int], tracer)

Return sorted input indices of a Tracer. See also inputs.

Example

julia> t = tracer(1, 2, 4)
 Tracer(1, 2, 4)
 
@@ -93,4 +93,4 @@
 3-element Vector{UInt8}:
  0x01
  0x02
- 0x04
source
+ 0x04source