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

Creates G(n, p) graphs. More...

#include <ErdosRenyiGenerator.h>

Public Member Functions

 ErdosRenyiGenerator (count nNodes, double prob, bool directed=false)
 Creates random graphs in the G(n,p) model. More...
 
virtual Graph generate ()
 
- Public Member Functions inherited from NetworKit::StaticGraphGenerator
virtual ~StaticGraphGenerator ()=default
 Default destructor. More...
 

Protected Attributes

count n
 
double p
 
bool directed
 

Detailed Description

Creates G(n, p) graphs.

Constructor & Destructor Documentation

NetworKit::ErdosRenyiGenerator::ErdosRenyiGenerator ( count  nNodes,
double  prob,
bool  directed = false 
)

Creates random graphs in the G(n,p) model.

The generation follows Vladimir Batagelj and Ulrik Brandes: "Efficient generation of large random networks", Phys Rev E 71, 036113 (2005).

Parameters
nNodesNumber of nodes n in the graph.
probProbability of existence for each edge p.
directedgenerates a directed graph

Member Function Documentation

Graph NetworKit::ErdosRenyiGenerator::generate ( )
virtual

Member Data Documentation

bool NetworKit::ErdosRenyiGenerator::directed
protected
count NetworKit::ErdosRenyiGenerator::n
protected
double NetworKit::ErdosRenyiGenerator::p
protected

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