RandomOrientation - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


GraphTheory[RandomGraphs]

  

RandomOrientation

  

generate random orientation of graph

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

RandomOrientation(G,opts)

Parameters

G

-

undirected graph

opts

-

(optional) one or more options as specified below

Options

• 

seed = integer or none

  

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

• 

strong = truefalse

  

Specifies that the resulting directed graph must be strongly connected. The default is false.

Description

• 

RandomOrientation(G,opts) creates a random orientation of the undirected graph G. This is a directed graph with a particular random assignment of directions to the edges of G.

• 

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

Examples

withGraphTheory:

GGraphTheory:-CompleteGraph5

GGraph 1: an undirected graph with 5 vertices and 10 edge(s)

(1)

withRandomGraphs:

G1RandomOrientationG

G1Graph 2: a directed graph with 5 vertices and 10 arc(s)

(2)

Compatibility

• 

The GraphTheory[RandomGraphs][RandomOrientation] command was introduced in Maple 2023.

• 

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

See Also

RandomDigraph

RandomGraph

RandomNetwork

RandomTournament

RandomTree

 


Download Help Document