Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

MixedGraphs

Guides

  • Mixed Graph Functions

Symbols

  • EulerizeGraph
  • EvenDegreeVertexList
  • EvenDegreeVertexQ
  • GeneralizedGraphData
  • GraphConvexHull
  • GraphicalDegreeSequenceQ
  • GraphInformation
  • MixedGraphDirectedArcs
  • MixedGraphToDigraph
  • MixedGraphUndirectedEdges
  • OddDegreeVertexList
  • OddDegreeVertexQ
  • OddNodes
  • RandomMixedGraph
  • RandomSymbolicMixedGraph
  • RandomSymbolicWeightedMixedGraph
  • RandomWeightedMixedGraph
  • TakeLargestGraphComponentBy
  • UndirectedGraphToMixedGraph
PeterBurbery`MixedGraphs`
UndirectedGraphToMixedGraph
​
UndirectedGraphToMixedGraph[graph,frac]
randomly replaces a fraction
frac
of
graph
's undirected edges with directed edges.
​
Details and Options

Examples  
(1)
Basic Examples  
(1)
Make a parametric
Harary
graph mixed:
In[1]:=
UndirectedGraphToMixedGraph
[HararyGraph[7,21],.5]
Out[1]=
Construct a circulant graph with 35% directed edges:
In[2]:=
UndirectedGraphToMixedGraph
[CirculantGraph[27,{1,8}],0.35]
Out[2]=
Generate a random mixed spatial graph and take the largest connected component by edge count:
In[3]:=
=RandomGraph[SpatialGraphDistribution[148,
-2

]]
Out[3]=
Take the largest connected graph component:
In[4]:=
TakeLargestGraphComponentBy
[]
Out[4]=


Convert the graph to a mixed graph made up of 0.68 directed arcs:
In[5]:=
UndirectedGraphToMixedGraph
First
TakeLargestGraphComponentBy
[],0.68
Out[5]=
RandomMixedGraph can be used to do this in one step:
In[6]:=
RandomMixedGraph
[SpatialGraphDistribution[148,
-2

],0.68]
Out[6]=
SeeAlso
RelatedGuides
▪
Mixed Graph Functions
Examples Initialization
Metadata

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com