[英]Edge weights with the lemon graph library
我正在使用Lemon图库。
我想为边缘分配整数权重。 因此,我正在使用EdgeMap 。 不幸的是,我的代码无法编译。
no matching function for call to 'lemon::concepts::Graph::EdgeMap<int>::EdgeMap(lemon::ListGraph&)'
有任何想法吗?
#include <lemon/list_graph.h>
#include <lemon/concepts/graph.h>
#include <iostream>
using namespace lemon;
using namespace std;
int main(int argc, const char * argv[])
{
ListGraph g;
lemon::concepts::Graph::EdgeMap<int> map(g);
return 0;
}
看起来您正在尝试在此处调用禁止复制构造函数。 lemon::ListGraph()
的副本构造函数被标记为private
并且EdgeMap (const Graph &)
一个const Graph &
参数。
换句话说, ListGraph
和EdgeMap
的概念不匹配。 据我从他们的文档了解, ListGraph
提供了concepts::Digraph
EdgeMap
概念,其中EdgeMap
需要符合ReferenceMap
实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.