returning const pointer instead of mutable/immutable collections (as in scala), linked_graph implementation