Implementation of the GADDAG data structure