0

I need the following:

  • create a class which does something with a graph
  • the modification on the graph and the related maps must be possible in different functions, so that all of them can change the global state of graph and maps
  • I have both graph and maps as attribute variable, and I want to define the map in the constructor, so I can create it when I create the object.

The problem is that I cannot assign to a class attribute a map. the error I get is the following:

'operator=' is a private member of 'lemon::DigraphExtender<lemon::ListDigraphBase>::ArcMap<int>'

when I try the assignment: this->length = ListDigraph::ArcMap<int>(g);

length and g are declared as public attributes of the class:

ListDigraph g;
ListDigraph::ArcMap<int> length;

0 Answers0