diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json
index e9869a7..3dd1394 100644
--- a/dev/.documenter-siteinfo.json
+++ b/dev/.documenter-siteinfo.json
@@ -1 +1 @@
-{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-16T09:09:17","documenter_version":"1.8.0"}}
\ No newline at end of file
+{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-06T09:22:11","documenter_version":"1.8.0"}}
\ No newline at end of file
diff --git a/dev/index.html b/dev/index.html
index dd99b7c..16624d4 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -5,7 +5,7 @@
positions = alg(adj_matrix)
Each of the layouts comes with a lowercase function version:
Takes adjacency matrix representation of a network and returns coordinates of the nodes.
Keyword Arguments
dim=2, Ptype=Float64: Determines dimension and output type Point{dim,Ptype}.
tol=1.0: Stop if position changes of last step Δp <= tol*K for all nodes
C=0.2, K=1.0: Parameters to tweak forces.
iterations=100: maximum number of iterations
initialpos=Point{dim,Ptype}[]
Provide Vector or Dict of initial positions. All positions will be initialized using random coordinates between [-1,1]. Random positions will be overwritten using the key-val-pairs provided by this argument.
pin=[]: Pin node positions (won't be updated). Can be given as Vector or Dict of node index -> value pairings. Values can be either
(12, 4.0) : overwrite initial position and pin
true/false : pin this position
(true, false, false) : only pin certain coordinates
seed=1: Seed for random initial positions.
rng=DEFAULT_RNG[](seed)
Create rng based on seed. Defaults to MersenneTwister, can be specified by overwriting DEFAULT_RNG[]
Takes adjacency matrix representation of a network and returns coordinates of the nodes.
Keyword Arguments
dim=2, Ptype=Float64: Determines dimension and output type Point{dim,Ptype}.
tol=1.0: Stop if position changes of last step Δp <= tol*K for all nodes
C=0.2, K=1.0: Parameters to tweak forces.
iterations=100: maximum number of iterations
initialpos=Point{dim,Ptype}[]
Provide Vector or Dict of initial positions. All positions will be initialized using random coordinates between [-1,1]. Random positions will be overwritten using the key-val-pairs provided by this argument.
pin=[]: Pin node positions (won't be updated). Can be given as Vector or Dict of node index -> value pairings. Values can be either
(12, 4.0) : overwrite initial position and pin
true/false : pin this position
(true, false, false) : only pin certain coordinates
seed=1: Seed for random initial positions.
rng=DEFAULT_RNG[](seed)
Create rng based on seed. Defaults to MersenneTwister, can be specified by overwriting DEFAULT_RNG[]
where d is distance between two vertices and the optimal distance between vertices k is defined as C * sqrt( area / num_vertices ) where C is a parameter we can adjust
Takes adjacency matrix representation of a network and returns coordinates of the nodes.
Keyword Arguments
dim=2, Ptype=Float64: Determines dimension and output type Point{dim,Ptype}.
C=2.0: Constant to fiddle with density of resulting layout
iterations=100: maximum number of iterations
initialtemp=2.0: Initial "temperature", controls movement per iteration
initialpos=Point{dim,Ptype}[]
Provide Vector or Dict of initial positions. All positions will be initialized using random coordinates between [-1,1]. Random positions will be overwritten using the key-val-pairs provided by this argument.
pin=[]: Pin node positions (won't be updated). Can be given as Vector or Dict of node index -> value pairings. Values can be either
(12, 4.0) : overwrite initial position and pin
true/false : pin this position
(true, false, false) : only pin certain coordinates
seed=1: Seed for random initial positions.
rng=DEFAULT_RNG[](seed)
Create rng based on seed. Defaults to MersenneTwister, can be specified by overwriting DEFAULT_RNG[]
where d is distance between two vertices and the optimal distance between vertices k is defined as C * sqrt( area / num_vertices ) where C is a parameter we can adjust
Takes adjacency matrix representation of a network and returns coordinates of the nodes.
Keyword Arguments
dim=2, Ptype=Float64: Determines dimension and output type Point{dim,Ptype}.
C=2.0: Constant to fiddle with density of resulting layout
iterations=100: maximum number of iterations
initialtemp=2.0: Initial "temperature", controls movement per iteration
initialpos=Point{dim,Ptype}[]
Provide Vector or Dict of initial positions. All positions will be initialized using random coordinates between [-1,1]. Random positions will be overwritten using the key-val-pairs provided by this argument.
pin=[]: Pin node positions (won't be updated). Can be given as Vector or Dict of node index -> value pairings. Values can be either
(12, 4.0) : overwrite initial position and pin
true/false : pin this position
(true, false, false) : only pin certain coordinates
seed=1: Seed for random initial positions.
rng=DEFAULT_RNG[](seed)
Create rng based on seed. Defaults to MersenneTwister, can be specified by overwriting DEFAULT_RNG[]
dim=2, Ptype=Float64: Determines dimension and output type Point{dim,Ptype}.
iterations=:auto: maximum number of iterations (:auto means 400*N^2 where N are the number of vertices)
abstols=0
Absolute tolerance for convergence of stress. The iterations terminate if the difference between two successive stresses is less than abstol.
reltols=10e-6
Relative tolerance for convergence of stress. The iterations terminate if the difference between two successive stresses relative to the current stress is less than reltol.
abstolx=10e-6
Absolute tolerance for convergence of layout. The iterations terminate if the Frobenius norm of two successive layouts is less than abstolx.
weights=Array{Float64}(undef, 0, 0)
Matrix of weights. If empty (i.e. not specified), defaults to weights[i,j] = δ[i,j]^-2 if δ[i,j] is nonzero, or 0 otherwise.
initialpos=Point{dim,Ptype}[]
Provide Vector or Dict of initial positions. All positions will be initialized using random coordinates from normal distribution. Random positions will be overwritten using the key-val-pairs provided by this argument.
pin=[]: Pin node positions (won't be updated). Can be given as Vector or Dict of node index -> value pairings. Values can be either
(12, 4.0) : overwrite initial position and pin
true/false : pin this position
(true, false, false) : only pin certain coordinates
seed=1: Seed for random initial positions.
rng=DEFAULT_RNG[](seed)
Create rng based on seed. Defaults to MersenneTwister, can be specified by overwriting DEFAULT_RNG[]
Per default, unconnected vertices in the graph get a pairwise "ideal" distance which scales with the number of connected components and the maximum distance within the components.
dim=2, Ptype=Float64: Determines dimension and output type Point{dim,Ptype}.
iterations=:auto: maximum number of iterations (:auto means 400*N^2 where N are the number of vertices)
abstols=0
Absolute tolerance for convergence of stress. The iterations terminate if the difference between two successive stresses is less than abstol.
reltols=10e-6
Relative tolerance for convergence of stress. The iterations terminate if the difference between two successive stresses relative to the current stress is less than reltol.
abstolx=10e-6
Absolute tolerance for convergence of layout. The iterations terminate if the Frobenius norm of two successive layouts is less than abstolx.
weights=Array{Float64}(undef, 0, 0)
Matrix of weights. If empty (i.e. not specified), defaults to weights[i,j] = δ[i,j]^-2 if δ[i,j] is nonzero, or 0 otherwise.
initialpos=Point{dim,Ptype}[]
Provide Vector or Dict of initial positions. All positions will be initialized using random coordinates from normal distribution. Random positions will be overwritten using the key-val-pairs provided by this argument.
pin=[]: Pin node positions (won't be updated). Can be given as Vector or Dict of node index -> value pairings. Values can be either
(12, 4.0) : overwrite initial position and pin
true/false : pin this position
(true, false, false) : only pin certain coordinates
seed=1: Seed for random initial positions.
rng=DEFAULT_RNG[](seed)
Create rng based on seed. Defaults to MersenneTwister, can be specified by overwriting DEFAULT_RNG[]
Per default, unconnected vertices in the graph get a pairwise "ideal" distance which scales with the number of connected components and the maximum distance within the components.
g = SimpleGraph(936)
for l in eachline(joinpath(@__DIR__,"..","..","test","jagmesh1.mtx"))
s = split(l, " ")
src, dst = parse(Int, s[1]), parse(Int, s[2])
@@ -48,13 +48,13 @@
p[:node_pos][] = pos
autolimits!(ax)
end
Position nodes in concentric circles. Without further arguments all nodes will be placed on a circle with radius 1.0. Specify placement of nodes using the nlist argument.
Takes adjacency matrix representation of a network and returns coordinates of the nodes.
Keyword Arguments
Ptype=Float64: Determines the output type Point{2,Ptype}.
nlist=Vector{Int}[]
Vector of Vector of node indices. Tells the algorithm, which nodes to place on which shell from inner to outer. Nodes which are not present in this list will be place on additional outermost shell.
g = smallgraph(:petersen)
+shell(adj_matrix; kwargs...)
Position nodes in concentric circles. Without further arguments all nodes will be placed on a circle with radius 1.0. Specify placement of nodes using the nlist argument.
Takes adjacency matrix representation of a network and returns coordinates of the nodes.
Keyword Arguments
Ptype=Float64: Determines the output type Point{2,Ptype}.
nlist=Vector{Int}[]
Vector of Vector of node indices. Tells the algorithm, which nodes to place on which shell from inner to outer. Nodes which are not present in this list will be place on additional outermost shell.
Sometimes it is desired to fix the positions of a few nodes while arranging the rest "naturally" around them. The iterative layouts Stress, Spring and SFDP allow to pin nodes to certain positions, i.e. those node will stay fixed during the iteration.
g = SimpleGraph(vcat(hcat(zeros(4,4), ones(4,4)), hcat(ones(4,4), zeros(4,4))))
The keyword argument pin takes a Vector or a Dict of key - value pairs. The key has to be the index of the node. The value can take three forms:
idx => Point2(x,y) or idx => (x,y) overwrites the initial position of that vertex and pins it there,
idx => true/false pins or unpins the vertex, position is taken from initialpos-keyword argument or random,
idx => (false, true) allows for fine control over which coordinate to pin.