graph.spad line 4104 [edit on github]
allows us to model graph theory
tensor product : the tensor product G*H
of graphs G
and H
is a graph such that the vertex set of G*H
is the Cartesian product V
(G
) times V
(H
); and any two vertices (u
, u') and (v
, v'
) are adjacent in G
times H
if and only if u' is adjacent with v'
and u
is adjacent with v
.
apply '
function' represented by this graph to vertex index 'a'
Cartesian product doubles the size of next list in each object, that is it produces two arrows out of every node
Cartesian product doubles the size of next list in each object, that is it produces two arrows out of every node
as tensor product but returns %.
given a mapping from this graph this function tries to calculate a unique reverse mapping back to this graph
coerce PermutationGroup
to graph which represents the generators of the group
given a mapping from this graph this function tries to calculate a unique reverse mapping back to this graph
apply 'function' represented by this graph to 'a' repeatedly until we reach a loop which is returned as a sequence of vertex indexes.
multifunctionGraph(l)
constructs a graph with given list l
of object names. Use this version of the constructor if you don't
intend to create diagrams and therefore don't
care about x
, y
coordinates. More objects and arrows can be added later if required.
multifunctionGraph(lo, am)
constructs a graph given list of objects lo
and adjacency matrix am.
construct graph from a list of permutations.
multifunctionGraph(lo, la)
constructs a graph with given list of objects la and list of arrows la. More objects and arrows can be added later if required.
multifunctionGraph(l)
constructs a graph with given list l
of objects. More objects and arrows can be added later if required.
convert permutation generators to a Cayley graph permList should contain generator permutations and should not contain identity permutation. if permutationNames then names generated represent permutation
convert PermutationGroup to a Cayley graph
generates a permutation group from this graph assumes this graph represents a valid group
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
FiniteGraph(S)