Random graph models

Gilbert model

The gilbert model (or G(N,p) model) was introduced by Edgar Gilbert in 1959. In this model, you assign a fixed amount of vertices N and a probability p. p denotes the probality, that edge between two vertices exists or not.

open Graphoscope
open Graphoscope.RandomModels
let N = 50
let p = 0.5

let myGilbertGraph = Gilbert.initDirectedFGraph N p
"You have created a graph with 50 nodes and 1310 edges"
namespace Graphoscope
namespace Graphoscope.RandomModels
val N: int
val p: float
val myGilbertGraph: FGraph<int,int,float>
Multiple items
type Gilbert = new: unit -> Gilbert static member initDiGraph: rng: Random -> numberOfNodes: int -> probability: float -> DiGraph<int,int,float> static member initDirectedAdjGraph: numberOfNodes: int -> probability: float -> AdjGraph<int,int,float> static member initDirectedFGraph: numberOfNodes: int -> probability: float -> FGraph<int,int,float> static member initUndirectedFGraph: numberOfNodes: int -> probability: float -> FGraph<int,int,float> static member initUndirectedGraph: rng: Random -> numberOfNodes: int -> probability: float -> UndirectedGraph<int,int,float>
<summary> Returns an ArrayAdjacencyGraph that is generated randomly with the given parameters. numberOfNodes indicates the number of vertices the final graph will have. probability represents the probability of an edge between 2 vertices. </summary>

--------------------
new: unit -> Gilbert
static member Gilbert.initDirectedFGraph: numberOfNodes: int -> probability: float -> FGraph<int,int,float>
val g: string
val sprintf: format: Printf.StringFormat<'T> -> 'T
<summary>Print to a string using the given format.</summary>
<param name="format">The formatter.</param>
<returns>The formatted result.</returns>
<example>See <c>Printf.sprintf</c> (link: <see cref="M:Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThen``1" />) for examples.</example>
Multiple items
module FGraph from Graphoscope

--------------------
type FGraph = new: unit -> FGraph static member addEdge: nk1: 'NodeKey -> nk2: 'NodeKey -> ed: 'EdgeData -> g: FGraph<'NodeKey,'NodeData,'EdgeData> -> FGraph<'NodeKey,'NodeData,'EdgeData> (requires comparison) static member addEdges: edgeSeq: seq<'NodeKey * 'NodeKey * 'EdgeData> -> g: FGraph<'NodeKey,'NodeData,'EdgeData> -> FGraph<'NodeKey,'NodeData,'EdgeData> (requires comparison) static member addElement: nk1: 'NodeKey -> nd1: 'NodeData -> nk2: 'NodeKey -> nd2: 'NodeData -> ed: 'EdgeData -> g: FGraph<'NodeKey,'NodeData,'EdgeData> -> FGraph<'NodeKey,'NodeData,'EdgeData> (requires comparison) static member addNode: nk: 'NodeKey -> nd: 'NodeData -> g: FGraph<'NodeKey,'NodeData,'EdgeData> -> FGraph<'NodeKey,'NodeData,'EdgeData> (requires comparison) static member addNodes: nodeSeq: seq<'NodeKey * 'NodeData> -> g: FGraph<'NodeKey,'NodeData,'EdgeData> -> FGraph<'NodeKey,'NodeData,'EdgeData> (requires comparison) static member clone: graph: FGraph<'NodeKey,'NodeData,'EdgeData> -> FGraph<'NodeKey,'NodeData,'EdgeData> (requires comparison) static member containsEdge: v1: 'NodeKey -> v2: 'NodeKey -> g: FGraph<'NodeKey,'NodeData,'EdgeData> -> bool (requires comparison) static member containsNode: vk: 'NodeKey -> g: FGraph<'NodeKey,'NodeData,'EdgeData> -> bool (requires comparison) static member countEdges: g: FGraph<'NodeKey,'NodeData,'EdgeData> -> int (requires comparison) ...

--------------------
type FGraph<'NodeKey,'NodeData,'EdgeData (requires comparison)> = System.Collections.Generic.Dictionary<'NodeKey,FContext<'NodeKey,'NodeData,'EdgeData>>

--------------------
new: unit -> FGraph
static member FGraph.countNodes: g: FGraph<'NodeKey,'NodeData,'EdgeData> -> int (requires comparison)
static member FGraph.countEdges: g: FGraph<'NodeKey,'NodeData,'EdgeData> -> int (requires comparison)