Home > graph-builder > GraphBuilder > allowsSelfLoops
Specifies whether the graph will allow self-loops (edges that connect a node to itself). Attempting to add a self-loop to a graph that does not allow them will throw an error.
Signature:
allowsSelfLoops(allowsSelfLoops: boolean): GraphBuilder<N>;
Returns: GraphBuilder<N>
Parameter | Type | Description |
---|---|---|
allowsSelfLoops |
boolean |