Table of Contents

Class RandomGraph

Namespace
AlgorithmsSW.Digraph
Assembly
AlgorithmsSW.dll

Generates random digraphs.

public static class RandomGraph
Inheritance
RandomGraph
Inherited Members

Methods

ErdosRenyiGraph(int, int)

Generates a graph with edges uniformly chosen from the set of all possible edges, including self-loops.

public static IDigraph ErdosRenyiGraph(int vertexCount, int edgeCount)

Parameters

vertexCount int

How many vertexes the graph should have.

edgeCount int

How many edges the graph should have.

Returns

IDigraph

A random graph.

Exceptions

ArgumentOutOfRangeException

vertexCount or edgeCount is not positive.

RandomSimple(int, int)

Generates a graph with edges uniformly chosen from the set of all possible edges, excluding self-loops.

public static IDigraph RandomSimple(int vertexCount, int edgeCount)

Parameters

vertexCount int

How many vertexes the graph should have.

edgeCount int

How many edges the graph should have.

Returns

IDigraph

A random graph.

Exceptions

ArgumentOutOfRangeException

vertexCount or edgeCount is not positive.