def edgelist_class=(klass)
      @vertex_dict.keys.each do |v|
        @vertex_dict[v] = klass.new @vertex_dict[v].to_a
      end
      @predecessor_dict.keys.each do |v|
        @predecessor_dict[v] = klass.new @predecessor_dict[v].to_a
      end
    end
def edgelist_class=(klass)
      @vertex_dict.keys.each do |v|
        @vertex_dict[v] = klass.new @vertex_dict[v].to_a
      end
      @predecessor_dict.keys.each do |v|
        @predecessor_dict[v] = klass.new @predecessor_dict[v].to_a
      end
    end
Converts the adjacency list of each vertex to be of type _klass_. The
 class is expected to have a new contructor which accepts an enumerable as
 parameter.