guard for not-fully-connected graph