DirectedGraph S¶
graph.spad line 2233 [edit on github]
S: SetCategory
Category of directed graphs, allows us to model graph theory
- *: (%, %) -> DirectedGraph Product(S, S)
"*"
(a,b
) returns a tensor product : the tensor productG*H
of graphsG
andH
is a graph such that the vertex set ofG*H
is the Cartesian productV
(G
) timesV
(H
); and any two vertices (u
, u’) and (v
,v'
) are adjacent inG
timesH
if and only if u’ is adjacent withv'
andu
is adjacent withv
.
- +: (%, %) -> %
from FiniteGraph S
- ~: % -> %
The complement or inverse of a graph is a graph on the same vertices such that there is an arrow if and only if there is not an arrow in its compliment. That is, it is the compliment of the arrows but is not the set complement. for more information see: http://en.wikipedia.org/wiki/Complement_graph
- addArrow!: (%, Record(name: String, arrType: NonNegativeInteger, fromOb: NonNegativeInteger, toOb: NonNegativeInteger, xOffset: Integer, yOffset: Integer, map: List NonNegativeInteger)) -> %
from FiniteGraph S
- addArrow!: (%, String, NonNegativeInteger, NonNegativeInteger) -> %
from FiniteGraph S
- addArrow!: (%, String, NonNegativeInteger, NonNegativeInteger, List NonNegativeInteger) -> %
from FiniteGraph S
- addArrow!: (%, String, S, S) -> %
from FiniteGraph S
- addObject!: (%, Record(value: S, posX: NonNegativeInteger, posY: NonNegativeInteger)) -> %
from FiniteGraph S
- addObject!: (%, S) -> %
from FiniteGraph S
- adjacencyMatrix: % -> Matrix NonNegativeInteger
from FiniteGraph S
- arrowName: (%, NonNegativeInteger, NonNegativeInteger) -> String
from FiniteGraph S
- arrowsFromArrow: (%, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- arrowsFromNode: (%, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- arrowsToArrow: (%, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- arrowsToNode: (%, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- cartesian: (%, %) -> DirectedGraph Product(S, S)
cartesian(a, b)
returns a Cartesian product: the vertex set ofG
o
H
is the Cartesian productV
(G
) timesV
(H
) and any two vertices (u
, u’) and (v
,v'
) are adjacent inG
o
H
if and only if eitheru
=v
and u’ is adjacent withv'
inH
, or u’ =v'
andu
is adjacent withv
inG
.
- closedCartesian: (%, %, (S, S) -> S) -> %
closedCartesian(a, b, f)
builds Cartesian product of a andb
and then maps it back to % usingf
.
- closedTensor: (%, %, (S, S) -> S) -> %
closedTensor(a, b, f)
builds tensor product of a andb
and then maps it back to % usingf
.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- coerce: FinitePoset S -> %
coerce FinitePoset
to graph
- coerce: List S -> %
coerce List
to graph
- coerce: PermutationGroup S -> %
coerce PermutationGroup
to graph
- cycleClosed: (List S, String) -> %
from FiniteGraph S
- cycleOpen: (List S, String) -> %
from FiniteGraph S
- deepDiagramSvg: (String, %, Boolean) -> Void
from FiniteGraph S
- diagramHeight: % -> NonNegativeInteger
from FiniteGraph S
- diagramsSvg: (String, List %, Boolean) -> Void
from FiniteGraph S
- diagramSvg: (String, %, Boolean) -> Void
from FiniteGraph S
- diagramWidth: % -> NonNegativeInteger
from FiniteGraph S
- directedGraph: (List Record(value: S, posX: NonNegativeInteger, posY: NonNegativeInteger), List Record(name: String, arrType: NonNegativeInteger, fromOb: NonNegativeInteger, toOb: NonNegativeInteger, xOffset: Integer, yOffset: Integer, map: List NonNegativeInteger)) -> %
directedGraph(ob, ar)
constructs graph with objectsob
and arrows ar, more objects and arrows can be added later if required.
- directedGraph: (List S, List List NonNegativeInteger) -> %
directedGraph(ob, am)
constructs graph with objectsob
and adjacency matrix am.
- directedGraph: (List S, List Record(fromOb: NonNegativeInteger, toOb: NonNegativeInteger)) -> %
directedGraph(obs, ars)
constructs graph with objectsobs
and arrows ars. This constructor just has pure abstract graph information without decoration information.
- directedGraph: FinitePoset S -> %
directedGraph(poset)
constructs graph from a partially ordered set. This will be a graph with, at most, one arrow between any two nodes.
- directedGraph: List Permutation S -> %
directedGraph(perms)
constructs graph from a list of permutations:perms
.
- directedGraph: List Record(value: S, posX: NonNegativeInteger, posY: NonNegativeInteger) -> %
directedGraph(ob)
is a constructor for graph with given objectsob
, more objects and arrows can be added later if required.
- directedGraph: List S -> %
directedGraph(ob)
is a constructor for graph with given list of object names and no arrows. Use this version of the constructor if you don't
want to create specificx
,y
coordinates. more objects and arrows can be added later if required.
- distance: (%, NonNegativeInteger, NonNegativeInteger) -> Integer
from FiniteGraph S
- distanceMatrix: % -> Matrix Integer
from FiniteGraph S
- flatten: DirectedGraph % -> %
from FiniteGraph S
- getArrowIndex: (%, NonNegativeInteger, NonNegativeInteger) -> NonNegativeInteger
from FiniteGraph S
- getArrows: % -> List Record(name: String, arrType: NonNegativeInteger, fromOb: NonNegativeInteger, toOb: NonNegativeInteger, xOffset: Integer, yOffset: Integer, map: List NonNegativeInteger)
from FiniteGraph S
- getVertexIndex: (%, S) -> NonNegativeInteger
from FiniteGraph S
- getVertices: % -> List Record(value: S, posX: NonNegativeInteger, posY: NonNegativeInteger)
from FiniteGraph S
- incidenceMatrix: % -> Matrix Integer
from FiniteGraph S
- inDegree: (%, NonNegativeInteger) -> NonNegativeInteger
from FiniteGraph S
- initial: () -> %
from FiniteGraph S
- isAcyclic?: % -> Boolean
from FiniteGraph S
- isDirected?: () -> Boolean
from FiniteGraph S
- isDirectSuccessor?: (%, NonNegativeInteger, NonNegativeInteger) -> Boolean
from FiniteGraph S
- isFixPoint?: (%, NonNegativeInteger) -> Boolean
from FiniteGraph S
- isFunctional?: % -> Boolean
from FiniteGraph S
- isGreaterThan?: (%, NonNegativeInteger, NonNegativeInteger) -> Boolean
from FiniteGraph S
- kgraph: (List S, String) -> %
from FiniteGraph S
- laplacianMatrix: % -> Matrix Integer
from FiniteGraph S
- latex: % -> String
from SetCategory
- loopsArrows: % -> List Loop
from FiniteGraph S
- loopsAtNode: (%, NonNegativeInteger) -> List Loop
from FiniteGraph S
- loopsNodes: % -> List Loop
from FiniteGraph S
- looseEquals: (%, %) -> Boolean
from FiniteGraph S
- map: (%, List NonNegativeInteger, List S, Integer, Integer) -> %
from FiniteGraph S
- mapContra: (%, List NonNegativeInteger, List S, Integer, Integer) -> %
from FiniteGraph S
- max: % -> NonNegativeInteger
from FiniteGraph S
- max: (%, List NonNegativeInteger) -> NonNegativeInteger
from FiniteGraph S
- merge: (%, %) -> %
from FiniteGraph S
- min: % -> NonNegativeInteger
from FiniteGraph S
- min: (%, List NonNegativeInteger) -> NonNegativeInteger
from FiniteGraph S
- nodeFromArrow: (%, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- nodeFromNode: (%, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- nodeToArrow: (%, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- nodeToNode: (%, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- outDegree: (%, NonNegativeInteger) -> NonNegativeInteger
from FiniteGraph S
- routeArrows: (%, NonNegativeInteger, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- routeNodes: (%, NonNegativeInteger, NonNegativeInteger) -> List NonNegativeInteger
from FiniteGraph S
- spanningForestArrow: % -> List Tree Integer
from FiniteGraph S
- spanningForestNode: % -> List Tree Integer
from FiniteGraph S
- spanningTreeArrow: (%, NonNegativeInteger) -> Tree Integer
from FiniteGraph S
- spanningTreeNode: (%, NonNegativeInteger) -> Tree Integer
from FiniteGraph S
- subdiagramSvg: (Scene SCartesian 2, %, Boolean, Boolean) -> Void
from FiniteGraph S
- terminal: S -> %
from FiniteGraph S
- unit: (List S, String) -> %
from FiniteGraph S