[Lemon-user] FilterNodes does not accept map adapter
Wei Liu
weiliu620 at gmail.com
Wed Jul 31 20:30:56 CEST 2013
Dear Lemon users,
After reading subgraph adapters (
http://lemon.cs.elte.hu/pub/tutorial/a00009.html#sec_subgraphs) and map
adapters (
http://lemon.cs.elte.hu/pub/doc/1.2.3/a00524.html#ga6d57040954dfe0188f02540fe8cf3319),
I wrote code like this:
lemon::SmartGraph G;
typedef lemon::SmartGraph::NodeMap<bool> BoolMap;
BoolMap alpha(G, false);
// update alpha.
...
lemon::FilterNodes<lemon::SmartGraph> G_fg(G, alpha); // works fine.
lemon::NotMap<BoolMap> not_alpha(alpha);
lemon::FilterNodes<lemon::SmartGraph> G_bg(G, notMap(alpha) ); // compile
errors.
The compiler gives errors as below:
===========================================
/home/sci/weiliu/projects/actlearn/code/core/grabcutseg.cxx:202:66: error:
no matching function for call to
‘lemon::FilterNodes<lemon::SmartGraph>::FilterNodes(lemon::SmartGraph&,
lemon::NotMap<lemon::GraphExtender<lemon::SmartGraphBase>::NodeMap<bool> >)’
/home/sci/weiliu/projects/actlearn/code/core/grabcutseg.cxx:202:66: note:
candidates are:
In file included from
/home/sci/weiliu/projects/actlearn/code/core/common.h:16:0,
from
/home/sci/weiliu/projects/actlearn/code/core/grabcutseg.cxx:2:
/home/sci/weiliu/packages/lemon-1.2.3/lemon/adaptors.h:1587:5: note:
lemon::FilterNodes<GR, NF, typename
lemon::enable_if<lemon::UndirectedTagIndicator<GR>
>::type>::FilterNodes(GR&, lemon::FilterNodes<GR, NF, typename
lemon::enable_if<lemon::UndirectedTagIndicator<GR>
>::type>::NodeFilterMap&) [with GR = lemon::SmartGraph; NF =
lemon::GraphExtender<lemon::SmartGraphBase>::NodeMap<bool>; typename
lemon::enable_if<lemon::UndirectedTagIndicator<GR> >::type = void;
lemon::FilterNodes<GR, NF, typename
lemon::enable_if<lemon::UndirectedTagIndicator<GR> >::type>::NodeFilterMap
= lemon::GraphExtender<lemon::SmartGraphBase>::NodeMap<bool>]
/home/sci/weiliu/packages/lemon-1.2.3/lemon/adaptors.h:1587:5: note: no
known conversion for argument 2 from
‘lemon::NotMap<lemon::GraphExtender<lemon::SmartGraphBase>::NodeMap<bool>
>’ to ‘lemon::FilterNodes<lemon::SmartGraph>::NodeFilterMap& {aka
lemon::GraphExtender<lemon::SmartGraphBase>::NodeMap<bool>&}’
/home/sci/weiliu/packages/lemon-1.2.3/lemon/adaptors.h:1583:5: note:
lemon::FilterNodes<GR, NF, typename
lemon::enable_if<lemon::UndirectedTagIndicator<GR> >::type>::FilterNodes()
[with GR = lemon::SmartGraph; NF =
lemon::GraphExtender<lemon::SmartGraphBase>::NodeMap<bool>; typename
lemon::enable_if<lemon::UndirectedTagIndicator<GR> >::type = void]
/home/sci/weiliu/packages/lemon-1.2.3/lemon/adaptors.h:1583:5: note:
candidate expects 0 arguments, 2 provided
/home/sci/weiliu/packages/lemon-1.2.3/lemon/adaptors.h:1563:9: note:
lemon::FilterNodes<lemon::SmartGraph>::FilterNodes(const
lemon::FilterNodes<lemon::SmartGraph>&)
/home/sci/weiliu/packages/lemon-1.2.3/lemon/adaptors.h:1563:9: note:
candidate expects 1 argument, 2 provided
=================================================
Did I miss something obvious? I'm using lemon 1.2.3 and gcc 4.7
I appreciate for your help.
Wei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20130731/9589d388/attachment.html>
More information about the Lemon-user
mailing list