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
A package for efficiently solving linear systems of equations based on graph properties. Any matrix representing an underlying real-world system can be represented by a graph, for example a mechanical system, checmical molecules, neural networks, ... The code of the package is currently used for the robotics simulator [Dojo.jl](https://github.com/dojo-sim/Dojo.jl)
5
+
A package for efficiently solving linear systems of equations based on graph properties. Any matrix representing an underlying real-world system can be represented by a graph, for example a mechanical system, chemical molecules, neural networks, ... The code of the package is currently used for the robotics simulator [Dojo.jl](https://github.com/dojo-sim/Dojo.jl)
6
6
7
-
By providing the adjacency matrix of a graph-based system, the `GraphBasedSystems` package can automatically exploit the existing sparsity when solving the linear system to speed up calculations. Currently, the LU and LDU decomposition/backsubstitution are implemented.
7
+
By providing the adjacency matrix of a graph-based system, the `GraphBasedSystems` package can automatically exploit the existing sparsity when solving the linear system to speed up calculations. Currently, the LDU, LU, LDLt, and LLt decomposition/backsubstitution are implemented. LLt is currently slow due to memory allocations.
8
8
9
9
```julia
10
10
using GraphBasedSystems
@@ -18,16 +18,10 @@ graph_matrix = [ # The adjacency matrix for the underlying graph
18
18
19
19
dimensions = [2; 3; 0; 1] # The dimension of row/column
20
20
21
-
system =System{Float64}(graph_matrix, dimensions) # The resulting linear system
21
+
system =System{Float64}(graph_matrix, dimensions; symmetric=false) # The resulting linear system. Set symmetric=true for symmetric systems
22
22
23
-
for entry in system.matrix_entries.nzval # Randomize all matrix entries
24
-
GraphBasedSystems.randomize!(entry)
25
-
end
23
+
randomize!(system) # Randomize all system entries
26
24
system.matrix_entries[1,2].value =rand(2,3) # Directly set the value of a matrix entry
27
-
28
-
for entry in system.vector_entries # Randomize all vector entries
29
-
GraphBasedSystems.randomize!(entry)
30
-
end
31
25
system.vector_entries[4].value =rand(1) # Directly set the value of a vector entry
0 commit comments