Path graphs¶
- path_graph[vert_type](size: int, periodic: bool = False) undirected_network[vert_type] ¶
-
template<integer_network_vertex VertT>
undirected_network<VertT> path_graph(VertT size, bool periodic = false)¶
Generates a chain of size
vertices, each connected consecutively to each
other. If the periodic parameter is set to true
, then the first and the
last vertices are also connected, making it into a cycle graph equivalent to
what is generated through cycle_graph()
.
>>> import reticula as ret
>>> ret.path_graph[ret.int64](size=128)
<undirected_network[int64] with 128 verts and 127 edges>
>>> ret.path_graph[ret.int64](size=128, periodic=True)
<undirected_network[int64] with 128 verts and 128 edges>