connect

fun connect(node1: T, node2: T)

Connects two nodes in the graph, by calling addEdge(node1,node2) and addEdge(node2, node1)

Parameters

node1

The first node to connect.

node2

The second node to connect.


fun connect(node1: T, node2: T, weight: Double)

Connects two nodes in the graph, by calling addEdge(node1,node2, weight) and addEdge(node2, node1, weight)

Parameters

node1

The first node to connect.

node2

The second node to connect.

weight

The weight of the connection.


fun connect(node1: T, node2: T, weight: Int)

Overloaded function that calls connect with weight converted to a double.