# HG changeset patch # User Alpar Juttner # Date 2011-08-05 00:17:29 # Node ID c59bdcc8e33e6f8397d7c9b36b199db36e33ce46 # Parent 8276e0ee48b1542f6b96241ae47721aeb4d624ab Unify sources diff --git a/doc/dirs.dox b/doc/dirs.dox --- a/doc/dirs.dox +++ b/doc/dirs.dox @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -71,7 +71,7 @@ \dir bits \brief Auxiliary tools for implementation. -This directory contains some auxiliary classes for implementing graphs, +This directory contains some auxiliary classes for implementing graphs, maps and some other classes. As a user you typically don't have to deal with these files. */ diff --git a/doc/groups.dox b/doc/groups.dox --- a/doc/groups.dox +++ b/doc/groups.dox @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -303,7 +303,7 @@ @defgroup map_concepts Map Concepts @ingroup concept \brief Skeleton and concept checking classes for maps - + This group describes the skeletons and concept checking classes of maps. */ diff --git a/doc/lgf.dox b/doc/lgf.dox --- a/doc/lgf.dox +++ b/doc/lgf.dox @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/base.cc b/lemon/base.cc --- a/lemon/base.cc +++ b/lemon/base.cc @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/bits/default_map.h b/lemon/bits/default_map.h --- a/lemon/bits/default_map.h +++ b/lemon/bits/default_map.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/bits/map_extender.h b/lemon/bits/map_extender.h --- a/lemon/bits/map_extender.h +++ b/lemon/bits/map_extender.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/bits/path_dump.h b/lemon/bits/path_dump.h --- a/lemon/bits/path_dump.h +++ b/lemon/bits/path_dump.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/bits/windows.cc b/lemon/bits/windows.cc --- a/lemon/bits/windows.cc +++ b/lemon/bits/windows.cc @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -96,7 +96,7 @@ SYSTEMTIME time; GetSystemTime(&time); char buf1[11], buf2[9], buf3[5]; - if (GetDateFormat(MY_LOCALE, 0, &time, + if (GetDateFormat(MY_LOCALE, 0, &time, ("ddd MMM dd"), buf1, 11) && GetTimeFormat(MY_LOCALE, 0, &time, ("HH':'mm':'ss"), buf2, 9) && diff --git a/lemon/core.h b/lemon/core.h --- a/lemon/core.h +++ b/lemon/core.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/dfs.h b/lemon/dfs.h --- a/lemon/dfs.h +++ b/lemon/dfs.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/graph_to_eps.h b/lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h +++ b/lemon/graph_to_eps.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/lgf_reader.h b/lemon/lgf_reader.h --- a/lemon/lgf_reader.h +++ b/lemon/lgf_reader.h @@ -391,7 +391,7 @@ class DigraphReader; template - DigraphReader digraphReader(Digraph& digraph, + DigraphReader digraphReader(Digraph& digraph, std::istream& is = std::cin); template DigraphReader digraphReader(Digraph& digraph, const std::string& fn); @@ -563,7 +563,7 @@ template friend DigraphReader digraphReader(DGR& digraph, std::istream& is); template - friend DigraphReader digraphReader(DGR& digraph, + friend DigraphReader digraphReader(DGR& digraph, const std::string& fn); template friend DigraphReader digraphReader(DGR& digraph, const char *fn); @@ -1229,9 +1229,9 @@ template class GraphReader; - + template - GraphReader graphReader(Graph& graph, + GraphReader graphReader(Graph& graph, std::istream& is = std::cin); template GraphReader graphReader(Graph& graph, const std::string& fn); @@ -1366,7 +1366,7 @@ template friend GraphReader graphReader(GR& graph, std::istream& is); template - friend GraphReader graphReader(GR& graph, const std::string& fn); + friend GraphReader graphReader(GR& graph, const std::string& fn); template friend GraphReader graphReader(GR& graph, const char *fn); diff --git a/lemon/lgf_writer.h b/lemon/lgf_writer.h --- a/lemon/lgf_writer.h +++ b/lemon/lgf_writer.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -506,7 +506,7 @@ private: template - friend DigraphWriter digraphWriter(const DGR& digraph, + friend DigraphWriter digraphWriter(const DGR& digraph, std::ostream& os); template friend DigraphWriter digraphWriter(const DGR& digraph, @@ -1082,7 +1082,7 @@ template friend GraphWriter graphWriter(const GR& graph, const char *fn); - + GraphWriter(GraphWriter& other) : _os(other._os), local_os(other.local_os), _graph(other._graph), _skip_nodes(other._skip_nodes), _skip_edges(other._skip_edges) { diff --git a/lemon/list_graph.h b/lemon/list_graph.h --- a/lemon/list_graph.h +++ b/lemon/list_graph.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -840,8 +840,8 @@ explicit Arc(int pid) { id = pid;} public: - operator Edge() const { - return id != -1 ? edgeFromId(id / 2) : INVALID; + operator Edge() const { + return id != -1 ? edgeFromId(id / 2) : INVALID; } Arc() {} diff --git a/lemon/path.h b/lemon/path.h --- a/lemon/path.h +++ b/lemon/path.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -966,20 +966,20 @@ } }; - + template ::value> struct PathCopySelector { static void copy(const From& from, To& to) { PathCopySelectorForward::copy(from, to); - } + } }; template struct PathCopySelector { static void copy(const From& from, To& to) { PathCopySelectorBackward::copy(from, to); - } + } }; } diff --git a/lemon/random.h b/lemon/random.h --- a/lemon/random.h +++ b/lemon/random.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/smart_graph.h b/lemon/smart_graph.h --- a/lemon/smart_graph.h +++ b/lemon/smart_graph.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -466,8 +466,8 @@ explicit Arc(int id) { _id = id;} public: - operator Edge() const { - return _id != -1 ? edgeFromId(_id / 2) : INVALID; + operator Edge() const { + return _id != -1 ? edgeFromId(_id / 2) : INVALID; } Arc() {} diff --git a/lemon/time_measure.h b/lemon/time_measure.h --- a/lemon/time_measure.h +++ b/lemon/time_measure.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/tolerance.h b/lemon/tolerance.h --- a/lemon/tolerance.h +++ b/lemon/tolerance.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff --git a/lemon/unionfind.h b/lemon/unionfind.h --- a/lemon/unionfind.h +++ b/lemon/unionfind.h @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -1189,7 +1189,7 @@ int ld = nodes[nodes[jd].next].left; popLeft(nodes[jd].next); pushRight(jd, ld); - if (less(ld, nodes[jd].left) || + if (less(ld, nodes[jd].left) || nodes[ld].item == nodes[pd].item) { nodes[jd].item = nodes[ld].item; nodes[jd].prio = nodes[ld].prio; diff --git a/test/dfs_test.cc b/test/dfs_test.cc --- a/test/dfs_test.cc +++ b/test/dfs_test.cc @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -184,7 +184,7 @@ Dfs dfs(G); check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6."); } - + { NullMap myPredMap; dfs(G).predMap(myPredMap).run(s); diff --git a/test/graph_copy_test.cc b/test/graph_copy_test.cc --- a/test/graph_copy_test.cc +++ b/test/graph_copy_test.cc @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -70,7 +70,7 @@ nodeRef(nr).arcRef(er). nodeCrossRef(ncr).arcCrossRef(ecr). node(fn, tn).arc(fa, ta).run(); - + check(countNodes(from) == countNodes(to), "Wrong copy."); check(countArcs(from) == countArcs(to), "Wrong copy."); @@ -98,7 +98,7 @@ // Test repeated copy digraphCopy(from, to).run(); - + check(countNodes(from) == countNodes(to), "Wrong copy."); check(countArcs(from) == countArcs(to), "Wrong copy."); } @@ -200,7 +200,7 @@ // Test repeated copy graphCopy(from, to).run(); - + check(countNodes(from) == countNodes(to), "Wrong copy."); check(countEdges(from) == countEdges(to), "Wrong copy."); check(countArcs(from) == countArcs(to), "Wrong copy."); diff --git a/test/lgf_test.cc b/test/lgf_test.cc --- a/test/lgf_test.cc +++ b/test/lgf_test.cc @@ -63,10 +63,10 @@ "0 1\n"; -int main() +int main() { { - ListDigraph d; + ListDigraph d; ListDigraph::Node s,t; ListDigraph::ArcMap label(d); std::istringstream input(test_lgf); @@ -93,7 +93,7 @@ } { - ListDigraph d; + ListDigraph d; std::istringstream input(test_lgf_nomap); digraphReader(d, input). run(); @@ -110,14 +110,14 @@ } { - ListDigraph d; + ListDigraph d; std::istringstream input(test_lgf_bad1); bool ok=false; try { digraphReader(d, input). run(); } - catch (FormatError& error) + catch (FormatError& error) { ok = true; } @@ -139,7 +139,7 @@ } { - ListDigraph d; + ListDigraph d; std::istringstream input(test_lgf_bad2); bool ok=false; try { diff --git a/test/maps_test.cc b/test/maps_test.cc --- a/test/maps_test.cc +++ b/test/maps_test.cc @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2011 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -69,8 +69,10 @@ checkConcept, WriteMap >(); checkConcept, ReadWriteMap >(); checkConcept, ReadWriteMap >(); - checkConcept, ReferenceMap >(); - checkConcept, ReferenceMap >(); + checkConcept, + ReferenceMap >(); + checkConcept, + ReferenceMap >(); // NullMap { @@ -199,7 +201,8 @@ B b = functorToMap(F())[A()]; checkConcept, MapToFunctor > >(); - MapToFunctor > map = MapToFunctor >(ReadMap()); + MapToFunctor > map = + MapToFunctor >(ReadMap()); check(functorToMap(&func)[A()] == 3, "Something is wrong with FunctorToMap");