RandomGeometricGraph - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory[RandomGraphs]

  

RandomGeometricGraph

  

generate random geometric graph

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

RandomGeometricGraph(n,t,dims,opts)

Parameters

n

-

positive integer or list of vertices

t

-

positive real number; distance threshold

dims

-

(optional) positive integer; number of dimensions of random points

opts

-

(optional) one or more options as specified below

Options

• 

distribution = algebraic or list(algebraic)

  

A continuous distribution as supported by the Statistics package, or list of such distributions. The default is the uniform distribution between 0 and 1.

• 

norm = integer or one of Frobenius or infinity.

  

Specifies the norm to be used in computing distances. The default is 2, the Euclidean norm.

  

For more information on norms, see LinearAlgebra[Norm].

• 

seed = integer or none

  

Seed for the random number generator. Equivalent to calling randomize(seed) immediately before invoking this function.

• 

weighted = true or false

  

If weighted=true, the result is a weighted graph whose edge weights correspond to the distance between points using the specified norm. Default is false.

Description

• 

RandomGeometricGraph(n,t,dims,opts) creates a random geometric graph on n vertices. A random geometric graph is a graph whose vertices correspond to a set of randomly generated points, and whose edges correspond with those pairs of points whose distance falls under a specified threshold t.

• 

If omitted, the parameter dims is assumed to be 2 unless a multidimensional distribution was specified with the distribution option, in which case dims is taken to be numelems(distribution).

• 

The random number generator used can be seeded using the randomize function or the seed option.

Examples

withGraphTheory:

withRandomGraphs:

G1RandomGeometricGraph100,1

G1Graph 1: an undirected graph with 100 vertices and 4795 edge(s)

(1)

G2RandomGeometricGraph100,1,weighted

G2Graph 2: an undirected weighted graph with 100 vertices and 4837 edge(s)

(2)

interfacertablesize=4:

WeightMatrixG2

G3RandomGeometricGraph200,12,norm=,distribution=`$`Normal0,1,3

G3Graph 3: an undirected graph with 200 vertices and 441 edge(s)

(3)

Compatibility

• 

The GraphTheory[RandomGraphs][RandomGeometricGraph] command was introduced in Maple 2020.

• 

For more information on Maple 2020 changes, see Updates in Maple 2020.

See Also

GraphTheory[WeightMatrix]

RandomDigraph

RandomGraph

RandomNetwork

RandomTournament

RandomTree