You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an attribute has_loops in AdjacencyGraph (#186)
* Add an attribute has_loops in AdjacencyGraph
* Rename `has_loops` into `has_diagonal`, make it statically inferred
* Fixes
---------
Co-authored-by: Guillaume Dalle <22795598+gdalle@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/graph.jl
+25-8Lines changed: 25 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ end
96
96
## Adjacency graph
97
97
98
98
"""
99
-
AdjacencyGraph{T}
99
+
AdjacencyGraph{T,has_diagonal}
100
100
101
101
Undirected graph without self-loops representing the nonzeros of a symmetric matrix (typically a Hessian matrix).
102
102
@@ -111,27 +111,44 @@ The adjacency graph of a symmetric matrix `A ∈ ℝ^{n × n}` is `G(A) = (V, E)
111
111
112
112
# Fields
113
113
114
-
- `S::SparsityPatternCSC{T}`
114
+
- `S::SparsityPatternCSC{T}`: Underlying sparsity pattern, whose diagonal is empty whenever `has_diagonal` is `false`
115
115
116
116
# References
117
117
118
118
> [_What Color Is Your Jacobian? SparsityPatternCSC Coloring for Computing Derivatives_](https://epubs.siam.org/doi/10.1137/S0036144504444711), Gebremedhin et al. (2005)
0 commit comments