All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
NetworKit::WattsStrogatzGenerator Class Reference

#include <WattsStrogatzGenerator.h>

Public Member Functions

 WattsStrogatzGenerator (count nNodes, count nNeighbors, double p)
 Constructs a graph according to the Watts and Strogatz model (https://en.wikipedia.org/wiki/Watts_and_Strogatz_model), which produces graphs with high clustering and low average path length. More...
 
virtual Graph generate ()
 
- Public Member Functions inherited from NetworKit::StaticGraphGenerator
virtual ~StaticGraphGenerator ()=default
 Default destructor. More...
 

Protected Attributes

count nNodes
 
count nNeighbors
 
double p
 

Constructor & Destructor Documentation

NetworKit::WattsStrogatzGenerator::WattsStrogatzGenerator ( count  nNodes,
count  nNeighbors,
double  p 
)

Constructs a graph according to the Watts and Strogatz model (https://en.wikipedia.org/wiki/Watts_and_Strogatz_model), which produces graphs with high clustering and low average path length.

First, a regular ring lattice is generated. Then some edges are rewired randomly.

Parameters
nNodesnumber of nodes in target graph
nNeighborsnumber of neighbors on each side of a node
prewiring probability

Member Function Documentation

Graph NetworKit::WattsStrogatzGenerator::generate ( )
virtual

Member Data Documentation

count NetworKit::WattsStrogatzGenerator::nNeighbors
protected
count NetworKit::WattsStrogatzGenerator::nNodes
protected
double NetworKit::WattsStrogatzGenerator::p
protected

The documentation for this class was generated from the following files: