COIN-OR::LEMON - Graph Library

Custom Query (545 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (67 - 69 of 545)

Ticket Owner Reporter Resolution Summary
#365 Alpar Juttner William Ford fixed Cannot include <lemon/adaptors.h> in any of my application source files
Description

I am using the Gnu 4.4 compiler under MinGW with Codeblocks on Windows to build a large application. I cannot include <lemon/adaptors.h> or <lemon/connectivity.h> in my application without getting a stream of error messages I cannot figure out. My application must use these included file. I have placed error messages below.

Thanks for any help you can provide.

C:\usr\include\lemon\adaptors.h|3459|error: expected nested-name-specifier before 'Value'|
C:\usr\include\lemon\adaptors.h|3459|error: expected ';' before 'Value'|
C:\usr\include\lemon\adaptors.h|3461|error: wrong number of template arguments (0, should be 2)|
C:\usr\include\lemon\bits\traits.h|155|error: provided for 'template<class Map, class Enable> struct lemon::MapTraits'|
C:\usr\include\lemon\adaptors.h|3462|error: wrong number of template arguments (0, should be 2)|
C:\usr\include\lemon\bits\traits.h|155|error: provided for 'template<class Map, class Enable> struct lemon::MapTraits'|
C:\usr\include\lemon\adaptors.h|3463|error: wrong number of template arguments (0, should be 2)|
C:\usr\include\lemon\bits\traits.h|155|error: provided for 'template<class Map, class Enable> struct lemon::MapTraits'|
C:\usr\include\lemon\adaptors.h|3464|error: wrong number of template arguments (0, should be 2)|
C:\usr\include\lemon\bits\traits.h|155|error: provided for 'template<class Map, class Enable> struct lemon::MapTraits'|
C:\usr\include\lemon\adaptors.h|3465|error: wrong number of template arguments (0, should be 2)|
C:\usr\include\lemon\bits\traits.h|155|error: provided for 'template<class Map, class Enable> struct lemon::MapTraits'|
C:\usr\include\lemon\adaptors.h|3468|error: expected ')' before ',' token|
C:\usr\include\lemon\adaptors.h|3472|error: ISO C++ forbids declaration of 'Value' with no type|
C:\usr\include\lemon\adaptors.h|3472|error: expected ';' before 'operator'|
C:\A+MyPrograms\CombinatoricsCalculator\src\graphs\algorithms\GraphAlgorithmCanvas.cpp|698|error: expected ';' at end of input|
C:\A+MyPrograms\CombinatoricsCalculator\src\graphs\algorithms\GraphAlgorithmCanvas.cpp|698|error: expected '}' at end of input|
C:\A+MyPrograms\CombinatoricsCalculator\src\graphs\algorithms\GraphAlgorithmCanvas.cpp|698|error: expected unqualified-id at end of input|
C:\A+MyPrograms\CombinatoricsCalculator\src\graphs\algorithms\GraphAlgorithmCanvas.cpp|698|error: expected '}' at end of input|
C:\usr\include\lemon\adaptors.h|3443|error: expected unqualified-id at end of input|
C:\usr\include\lemon\adaptors.h|3443|error: expected '}' at end of input|
||=== Build finished: 21 errors, 0 warnings ===|
#369 Peter Kovacs Ben Strasser invalid graphCopy crash
Description

The following code crashes:

#include <lemon/list_graph.h>
#include <lemon/core.h>
#include <lemon/lgf_reader.h>

typedef lemon::ListGraph Graph;
using lemon::INVALID;
	
int main(int argc, char*argv[]){
	Graph g;

	lemon::GraphReader<Graph>(g, "bug")
		.run();

	bool a = true;
	for(Graph::EdgeIt i(g); i!=INVALID;){
		Graph::Edge e = i;
		++i;
		if(a)
			g.erase(e);
		a = !a;
	}

	Graph g2;
	Graph::EdgeMap<Graph::Edge>edge_map(g2);

	lemon::graphCopy(g, g2)
		.edgeRef(edge_map)
		.run();
}

I have attached the graph in the bug file. The problem is in graphCopy because the following code works

#include <lemon/list_graph.h>
#include <lemon/core.h>
#include <lemon/lgf_reader.h>

typedef lemon::ListGraph Graph;
using lemon::INVALID;
	
int main(int argc, char*argv[]){
	Graph g;

	lemon::GraphReader<Graph>(g, "bug")
		.run();

	bool a = true;
	for(Graph::EdgeIt i(g); i!=INVALID;){
		Graph::Edge e = i;
		++i;
		if(a)
			g.erase(e);
		a = !a;
	}

	Graph g2;
	Graph::EdgeMap<Graph::Edge>edge_map(g2);

	Graph::NodeMap<Graph::Node>node_map(g);
	for(Graph::NodeIt i(g); i!=INVALID; ++i){
		Graph::Node u = g2.addNode();
		node_map[i] = u;
	}
		
	for(Graph::EdgeIt i(g); i!=INVALID; ++i){
		edge_map[
			g2.addEdge(
				node_map[g.u(i)],
				node_map[g.v(i)]
			)
		] = i;
	}

	/*lemon::graphCopy(g, g2)
		.edgeRef(edge_map)
		.run();*/
}

My version is according to lemon/config.h

#define LEMON_VERSION 1.1.1

It's one of the stable releases. It's not an svn version.

Thanks for looking into this.

#371 Peter Kovacs Peter Kovacs fixed Target graph is not cleared before graph copying
Description

The target graph must be cleared before graph copying. The clear() function must be used in the DigraphCopySelector and GraphCopySelector classes before adding nodes and arcs/edges.

It is a question if build() is required to clear the graph or we should explicitly call clear() before build() for those structures that provides build() function.

Note: See TracQuery for help on using queries.