lemon-graph-library

“no viable conversion” with lemon for clang but valid for g++

白昼怎懂夜的黑 提交于 2019-12-12 09:08:55
问题 Currently, I try to incorporate lemon library in our project. Most developers are on Windows, they compile with MSVC, but I am in charge (for this part) to compile with gcc and clang. I came across an error with clang that gcc does not reproduce and I managed to reduce the code: #include <lemon/dfs.h> int main() { lemon::ListDigraph g{}; lemon::ListDigraph::Node node = g.nodeFromId(42); lemon::Dfs<lemon::ListDigraph> dfs{g}; lemon::SimplePath<lemon::ListDigraph> path = dfs.path(node); return

C++ graph with removable nodes, accessible properties and reliable IDs

。_饼干妹妹 提交于 2019-12-11 03:29:56
问题 I'm trying to migrate from a proprietary graph library to an Open Source one. EDIT: since so few people seem to know how Boost Graph actually works, if you can provide a solution using the LEMON Graph Library, that's fine too. Currently, my vertices have type Graph_Vertex* and can have an associated void* pointer to store related information. A similar logic is used with respect to edges, which are of type Graph_Edge* . I use the void* pointer to store my own structure Node_State , which is

Why do C++ data structures for graphs hide contiguous integer indices?

為{幸葍}努か 提交于 2019-12-05 20:59:31
问题 Data structures for directed and undirected graphs are of fundamental importance. Well-known and widely-used implementations such as the Boost Graph Library and Lemon are designed such that the contiguous integer indices of nodes and edges are not exposed to the user via the interface. Instead, the user identifies nodes and edges by (small) representative objects. One advantage is that these objects are updated automatically when the indices of nodes and edges change due to the removal of

“no viable conversion” with lemon for clang but valid for g++

做~自己de王妃 提交于 2019-12-04 16:25:51
Currently, I try to incorporate lemon library in our project. Most developers are on Windows, they compile with MSVC, but I am in charge (for this part) to compile with gcc and clang. I came across an error with clang that gcc does not reproduce and I managed to reduce the code: #include <lemon/dfs.h> int main() { lemon::ListDigraph g{}; lemon::ListDigraph::Node node = g.nodeFromId(42); lemon::Dfs<lemon::ListDigraph> dfs{g}; lemon::SimplePath<lemon::ListDigraph> path = dfs.path(node); return 0; } With gcc, no errors. /usr/bin/g++-5 -std=c++11 -Wall -O3 -I${SRC_ROOT}/external/lemon/latest -I$

CMake Error: TARGETS given no LIBRARY DESTINATION for shared library target

戏子无情 提交于 2019-11-30 07:05:29
问题 When building an opensource project with CMake (in my case, it was the lemon graph library), I got this error when I tried to build shared libaries via -DBUILD_SHARED_LIBS=1 : TARGETS given no LIBRARY DESTINATION for shared library target Where does this error come from and how do I fix it? 回答1: In my CMakeLists.txt , my INSTALL command had no LIBRARY parameter. Changing from this: INSTALL( TARGETS lemon ARCHIVE DESTINATION lib COMPONENT library ) to this: INSTALL( TARGETS lemon ARCHIVE