SyntheticNoNs.jl documentation
<!– @contents --> <!-- Pages = ["network.md", "io.md"] --> <!-- Depth = 2 --> <!--
–>
Graph and network are used interchangeably; Graph
is typically used in code since it is shorter, while "network" is used in documentation to indicate the network science focus.
SyntheticNoNs.NoNLevel
— TypeNoNLevel{GT <: AbstractGraph{T}}(upper::Tuple{GT, T}, self::GT, lower::Vector{GT})
Create a level of a NoN. self
is the network at this level. upper
is a tuple of the network at the higher level and the node from that level whose network is self
. lower
is a vector of networks corresponding to each node in self
. Due to memory, it may be wiser to store a NoN as names of networks.
Missing docstring for erdos_renyi_nm
. Check Documenter's build log for details.
SyntheticNoNs.barabasi_albert_nm
— Functionbarabasi_albert_nm(n::Integer, m::Integer; tries=3, seed=-1, keyargs...)
Can also call this using gen_sf
with the same arguments. Generate a Barabási–Albert random graph with n
nodes and as close to m
edges as possible (note that due to how such graphs are constructed, certain target densities are difficult to achieve). Throws an error when it is not mathematically possible.
Optional arguments
tries=3
: number of regenerations to try if the graph is not connected. Returns if the graph is connected or if all tries are used.keyargs...
: see LightGraphs'barabasi_albert
Implementation notes
m = nk - k^2
, where k
is the parameter from LightGraphs' barabasi_albert
method. Thus, we use Polynomials.jl to solve for k
. However, since k
must be an integer to be inputted into barabasi_albert
, rounding is needed and thus achieving an exact match with m
is not always possible.
SyntheticNoNs.euclidean_graph_nm
— Functioneuclidean_graph_nm()
Can also call this using gen_geo
with the same arguments. Generate a geometric random graph with n
nodes and as close to m
edges as possible. Throws an error when it is not mathematically possible.
Optional arguments
Implementation notes
We generated a bunch of euclidean_graph
s and then reverse engineered the number of nodes and cutoff needed to reach a target number of edges. Deriving the theoretical expected value given the number of nodes and cutoff would be more optimal.