print

fun print(isWeighted: Boolean)

Prints the graph's adjacency list to the standard error stream.

If the graph is weighted, it prints the weighted adjacency list, where each connection is represented as a pair of the edge weight and the connected node. If the graph is unweighted, it prints the unweighted adjacency list, where each connection is represented by the connected node.

Parameters

isWeighted

A boolean indicating whether to print the weighted or unweighted adjacency list.