Questions tagged [lemon-graph-library]

A C++ template library for efficient implementations of data structures for optimization of tasks connected via graphs.

LEMON stands for Library for Efficient Modeling and Optimization in Networks. It is a C++ template library providing efficient implementations of common data structures and algorithms with focus on combinatorial optimization tasks connected mainly with graphs and networks.

LEMON employs genericity in C++ by using templates. The tools of the library are designed to be versatile, convenient and highly efficient. They can be combined easily to solve complex real-life optimization problems. For example, LEMON’s graphs can differ in many ways (depending on the representation and other specialities), but all have to satisfy one or more graph concepts, which are standardized interfaces to work with the rest of the library.

Useful links:

49 questions
0
votes
2 answers

Constrained shortest path in LEMON C++

I have a simple example of graph: ListDigraph g; ListDigraph::ArcMap length(g); ListDigraph::ArcMap color(g); build_graph(g, length, color); // function building the graph The map length contains the weights of the graph, while the map…
0
votes
1 answer

Create subgraph of LEMON ListDigraph in c++

I have a ListDigraph and related node and arc maps, namely, ListDigraph::ArcMaplength; ListDigraph::NodeMap label; I have a list of nodes, belonging to the graph. I would like to build a subgraph which has list of nodes mentioned…
0
votes
0 answers

Assign a ListDigraph::ArcMap to a class attribute into a constructor c++

I need the following: create a class which does something with a graph the modification on the graph and the related maps must be possible in different functions, so that all of them can change the global state of graph and maps I have both graph…
0
votes
0 answers

Custom Map for DiGraph::Arc LEMON

I want to create a custom map to assign different weights to different arcs. struct MyMap{ typedef int Value; typedef ListDigraph::Arc Key; unordered_map mapping; Value operator[](const…
0
votes
1 answer

Maps in LEMON Graph C++

I need a really simple thing in LEMON but I cannot solve it. I have a weighted graph. Weights on arcs. I need to use the graph as part of a class object. Therefore I have the graph and the ArcMap (needed for the weights) as object attributes. Now, I…
0
votes
1 answer

Lemon graph how to find all paths between two nodes

I'm using the Lemon C++ library for graphs, and what I need to do is to find all the paths between two nodes. I'm able to find a single path (the shortest), but I need all of them. Is there a way to achieve this with Lemon? // Create the…
0
votes
0 answers

error: overloaded function with no contextual type information usinf LEMON-graph-library

So I am implementing a Benders procedure using lazy constraints from GUROBI. As part of the subproblem procedure I need to process a graph using Breadth First Search, for which I am using LEMON. I am trying to implement use a visitor for the BFS…
cesarknbv
  • 15
  • 3
0
votes
0 answers

how to correctly write CmakeLists.txt for third-party library?

I am using CLion to write a Cmake project. here is the tree view of the directory(files are ignored),where lemon-1.3-1 is the third party library. ├── cmake-build-debug │   ├── CMakeFiles │   │   ├── 3.15.3 │   │   │   ├── CompilerIdC │   │   │  …
syheliel
  • 151
  • 1
  • 7
0
votes
1 answer

installation lemon Could NOT find ILOG COIN SOPLEX

I am trying to install a github repository and on running as follows /home/user/.local/bin/python3 -m pip install -e /home/user/repository_folder_name I get the following error ERROR: Command errored out with exit status 1: command:…
0
votes
1 answer

C++ LEMON Graph Library - Show arc/edge map with graphToEps()

Using the LEMON C++ library and GraphToEps, I am trying to visualize a grid graph with accompanying edge (or arc) weights, without luck. Here's what I've got in my main() so far: // Create graph and init maps GridGraph g = GridGraph(5,…
0
votes
1 answer

C++ - Segmentation fault when inserting values into std::map

I'm trying to build a graph instance parser in C++ which takes the graph nodes as an input and inserts them into a SmartGraph class defined by the LEMON library. The library doesn't allow me to insert nodes with a specific ID (as far as I've seen in…
0
votes
1 answer

Why would candidate '=' operator overload be marked as const?

I can't use std::set_union because I'm not overloading the assignment operator correctly. I'm using a std::set of my own struct, NodeChange_t, which itself contains another struct, point_t. Here are these guys' operator overloads: // ----…
0
votes
1 answer

Moving an object from one vector to another in C++ (LEMON library)

I am trying to use the LEMON library and I am running into an issue with an algorithm that I am trying to implement. The idea of this algorithm is that there is a vector of vectors of nodes and I want to move the nodes around to different vectors…
redmoncoreyl
  • 133
  • 9
0
votes
1 answer

Connexion between points (type) and an integer (without struct )

I read points frome a file, I use the library Lemon (because i want to use graph later) therefore each point is represented by the type : dim2 :: Point . so I used the library lemon/dim2.h My problem is that each point there have a number of the…
all.west
  • 71
  • 1
  • 1
  • 11
0
votes
1 answer

Lemon graph from Omnet++ network

I am trying to extract a graph of network from omnet++ and feed the information of nodes and links to the Lemon graph. The part of the problem is easy to deal with. Using the code: cTopology *topo = new cTopology("topo"); …
Vijay Rana
  • 35
  • 1
  • 8