add some util function to DigraphAdapter