[英]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.