Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Newman-Watts Graphs #106

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

tomatitito
Copy link

This add functions to generate and test small world graphs according to Newman and Watts (1999). Please let me know if you see problems with the code.

hpcjkour added 28 commits April 19, 2018 14:23
Instead of degree, which then had to be divided by two. That required
making sure we have an even number, which now is not neccessary anymore.
The function takes the number of nodes, a probability and a seed and
returns a vector of additional nodes as described in Newman and Watts
(1999).
Functional composition of gen-circle and add-shortcuts.
So far only the clustering coefficient for a single node can be
computed.
As described in Watts and Strogatz (1998). This is really the average
over all clustering coefficients.
Because of this, the function is not variadic anymore.
This is the preferential attachment graph. Remove to old initializing
function and start with two connected nodes, to which a new one will
attach with equal probability. First test checks for the number of nodes
created and passes.
Either explicitly pass a random seed when creating the graph, or use
System/nanoTime.
Test if function actually constructs a loom graph and for number of
nodes and edges.
Sometimes Node or Edge count are lower than expected. This is because
the construction of the graph involves probabilistic decisions. Because
of this, test if actual number is bigger than some percentage of the
expected count.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant