replace

fun replace(old: NodeType, new: NodeType): Boolean

Replaces the first occurrence of an edge with old with a new edge to new.