簡體   English   中英

檸檬圖庫的邊緣權重

[英]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 &參數。

換句話說, ListGraphEdgeMap的概念不匹配。 據我從他們的文檔了解, ListGraph提供了concepts::Digraph EdgeMap概念,其中EdgeMap需要符合ReferenceMap實現。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM