refactored ContractionGraph : added clearConnections and
addConnectionsOf