This can be implemented more elegantly as 
```
    MergeGraphIndexType aliveNodeId = mergeGraph_.id(mergeGraph_.u(edgeToRemove)); 
    MergeGraphIndexType deadNodeId = mergeGraph_.id(mergeGraph_.v(edgeToRemove));
    if(!mergeGraph_.hasNodeId(aliveNodeId))
        std::swap(aliveNodeId, deadNodeId);
```
If the functionality is needed several times, it should be refactored in its own function.