set

abstract operator fun set(edge: Pair<Node<T>, Node<T>>, weight: W)

Sets (adding if missing, overwriting if present) the weight of the edge going from edge.first to edge.second to weight, in place.