GraphIdx.jl
This is the Julia part of GraphIdx, a framework for index-based graphs. Some parts are also implemented in
- C++ headers, or
- a Rust crate.
The main module is
GraphIdx.GraphIdx
— Module.Index-based Graphs
Nodes
A node (sometimes also vertex called) in a graph is always represented as an integer. To be able to use a node as an index, the nodes should be within 1:n
whereby n
is the number of nodes. Furtheron, we always use signed integers because we might include extra information within the first (sign) bit.
Edges
By convention, a graph is considered undirected (unless specified else). Hence we only need to store one direction of every edge (u, v)
; by default we assume u < v
.
TODO:
- differences
- incidence matrix
If any flow α
for an edge
(u, v)has to be computed, the orientation is defined as going from
vto
u` (big to small), i.e. we compute
x[u] += α
x[v] -= α
Submodules
The most important submodules are
Example
Generate a random spanning tree on a 20×32
grid graph:
import GraphIdx.Grid: GridGraph
import GraphIdx.IncidenceIndex
TODO: Extend
API
GraphIdx.Bits
GraphIdx.GraphIdx
GraphIdx.Grid
GraphIdx.Io
GraphIdx.Io.Dimacs
GraphIdx.LinA
GraphIdx.Stats
GraphIdx.Tree
GraphIdx.Utils.Heap
GraphIdx.ArrayWeights
GraphIdx.ConstantWeights
GraphIdx.Grid.GridGraph
GraphIdx.Grid.ImplicitGridGraph
GraphIdx.Grid.Pixel
GraphIdx.IncidenceIndex
GraphIdx.LinA.IncMat
GraphIdx.Tree.ChildrenIndex
GraphIdx.Tree.RootedTree
GraphIdx.Utils.Rep
GraphIdx.Utils.UnionFind
Base.setindex!
GraphIdx.Bits.hyperfloor
GraphIdx.Cluster.cluster
GraphIdx.Grid.collect_edges
GraphIdx.Grid.compute_dirs
GraphIdx.Grid.iter_edges
GraphIdx.Grid.iter_edges_pixel
GraphIdx.Grid.iter_edges_pixel
GraphIdx.Grid.line_D
GraphIdx.Grid.lipschitz
GraphIdx.Grid.num_edges
GraphIdx.Io.Dimacs.bin2asc
GraphIdx.Io.Dimacs.read_dimacs_bin
GraphIdx.LinA.is_incmat
GraphIdx.Stats.permcumsum
GraphIdx.Stats.weighted_median
GraphIdx.Tree.binary_inorder
GraphIdx.Tree.dfs_finish
GraphIdx.Tree.dfs_walk
GraphIdx.Tree.dfs_walk_rev
GraphIdx.Tree.find_root
GraphIdx.Tree.hierarchy
GraphIdx.Tree.hierarchy_string
GraphIdx.Tree.lowest_common_ancestors
GraphIdx.Tree.node_degrees
GraphIdx.Tree.parenthesis
GraphIdx.Tree.parenthesis_string
GraphIdx.Tree.reset!
GraphIdx.Tree.root_node
GraphIdx.kruskal_mst
GraphIdx.num_edges
GraphIdx.prim_mst_edges