Constructors
Various example graphs, where possible with vertex coordinates, can be constructed by predefined functions.
MeGraPDE.MetricGraphs.metric_tree_graph
— Functionmetric_tree_graph(; ℓ=1)
Create a tree graph with n=16 vertices and m=15 edges of lengths 'ℓ'.
MeGraPDE.MetricGraphs.metric_graphene_graph
— Functionmetric_graphene_graph(; ℓ=1)
Create a graphene graph with n=12 vertices and m=13 edges of lengths 'ℓ'.
MeGraPDE.MetricGraphs.metric_star_graph
— Functionmetric_star_graph(; ℓ=1)
Create a star graph with n=5 vertices and m=4 edges of lengths 'ℓ'.
metric_star_graph(ℓ_vec::Vector)
Create a star graph with edge lengths 'ℓ_vec'.
MeGraPDE.MetricGraphs.metric_diamond_graph
— Functionmetric_diamond_graph(; ℓ=1)
Create a diamond graph with n=4 vertices and m=5 edges of lengths 'ℓ'.
MeGraPDE.MetricGraphs.metric_lollipop_graph
— Functionmetric_lollipop_graph(n1::Int, n2::Int; ℓ=1)
Create a lollipop graph with clique of size 'n1' connected by an edge to a path of size 'n2', equilateral edge lengths 'ℓ'
MeGraPDE.MetricGraphs.metric_barabasi_albert
— Functionmetric_barabasi_albert(n::Int, k::Int; ℓ=1, seed=nothing)
Create equilateral Barbási-Albert graph with 'n' vertices by growing an initial graph with 'k' vertices and attaching each vertex with 'k' edges, see Graphs.barabasi_albert.
Optional Arguments
- ℓ=1: equilateral edge length.
- seed=nothing: set the RNG seed.
MeGraPDE.MetricGraphs.metric_erdos_renyi
— Functionmetric_erdos_renyi(n::Int, p::Number; ℓ=1)
Create equilateral Erdos-Renyi graph with 'n' vertices connected by edges with probability 'p', see Graphs.erdos_renyi