[Lemon-user] strongly connected components

Mark W Redekopp Mark.W.Redekopp at raytheon.com
Sat Sep 18 20:36:49 CEST 2010


Hi all

Can anyone just give me a brief example of how to call the strongly 
connected components function template on a simple ListDigraph?  I thought 
I could do something like this:

Assume _g is a pointer to a ListDigraph

  int num_components;
  lemon::ListDigraph::NodeMap<int> components( (*_g) );
  components = stronglyConnectedComponents <lemon::ListDigraph, 
lemon::ListDigraph::NodeMap<int> >( (*_g), components);


Here are the first couple of compile errors.  I realize that the operator 
'=' is private to nodemap and I think there is a different nodemap class 
that I should use related to MappableDigraphComponent, but I have no idea 
how or what to call or do.  Any help would be greatly appreciated.


../lemon-1.2/lemon/bits/graph_extender.h:236: error: `template<class CMap> 
lemon::DigraphExtender<Base>::NodeMap& 
lemon::DigraphExtender<Base>::NodeMap::operator=(const CMap&) [with CMap = 
CMap, _Value = int, Base = lemon::ListDigraphBase]' is private
graph_src/trust_graph.cpp:1084: error: within this context
../lemon-1.2/lemon/bits/graph_extender.h: In member function 
`lemon::DigraphExtender<Base>::NodeMap<_Value>& 
lemon::DigraphExtender<Base>::NodeMap<_Value>::operator=(const CMap&) 
[with CMap = int, _Value = int, Base = lemon::ListDigraphBase]':
graph_src/trust_graph.cpp:1084:   instantiated from here
../lemon-1.2/lemon/bits/map_extender.h:74: error: `template<class CMap> 
lemon::MapExtender& lemon::MapExtender::operator=(const CMap&) [with CMap 
= CMap, _Map = 
lemon::DefaultMap<lemon::DigraphExtender<lemon::ListDigraphBase>, 
lemon::ListDigraphBase::Node, int>]' is private
../lemon-1.2/lemon/bits/graph_extender.h:237: error: within this context
../lemon-1.2/lemon/bits/default_map.h: In member function 
`lemon::DefaultMap<_Graph, _Item, _Value>& lemon::DefaultMap<_Graph, 
_Item, _Value>::operator=(const CMap&) [with CMap = int, _Graph = 
lemon::DigraphExtender<lemon::ListDigraphBase>, _Item = 
lemon::ListDigraphBase::Node, _Value = int]':

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20100918/ba80ebc1/attachment.html>


More information about the Lemon-user mailing list