graph.spad line 2963 [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
. Cartesian product does apply to function graph produces two arrows out of every node
apply '
function' represented by this graph to vertex index 'a'
as tensor product but returns %. Cartesian product does apply to function graph produces two arrows out of every node
given a mapping from this graph this function tries to calculate a unique reverse mapping back to this graph
given a mapping from this graph this function tries to calculate a unique reverse mapping back to this graph
constructor for graph with given list 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.
construct graph from a list of permutations.
constructor for graph with given objects and arrows more objects and arrows can be added later if required.
constructor for graph with given objects more objects and arrows can be added later if required.
apply 'function' represented by this graph to 'a' repeatedly until we reach a loop which is returned as a sequence of vertex indexes.
FiniteGraph(S)