CycleGraph
CycleGraph is for building directed, unweighted cycle graphs. It is a class built on top of our Digraph class. Within the Digraph class, it is possible to add weights to these cycle graphs.
Usage:
cycle_graph = CycleGraph(n)
n is the number of vertices in the desired cycle graph.
-
class cactis.CycleGraph(*args, backend=None, **kwargs)[source]
Directed cycle graph.
A subclass of cactis.Digraph that constructs a consistently oriented directed
cycle on n vertices.
-
__init__(n)[source]
Initialize a directed cycle graph with ‘n’ vertices.
- Parameters:
- nint
Number of vertices in the cycle
Notes