Added new DynamicGraph class to follow paper implementation