edges

fun edges(t: T): List<Pair<Double, T>>

Retrieves a list of edges connected to the specified node.

Each edge is represented as a pair, where the first element is the weight of the edge (as a Double), and the second element is the connected node. If the graph is unweighted, a default weight of 1.0 is assigned to each edge.

Return

A list of pairs representing the edges connected to the node.

Parameters

t

The node whose edges are to be retrieved.

Throws

IllegalStateException

If the specified node is not found in the graph.