Crate cnetworks[−][src]
Expand description
This is a library of tools for creating and manipulating complex networks.
From Wikipedia:
Complex network is a graph-like structure with non-trivial characteristics. A complex network is a graph (network) with non-trivial topological features—features that do not occur in simple networks such as lattices or random graphs but often occur in networks representing real systems. The study of complex networks is a young and active area of scientific research inspired largely by empirical findings of real-world networks such as computer networks, biological networks, technological networks, brain networks, climate networks and social networks.
Modules
This module contains various library-specific utilities, such as error enums and auto-implemented iterator traits.
Structs
Network
is the main graph-like data structure.
Node
is a single vertex in the graph-like data structure.
Enums
Flag
is used to store specific information about a given node.
Decides the algorithm used to connect the nodes during Network
’s initialization. It can
also be used for identification purposes when the Model::Custom
variant is used.
Weight
determines the weight of each link in the network (ie. the probability of the
infection spreading through it in each time step).
Functions
Perform a breadth-first search over the network, starting with root and looking for target.
Build a breadth-first search tree from the network while looking for the specified targets
.
Like bfs_many()
, but executes step_callback
on every queue pop.
Obtain vector of clusters present in the network, ordered largest to smallest.
Explore the network starting with root
, finding all nodes for which the path root -> node
exists (the explored) and those for which it does not (the unexplored).
Simulate spread of information according to the susceptible-infected diffusion model.
Stitch the network together if it is not whole.