circular_ladder_graph#
- circular_ladder_graph(n, create_using=None)[source]#
Returns the circular ladder graph \(CL_n\) of length n.
\(CL_n\) consists of two concentric n-cycles in which each of the n pairs of concentric nodes are joined by an edge.
Node labels are the integers 0 to n-1
(
Source code,png)
- Parameters:
- nint
The length of the ladder. Must be at least 2.
- create_usingNetworkX graph constructor, optional (default=nx.Graph)
Graph type to create. If graph instance, then cleared before populated.
- Returns:
- GGraph
A circular ladder graph.
- Raises:
- ValueError
If
nis less than 2.- NetworkXError
If
create_usingis a directed graph.
Additional backends implement this function
cugraph : GPU-accelerated backend.