# mixedGraph -- create a mixed graph from a combination of undirected graph, digraph and bigraph

## Synopsis

• Usage:
G= mixedGraph(U, D, B)
G= mixedGraph G
G= mixedGraph D
G= mixedGraph B
G= mixedGraph(G, D)
G= mixedGraph(G, B)
G= mixedGraph(D, B)
• Inputs:
• U, an instance of the type Graph, component that contains all undirected edges of the graph
• D, an instance of the type Digraph, component that contains all directed edges of the graph
• B, an instance of the type Bigraph, component that contains all bidirected edges of the graph
• Outputs:

## Description

This is a constructor of graphs of class MixedGraph from a combination of subgraphs of classes Graph, Digraph and Bigraph. One can also input any subset and any permutation of the arguments. Each type of subgraph can appear at most once.

Note that this constructor does not check the input satisfies the properties of loopless mixed graphs from Sadeghi and Lauritzen, 2020 <https://arxiv.org/pdf/1109.5909.pdf>.

 i1 : G = mixedGraph(graph{{1,2}},digraph {{1,3},{2,3}},bigraph {{3,4}}) o1 = MixedGraph{Bigraph => Bigraph{3 => {4}}} 4 => {3} Digraph => Digraph{1 => {3}} 2 => {3} 3 => {} Graph => Graph{1 => {2}} 2 => {1} o1 : MixedGraph

• MixedGraph -- a graph that has undirected, directed and bidirected edges

## Ways to use mixedGraph :

• "mixedGraph(Bigraph)"
• "mixedGraph(Bigraph,Digraph)"
• "mixedGraph(Bigraph,Digraph,Graph)"
• "mixedGraph(Bigraph,Graph)"
• "mixedGraph(Bigraph,Graph,Digraph)"
• "mixedGraph(Digraph)"
• "mixedGraph(Digraph,Bigraph)"
• "mixedGraph(Digraph,Bigraph,Graph)"
• "mixedGraph(Digraph,Graph)"
• "mixedGraph(Digraph,Graph,Bigraph)"
• "mixedGraph(Graph)"
• "mixedGraph(Graph,Bigraph)"
• "mixedGraph(Graph,Bigraph,Digraph)"
• "mixedGraph(Graph,Digraph)"
• "mixedGraph(Graph,Digraph,Bigraph)"

## For the programmer

The object mixedGraph is .