Compute all connections.