add graph with an non-recusive inplace transitive closure