protected virtual EndPointPair <TNode> Pair(TNode nodeU, TNode nodeV) { return(IsDirected ? EndPointPair <TNode> .Directed(nodeU, nodeV) : EndPointPair <TNode> .Undirected(nodeU, nodeV)); }