# HG changeset patch # User Alpar Juttner # Date 1376040497 -7200 # Node ID dceba191c00dbe9bb4867fab619aac7a9c232ae9 # Parent 9eac00ea588fc2ee25ca47759d0a1c426171a2b1 Apply unify-sources.sh to the source tree diff -r 9eac00ea588f -r dceba191c00d doc/coding_style.dox --- a/doc/coding_style.dox Fri Aug 09 14:07:27 2013 +0200 +++ b/doc/coding_style.dox Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d doc/dirs.dox --- a/doc/dirs.dox Fri Aug 09 14:07:27 2013 +0200 +++ b/doc/dirs.dox Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d doc/groups.dox --- a/doc/groups.dox Fri Aug 09 14:07:27 2013 +0200 +++ b/doc/groups.dox Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -429,7 +429,7 @@ which is capable of handling real-valued arc costs (other numerical data are required to be integer). -For more details about these implementations and for a comprehensive +For more details about these implementations and for a comprehensive experimental study, see the paper \cite KiralyKovacs12MCF. It also compares these codes to other publicly available minimum cost flow solvers. @@ -570,7 +570,7 @@ \image html planar.png \image latex planar.eps "Plane graph" width=\textwidth */ - + /** @defgroup tsp Traveling Salesman Problem @ingroup algs diff -r 9eac00ea588f -r dceba191c00d doc/lgf.dox --- a/doc/lgf.dox Fri Aug 09 14:07:27 2013 +0200 +++ b/doc/lgf.dox Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d doc/min_cost_flow.dox --- a/doc/min_cost_flow.dox Fri Aug 09 14:07:27 2013 +0200 +++ b/doc/min_cost_flow.dox Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/adaptors.h --- a/lemon/adaptors.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/adaptors.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/assert.h --- a/lemon/assert.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/assert.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/base.cc --- a/lemon/base.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/base.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bellman_ford.h --- a/lemon/bellman_ford.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bellman_ford.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bfs.h --- a/lemon/bfs.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bfs.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bin_heap.h --- a/lemon/bin_heap.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bin_heap.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/alteration_notifier.h --- a/lemon/bits/alteration_notifier.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/alteration_notifier.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/array_map.h --- a/lemon/bits/array_map.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/array_map.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/bezier.h --- a/lemon/bits/bezier.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/bezier.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/default_map.h --- a/lemon/bits/default_map.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/default_map.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/edge_set_extender.h --- a/lemon/bits/edge_set_extender.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/edge_set_extender.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/graph_adaptor_extender.h --- a/lemon/bits/graph_adaptor_extender.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/graph_adaptor_extender.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/graph_extender.h --- a/lemon/bits/graph_extender.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/graph_extender.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -843,7 +843,7 @@ // Alterable extension typedef AlterationNotifier NodeNotifier; - typedef AlterationNotifier RedNodeNotifier; + typedef AlterationNotifier RedNodeNotifier; typedef AlterationNotifier BlueNodeNotifier; typedef AlterationNotifier ArcNotifier; typedef AlterationNotifier EdgeNotifier; diff -r 9eac00ea588f -r dceba191c00d lemon/bits/lock.h --- a/lemon/bits/lock.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/lock.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2012 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -33,16 +33,16 @@ class Lock { public: Lock() { - pthread_mutex_init(&_lock, 0); + pthread_mutex_init(&_lock, 0); } ~Lock() { - pthread_mutex_destroy(&_lock); + pthread_mutex_destroy(&_lock); } void lock() { - pthread_mutex_lock(&_lock); + pthread_mutex_lock(&_lock); } void unlock() { - pthread_mutex_unlock(&_lock); + pthread_mutex_unlock(&_lock); } private: @@ -57,7 +57,7 @@ ~Lock() {} void lock() {} void unlock() {} - }; + }; #endif } } diff -r 9eac00ea588f -r dceba191c00d lemon/bits/map_extender.h --- a/lemon/bits/map_extender.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/map_extender.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/path_dump.h --- a/lemon/bits/path_dump.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/path_dump.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/solver_bits.h --- a/lemon/bits/solver_bits.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/solver_bits.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/traits.h --- a/lemon/bits/traits.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/traits.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/bits/windows.cc --- a/lemon/bits/windows.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/windows.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -140,7 +140,7 @@ _repr = 0; //Just to avoid 'unused variable' warning with clang #endif } - + WinLock::~WinLock() { #ifdef WIN32 CRITICAL_SECTION *lock = static_cast(_repr); diff -r 9eac00ea588f -r dceba191c00d lemon/bits/windows.h --- a/lemon/bits/windows.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/bits/windows.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/capacity_scaling.h --- a/lemon/capacity_scaling.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/capacity_scaling.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -838,7 +838,7 @@ return OPTIMAL; } - + // Check if the upper bound is greater or equal to the lower bound // on each arc. bool checkBoundMaps() { diff -r 9eac00ea588f -r dceba191c00d lemon/cbc.cc --- a/lemon/cbc.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/cbc.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/cbc.h --- a/lemon/cbc.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/cbc.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/christofides_tsp.h --- a/lemon/christofides_tsp.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/christofides_tsp.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -30,7 +30,7 @@ #include namespace lemon { - + /// \ingroup tsp /// /// \brief Christofides algorithm for symmetric TSP. @@ -108,11 +108,11 @@ _path.push_back(_gr(1)); return _sum = 2 * _cost[_gr.edge(_gr(0), _gr(1))]; } - + // Compute min. cost spanning tree std::vector tree; kruskal(_gr, _cost, std::back_inserter(tree)); - + FullGraph::NodeMap deg(_gr, 0); for (int i = 0; i != int(tree.size()); ++i) { Edge e = tree[i]; @@ -125,7 +125,7 @@ for (NodeIt u(_gr); u != INVALID; ++u) { if (deg[u] % 2 == 1) odd_nodes.push_back(u); } - + SmartGraph sgr; SmartGraph::EdgeMap scost(sgr); for (int i = 0; i != int(odd_nodes.size()); ++i) { @@ -139,20 +139,20 @@ scost[e] = -_cost[_gr.edge(odd_nodes[i], odd_nodes[j])]; } } - + // Compute min. cost perfect matching MaxWeightedPerfectMatching > mwpm(sgr, scost); mwpm.run(); - + for (SmartGraph::EdgeIt e(sgr); e != INVALID; ++e) { if (mwpm.matching(e)) { tree.push_back( _gr.edge(odd_nodes[sgr.id(sgr.u(e))], odd_nodes[sgr.id(sgr.v(e))]) ); } } - - // Join the spanning tree and the matching + + // Join the spanning tree and the matching sgr.clear(); for (int i = 0; i != _gr.nodeNum(); ++i) { sgr.addNode(); @@ -182,10 +182,10 @@ } /// @} - + /// \name Query Functions /// @{ - + /// \brief The total cost of the found tour. /// /// This function returns the total cost of the found tour. @@ -194,7 +194,7 @@ Cost tourCost() const { return _sum; } - + /// \brief Returns a const reference to the node sequence of the /// found tour. /// @@ -227,7 +227,7 @@ void tourNodes(Iterator out) const { std::copy(_path.begin(), _path.end(), out); } - + /// \brief Gives back the found tour as a path. /// /// This function copies the found tour as a list of arcs/edges into @@ -244,9 +244,9 @@ path.addBack(_gr.arc(_path.back(), _path.front())); } } - + /// @} - + }; }; // namespace lemon diff -r 9eac00ea588f -r dceba191c00d lemon/circulation.h --- a/lemon/circulation.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/circulation.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/clp.cc --- a/lemon/clp.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/clp.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/clp.h --- a/lemon/clp.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/clp.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/concept_check.h --- a/lemon/concept_check.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/concept_check.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/concepts/bpgraph.h --- a/lemon/concepts/bpgraph.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/concepts/bpgraph.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -804,12 +804,12 @@ BlueNode asBlueNode(const Node&) const { return BlueNode(); } /// \brief Gives back the red end node of the edge. - /// + /// /// Gives back the red end node of the edge. RedNode redNode(const Edge&) const { return RedNode(); } /// \brief Gives back the blue end node of the edge. - /// + /// /// Gives back the blue end node of the edge. BlueNode blueNode(const Edge&) const { return BlueNode(); } diff -r 9eac00ea588f -r dceba191c00d lemon/concepts/digraph.h --- a/lemon/concepts/digraph.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/concepts/digraph.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/concepts/graph.h --- a/lemon/concepts/graph.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/concepts/graph.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/concepts/graph_components.h --- a/lemon/concepts/graph_components.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/concepts/graph_components.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -391,12 +391,12 @@ bool blue(const Node&) const { return true; } /// \brief Gives back the red end node of the edge. - /// + /// /// Gives back the red end node of the edge. RedNode redNode(const Edge&) const { return RedNode(); } /// \brief Gives back the blue end node of the edge. - /// + /// /// Gives back the blue end node of the edge. BlueNode blueNode(const Edge&) const { return BlueNode(); } @@ -1150,7 +1150,7 @@ typedef typename Base::BlueNode BlueNode; typedef typename Base::Arc Arc; typedef typename Base::Edge Edge; - + typedef IterableBpGraphComponent BpGraph; using IterableGraphComponent::first; @@ -1210,7 +1210,7 @@ typename _BpGraph::RedNode rn(INVALID); bpgraph.first(rn); - bpgraph.next(rn); + bpgraph.next(rn); typename _BpGraph::BlueNode bn(INVALID); bpgraph.first(bn); bpgraph.next(bn); diff -r 9eac00ea588f -r dceba191c00d lemon/concepts/heap.h --- a/lemon/concepts/heap.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/concepts/heap.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/concepts/maps.h --- a/lemon/concepts/maps.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/concepts/maps.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/concepts/path.h --- a/lemon/concepts/path.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/concepts/path.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/connectivity.h --- a/lemon/connectivity.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/connectivity.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/core.h --- a/lemon/core.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/core.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -254,7 +254,7 @@ } namespace _graph_utils_bits { - + template struct CountRedNodesSelector { static int count(const Graph &g) { @@ -264,13 +264,13 @@ template struct CountRedNodesSelector< - Graph, typename - enable_if::type> + Graph, typename + enable_if::type> { static int count(const Graph &g) { return g.redNum(); } - }; + }; } /// \brief Function to count the red nodes in the graph. @@ -279,7 +279,7 @@ /// The complexity of the function is O(n) but for some /// graph structures it is specialized to run in O(1). /// - /// If the graph contains a \e redNum() member function and a + /// If the graph contains a \e redNum() member function and a /// \e NodeNumTag tag then this function calls directly the member /// function to query the cardinality of the node set. template @@ -288,7 +288,7 @@ } namespace _graph_utils_bits { - + template struct CountBlueNodesSelector { static int count(const Graph &g) { @@ -298,13 +298,13 @@ template struct CountBlueNodesSelector< - Graph, typename - enable_if::type> + Graph, typename + enable_if::type> { static int count(const Graph &g) { return g.blueNum(); } - }; + }; } /// \brief Function to count the blue nodes in the graph. @@ -313,7 +313,7 @@ /// The complexity of the function is O(n) but for some /// graph structures it is specialized to run in O(1). /// - /// If the graph contains a \e blueNum() member function and a + /// If the graph contains a \e blueNum() member function and a /// \e NodeNumTag tag then this function calls directly the member /// function to query the cardinality of the node set. template @@ -1865,7 +1865,7 @@ /// The Digraph type typedef GR Digraph; - + protected: class AutoNodeMap : public ItemSetTraits::template Map::Type diff -r 9eac00ea588f -r dceba191c00d lemon/cost_scaling.h --- a/lemon/cost_scaling.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/cost_scaling.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -904,7 +904,7 @@ return OPTIMAL; } - + // Check if the upper bound is greater or equal to the lower bound // on each arc. bool checkBoundMaps() { diff -r 9eac00ea588f -r dceba191c00d lemon/cplex.cc --- a/lemon/cplex.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/cplex.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/cplex.h --- a/lemon/cplex.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/cplex.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/cycle_canceling.h --- a/lemon/cycle_canceling.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/cycle_canceling.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -783,7 +783,7 @@ return OPTIMAL; } - + // Check if the upper bound is greater or equal to the lower bound // on each arc. bool checkBoundMaps() { @@ -960,7 +960,7 @@ hw_mmc.cycle(cycle); buildResidualNetwork(); while (true) { - + typename HwMmc::TerminationCause hw_tc = hw_mmc.findCycleMean(hw_iter_limit); if (hw_tc == HwMmc::ITERATION_LIMIT) { @@ -976,7 +976,7 @@ if (!(hw_tc == HwMmc::OPTIMAL && hw_mmc.cycleCost() < 0)) break; hw_mmc.findCycle(); } - + // Compute delta value Value delta = INF; for (SPathArcIt a(cycle); a != INVALID; ++a) { diff -r 9eac00ea588f -r dceba191c00d lemon/dfs.h --- a/lemon/dfs.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/dfs.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/dijkstra.h --- a/lemon/dijkstra.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/dijkstra.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/dimacs.h --- a/lemon/dimacs.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/dimacs.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/edge_set.h --- a/lemon/edge_set.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/edge_set.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/edmonds_karp.h --- a/lemon/edmonds_karp.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/edmonds_karp.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -36,7 +36,7 @@ template struct EdmondsKarpDefaultTraits { - /// \brief The digraph type the algorithm runs on. + /// \brief The digraph type the algorithm runs on. typedef GR Digraph; /// \brief The type of the map that stores the arc capacities. @@ -60,7 +60,7 @@ /// \brief Instantiates a FlowMap. /// - /// This function instantiates a \ref FlowMap. + /// This function instantiates a \ref FlowMap. /// \param digraph The digraph for which we would like to define /// the flow map. static FlowMap* createFlowMap(const Digraph& digraph) { @@ -95,7 +95,7 @@ /// /// \tparam GR The type of the digraph the algorithm runs on. /// \tparam CAP The type of the capacity map. The default map - /// type is \ref concepts::Digraph::ArcMap "GR::ArcMap". + /// type is \ref concepts::Digraph::ArcMap "GR::ArcMap". /// \tparam TR The traits class that defines various types used by the /// algorithm. By default, it is \ref EdmondsKarpDefaultTraits /// "EdmondsKarpDefaultTraits". @@ -104,9 +104,9 @@ #ifdef DOXYGEN template -#else +#else template , + typename CAP = typename GR::template ArcMap, typename TR = EdmondsKarpDefaultTraits > #endif class EdmondsKarp { @@ -120,7 +120,7 @@ /// The type of the capacity map. typedef typename Traits::CapacityMap CapacityMap; /// The type of the flow values. - typedef typename Traits::Value Value; + typedef typename Traits::Value Value; /// The type of the flow map. typedef typename Traits::FlowMap FlowMap; @@ -131,7 +131,7 @@ TEMPLATE_DIGRAPH_TYPEDEFS(Digraph); typedef typename Digraph::template NodeMap PredMap; - + const Digraph& _graph; const CapacityMap* _capacity; @@ -142,30 +142,30 @@ PredMap* _pred; std::vector _queue; - + Tolerance _tolerance; Value _flow_value; void createStructures() { if (!_flow) { - _flow = Traits::createFlowMap(_graph); - _local_flow = true; + _flow = Traits::createFlowMap(_graph); + _local_flow = true; } if (!_pred) { - _pred = new PredMap(_graph); + _pred = new PredMap(_graph); } _queue.resize(countNodes(_graph)); } void destroyStructures() { if (_local_flow) { - delete _flow; + delete _flow; } if (_pred) { - delete _pred; + delete _pred; } } - + public: typedef EdmondsKarp Create; @@ -178,7 +178,7 @@ struct SetFlowMapTraits : public Traits { typedef T FlowMap; static FlowMap *createFlowMap(const Digraph&) { - LEMON_ASSERT(false, "FlowMap is not initialized"); + LEMON_ASSERT(false, "FlowMap is not initialized"); return 0; } }; @@ -189,7 +189,7 @@ /// \ref named-templ-param "Named parameter" for setting FlowMap /// type template - struct SetFlowMap + struct SetFlowMap : public EdmondsKarp > { typedef EdmondsKarp > Create; }; @@ -197,22 +197,22 @@ /// @} protected: - + EdmondsKarp() {} public: /// \brief The constructor of the class. /// - /// The constructor of the class. - /// \param digraph The digraph the algorithm runs on. - /// \param capacity The capacity of the arcs. + /// The constructor of the class. + /// \param digraph The digraph the algorithm runs on. + /// \param capacity The capacity of the arcs. /// \param source The source node. /// \param target The target node. EdmondsKarp(const Digraph& digraph, const CapacityMap& capacity, - Node source, Node target) + Node source, Node target) : _graph(digraph), _capacity(&capacity), _source(source), _target(target), - _flow(0), _local_flow(false), _pred(0), _tolerance(), _flow_value() + _flow(0), _local_flow(false), _pred(0), _tolerance(), _flow_value() { LEMON_ASSERT(_source != _target, "Flow source and target are the same nodes."); @@ -244,8 +244,8 @@ /// \return (*this) EdmondsKarp& flowMap(FlowMap& map) { if (_local_flow) { - delete _flow; - _local_flow = false; + delete _flow; + _local_flow = false; } _flow = ↦ return *this; @@ -276,7 +276,7 @@ EdmondsKarp& tolerance(const Tolerance& tolerance) { _tolerance = tolerance; return *this; - } + } /// \brief Returns a const reference to the tolerance. /// @@ -284,14 +284,14 @@ /// the algorithm. const Tolerance& tolerance() const { return _tolerance; - } + } /// \name Execution control /// The simplest way to execute the algorithm is to use \ref run().\n /// If you need better control on the initial solution or the execution, /// you have to call one of the \ref init() functions first, then /// \ref start() or multiple times the \ref augment() function. - + ///@{ /// \brief Initializes the algorithm. @@ -305,7 +305,7 @@ } _flow_value = 0; } - + /// \brief Initializes the algorithm using the given flow map. /// /// Initializes the internal data structures and sets the initial @@ -317,7 +317,7 @@ void init(const FlowMap& flowMap) { createStructures(); for (ArcIt e(_graph); e != INVALID; ++e) { - _flow->set(e, flowMap[e]); + _flow->set(e, flowMap[e]); } _flow_value = 0; for (OutArcIt jt(_graph, _source); jt != INVALID; ++jt) { @@ -334,14 +334,14 @@ /// flow to the given \c flowMap. The \c flowMap should /// contain a feasible flow, i.e. at each node excluding the source /// and the target, the incoming flow should be equal to the - /// outgoing flow. + /// outgoing flow. /// \return \c false when the given \c flowMap does not contain a /// feasible flow. template bool checkedInit(const FlowMap& flowMap) { createStructures(); for (ArcIt e(_graph); e != INVALID; ++e) { - _flow->set(e, flowMap[e]); + _flow->set(e, flowMap[e]); } for (NodeIt it(_graph); it != INVALID; ++it) { if (it == _source || it == _target) continue; @@ -372,7 +372,7 @@ } /// \brief Augments the solution along a shortest path. - /// + /// /// Augments the solution along a shortest path. This function searches a /// shortest path between the source and the target /// in the residual digraph by the Bfs algoritm. @@ -383,81 +383,81 @@ /// current flow is a feasible and optimal solution. bool augment() { for (NodeIt n(_graph); n != INVALID; ++n) { - _pred->set(n, INVALID); + _pred->set(n, INVALID); } - + int first = 0, last = 1; - + _queue[0] = _source; _pred->set(_source, OutArcIt(_graph, _source)); while (first != last && (*_pred)[_target] == INVALID) { - Node n = _queue[first++]; - - for (OutArcIt e(_graph, n); e != INVALID; ++e) { - Value rem = (*_capacity)[e] - (*_flow)[e]; - Node t = _graph.target(e); - if (_tolerance.positive(rem) && (*_pred)[t] == INVALID) { - _pred->set(t, e); - _queue[last++] = t; - } - } - for (InArcIt e(_graph, n); e != INVALID; ++e) { - Value rem = (*_flow)[e]; - Node t = _graph.source(e); - if (_tolerance.positive(rem) && (*_pred)[t] == INVALID) { - _pred->set(t, e); - _queue[last++] = t; - } - } + Node n = _queue[first++]; + + for (OutArcIt e(_graph, n); e != INVALID; ++e) { + Value rem = (*_capacity)[e] - (*_flow)[e]; + Node t = _graph.target(e); + if (_tolerance.positive(rem) && (*_pred)[t] == INVALID) { + _pred->set(t, e); + _queue[last++] = t; + } + } + for (InArcIt e(_graph, n); e != INVALID; ++e) { + Value rem = (*_flow)[e]; + Node t = _graph.source(e); + if (_tolerance.positive(rem) && (*_pred)[t] == INVALID) { + _pred->set(t, e); + _queue[last++] = t; + } + } } if ((*_pred)[_target] != INVALID) { - Node n = _target; - Arc e = (*_pred)[n]; + Node n = _target; + Arc e = (*_pred)[n]; - Value prem = (*_capacity)[e] - (*_flow)[e]; - n = _graph.source(e); - while (n != _source) { - e = (*_pred)[n]; - if (_graph.target(e) == n) { - Value rem = (*_capacity)[e] - (*_flow)[e]; - if (rem < prem) prem = rem; - n = _graph.source(e); - } else { - Value rem = (*_flow)[e]; - if (rem < prem) prem = rem; - n = _graph.target(e); - } - } + Value prem = (*_capacity)[e] - (*_flow)[e]; + n = _graph.source(e); + while (n != _source) { + e = (*_pred)[n]; + if (_graph.target(e) == n) { + Value rem = (*_capacity)[e] - (*_flow)[e]; + if (rem < prem) prem = rem; + n = _graph.source(e); + } else { + Value rem = (*_flow)[e]; + if (rem < prem) prem = rem; + n = _graph.target(e); + } + } - n = _target; - e = (*_pred)[n]; + n = _target; + e = (*_pred)[n]; - _flow->set(e, (*_flow)[e] + prem); - n = _graph.source(e); - while (n != _source) { - e = (*_pred)[n]; - if (_graph.target(e) == n) { - _flow->set(e, (*_flow)[e] + prem); - n = _graph.source(e); - } else { - _flow->set(e, (*_flow)[e] - prem); - n = _graph.target(e); - } - } + _flow->set(e, (*_flow)[e] + prem); + n = _graph.source(e); + while (n != _source) { + e = (*_pred)[n]; + if (_graph.target(e) == n) { + _flow->set(e, (*_flow)[e] + prem); + n = _graph.source(e); + } else { + _flow->set(e, (*_flow)[e] - prem); + n = _graph.target(e); + } + } - _flow_value += prem; - return true; + _flow_value += prem; + return true; } else { - return false; + return false; } } /// \brief Executes the algorithm /// /// Executes the algorithm by performing augmenting phases until the - /// optimal solution is reached. + /// optimal solution is reached. /// \pre One of the \ref init() functions must be called before /// using this function. void start() { @@ -465,10 +465,10 @@ } /// \brief Runs the algorithm. - /// + /// /// Runs the Edmonds-Karp algorithm. /// \note ek.run() is just a shortcut of the following code. - ///\code + ///\code /// ek.init(); /// ek.start(); ///\endcode @@ -483,7 +483,7 @@ /// The result of the Edmonds-Karp algorithm can be obtained using these /// functions.\n /// Either \ref run() or \ref start() should be called before using them. - + ///@{ /// \brief Returns the value of the maximum flow. @@ -542,10 +542,10 @@ template void minCutMap(CutMap& cutMap) const { for (NodeIt n(_graph); n != INVALID; ++n) { - cutMap.set(n, (*_pred)[n] != INVALID); + cutMap.set(n, (*_pred)[n] != INVALID); } cutMap.set(_source, true); - } + } /// @} diff -r 9eac00ea588f -r dceba191c00d lemon/euler.h --- a/lemon/euler.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/euler.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/fractional_matching.h --- a/lemon/fractional_matching.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/fractional_matching.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/full_graph.h --- a/lemon/full_graph.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/full_graph.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -874,7 +874,7 @@ int id(const BlueNode& v) const { return v._id - _red_num; } static int id(Arc e) { return e._id; } static int id(Edge e) { return e._id; } - + static Node nodeFromId(int id) { return Node(id);} static Arc arcFromId(int id) { return Arc(id);} static Edge edgeFromId(int id) { return Edge(id);} @@ -904,13 +904,13 @@ int index(BlueNode n) const { return n._id - _red_num; } - + void clear() { _red_num = 0; _blue_num = 0; _node_num = 0; _edge_num = 0; } - Edge edge(const Node& u, const Node& v) const { + Edge edge(const Node& u, const Node& v) const { if (u._id < _red_num) { if (v._id < _red_num) { return Edge(-1); @@ -926,7 +926,7 @@ } } - Arc arc(const Node& u, const Node& v) const { + Arc arc(const Node& u, const Node& v) const { if (u._id < _red_num) { if (v._id < _red_num) { return Arc(-1); diff -r 9eac00ea588f -r dceba191c00d lemon/glpk.cc --- a/lemon/glpk.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/glpk.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/glpk.h --- a/lemon/glpk.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/glpk.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -148,7 +148,7 @@ #ifdef DOXYGEN /// Write the problem or the solution to a file in the given format - + /// This function writes the problem or the solution /// to a file in the given format. /// Trying to write in an unsupported format will trigger diff -r 9eac00ea588f -r dceba191c00d lemon/gomory_hu.h --- a/lemon/gomory_hu.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/gomory_hu.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/graph_to_eps.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/greedy_tsp.h --- a/lemon/greedy_tsp.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/greedy_tsp.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -67,9 +67,9 @@ const CostMap &_cost; Cost _sum; std::vector _path; - + private: - + // Functor class to compare edges by their costs class EdgeComp { private: diff -r 9eac00ea588f -r dceba191c00d lemon/grosso_locatelli_pullan_mc.h --- a/lemon/grosso_locatelli_pullan_mc.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/grosso_locatelli_pullan_mc.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -120,11 +120,11 @@ // Internal matrix representation of the graph BoolMatrix _gr; int _n; - + // Search options bool _delta_based_restart; int _restart_delta_limit; - + // Search limits int _iteration_limit; int _step_limit; @@ -442,12 +442,12 @@ /// \name Execution Control /// The \ref run() function can be used to execute the algorithm.\n - /// The functions \ref iterationLimit(int), \ref stepLimit(int), and + /// The functions \ref iterationLimit(int), \ref stepLimit(int), and /// \ref sizeLimit(int) can be used to specify various limits for the /// search process. - + /// @{ - + /// \brief Sets the maximum number of iterations. /// /// This function sets the maximum number of iterations. @@ -459,7 +459,7 @@ /// algorithm. For larger values, the algorithm runs slower, but it more /// likely finds larger cliques. For smaller values, the algorithm is /// faster but probably gives worse results. - /// + /// /// The default value is \c 1000. /// \c -1 means that number of iterations is not limited. /// @@ -474,7 +474,7 @@ _iteration_limit = limit; return *this; } - + /// \brief Sets the maximum number of search steps. /// /// This function sets the maximum number of elementary search steps. @@ -486,7 +486,7 @@ /// algorithm. For larger values, the algorithm runs slower, but it more /// likely finds larger cliques. For smaller values, the algorithm is /// faster but probably gives worse results. - /// + /// /// The default value is \c -1, which means that number of steps /// is not limited explicitly. However, the number of iterations is /// limited and each iteration performs a finite number of search steps. @@ -502,17 +502,17 @@ _step_limit = limit; return *this; } - + /// \brief Sets the desired clique size. /// /// This function sets the desired clique size that serves as a search /// limit. If a clique of this size (or a larger one) is found, then the /// algorithm terminates. - /// + /// /// This function is especially useful if you know an exact upper bound - /// for the size of the cliques in the graph or if any clique above + /// for the size of the cliques in the graph or if any clique above /// a certain size limit is sufficient for your application. - /// + /// /// The default value is \c -1, which means that the size limit is set to /// the number of nodes in the graph. /// @@ -524,7 +524,7 @@ _size_limit = limit; return *this; } - + /// \brief The maximum number of iterations. /// /// This function gives back the maximum number of iterations. @@ -534,7 +534,7 @@ int iterationLimit() const { return _iteration_limit; } - + /// \brief The maximum number of search steps. /// /// This function gives back the maximum number of search steps. @@ -544,7 +544,7 @@ int stepLimit() const { return _step_limit; } - + /// \brief The desired clique size. /// /// This function gives back the desired clique size that serves as a @@ -583,7 +583,7 @@ /// \name Query Functions /// The results of the algorithm can be obtained using these functions.\n - /// The run() function must be called before using them. + /// The run() function must be called before using them. /// @{ @@ -676,13 +676,13 @@ /// @} private: - + // Initialize search options and limits void initOptions() { // Search options _delta_based_restart = true; _restart_delta_limit = 4; - + // Search limits _iteration_limit = 1000; _step_limit = -1; // this is disabled by default diff -r 9eac00ea588f -r dceba191c00d lemon/hao_orlin.h --- a/lemon/hao_orlin.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/hao_orlin.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/hartmann_orlin_mmc.h --- a/lemon/hartmann_orlin_mmc.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/hartmann_orlin_mmc.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/howard_mmc.h --- a/lemon/howard_mmc.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/howard_mmc.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -155,10 +155,10 @@ /// termination. The \ref findCycleMean() function returns one of /// these values. enum TerminationCause { - + /// No directed cycle can be found in the digraph. NO_CYCLE = 0, - + /// Optimal solution (minimum cycle mean) is found. OPTIMAL = 1, @@ -356,11 +356,11 @@ /// minimal. /// /// \param limit The maximum allowed number of iterations during - /// the search process. Its default value implies that the algorithm + /// the search process. Its default value implies that the algorithm /// runs until it finds the exact optimal solution. /// /// \return The termination cause of the search process. - /// For more information, see \ref TerminationCause. + /// For more information, see \ref TerminationCause. TerminationCause findCycleMean(int limit = std::numeric_limits::max()) { // Initialize and find strongly connected components init(); @@ -389,7 +389,7 @@ _best_size = _curr_size; _best_node = _curr_node; } - + if (iter_limit_reached) break; } diff -r 9eac00ea588f -r dceba191c00d lemon/insertion_tsp.h --- a/lemon/insertion_tsp.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/insertion_tsp.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -360,7 +360,7 @@ for (unsigned int i=0; i<_notused.size(); ++i) { Node u = _notused[i]; Cost min_cost = costDiff(_tour.back(), _tour.front(), u); - int min_pos = 0; + int min_pos = 0; for (unsigned int j=1; j<_tour.size(); ++j) { Cost curr_cost = costDiff(_tour[j-1], _tour[j], u); if (curr_cost < min_cost) { @@ -390,7 +390,7 @@ Node sn = _notused[min_node]; _notused[min_node] = _notused.back(); _notused.pop_back(); - + // Insert the selected node into the tour const int ipos = _ins_pos[sn]; _tour.insert(_tour.begin() + ipos, sn); @@ -405,7 +405,7 @@ int ipos_next = ipos == int(_tour.size())-1 ? 0 : ipos+1; Cost nc1 = costDiff(_tour[ipos_prev], _tour[ipos], u); Cost nc2 = costDiff(_tour[ipos], _tour[ipos_next], u); - + if (nc1 <= curr_cost || nc2 <= curr_cost) { // A new position is better than the old one if (nc1 <= nc2) { @@ -420,7 +420,7 @@ if (curr_pos == ipos) { // The minimum should be found again curr_cost = costDiff(_tour.back(), _tour.front(), u); - curr_pos = 0; + curr_pos = 0; for (unsigned int j=1; j<_tour.size(); ++j) { Cost tmp_cost = costDiff(_tour[j-1], _tour[j], u); if (tmp_cost < curr_cost) { @@ -433,7 +433,7 @@ ++curr_pos; } } - + _ins_cost[u] = curr_cost; _ins_pos[u] = curr_pos; } diff -r 9eac00ea588f -r dceba191c00d lemon/karp_mmc.h --- a/lemon/karp_mmc.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/karp_mmc.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/kruskal.h --- a/lemon/kruskal.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/kruskal.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/lgf_reader.h --- a/lemon/lgf_reader.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/lgf_reader.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2011 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -2638,7 +2638,7 @@ for (RedNodeIt n(_graph); n != INVALID; ++n) { _red_node_index.insert(std::make_pair(converter(map[n]), n)); } - for (BlueNodeIt n(_graph); n != INVALID; ++n) { + for (BlueNodeIt n(_graph); n != INVALID; ++n) { _blue_node_index.insert(std::make_pair(converter(map[n]), n)); } return *this; diff -r 9eac00ea588f -r dceba191c00d lemon/lgf_writer.h --- a/lemon/lgf_writer.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/lgf_writer.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -185,7 +185,7 @@ public: ValueStorage(const Value& value, const Converter& converter = Converter()) : _value(value), _converter(converter) {} - + virtual std::string get() { return _converter(_value); } diff -r 9eac00ea588f -r dceba191c00d lemon/list_graph.h --- a/lemon/list_graph.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/list_graph.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -1765,7 +1765,7 @@ void next(BlueNode& node) const { node.id = nodes[node.id].partition_next; - } + } void first(Arc& e) const { int n = first_node; diff -r 9eac00ea588f -r dceba191c00d lemon/lp.h --- a/lemon/lp.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/lp.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/lp_base.cc --- a/lemon/lp_base.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/lp_base.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/lp_base.h --- a/lemon/lp_base.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/lp_base.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -1028,13 +1028,13 @@ else return "lemon::UnsupportedFormatError"; } }; - + protected: virtual void _write(std::string, std::string format) const { throw UnsupportedFormatError(format); } - + public: /// Virtual destructor diff -r 9eac00ea588f -r dceba191c00d lemon/lp_skeleton.cc --- a/lemon/lp_skeleton.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/lp_skeleton.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/lp_skeleton.h --- a/lemon/lp_skeleton.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/lp_skeleton.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/maps.h --- a/lemon/maps.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/maps.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/matching.h --- a/lemon/matching.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/matching.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/math.h --- a/lemon/math.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/math.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/max_cardinality_search.h --- a/lemon/max_cardinality_search.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/max_cardinality_search.h Fri Aug 09 11:28:17 2013 +0200 @@ -1,8 +1,8 @@ -/* -*- C++ -*- +/* -*- mode: C++; indent-tabs-mode: nil; -*- * - * This file is a part of LEMON, a generic C++ optimization library + * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -21,7 +21,7 @@ /// \ingroup search -/// \file +/// \file /// \brief Maximum cardinality search in undirected digraphs. #include @@ -41,7 +41,7 @@ /// \param CapacityMap Type of capacity map. template struct MaxCardinalitySearchDefaultTraits { - /// The digraph type the algorithm runs on. + /// The digraph type the algorithm runs on. typedef GR Digraph; template @@ -50,7 +50,7 @@ typedef CM CapacityMap; static CapacityMap *createCapacityMap(const Digraph& g) { - return new CapacityMap(g); + return new CapacityMap(g); } }; @@ -60,7 +60,7 @@ typedef ConstMap > CapacityMap; static CapacityMap *createCapacityMap(const Digraph&) { - return new CapacityMap; + return new CapacityMap; } }; @@ -90,17 +90,17 @@ /// \brief Instantiates a HeapCrossRef. /// - /// This function instantiates a \ref HeapCrossRef. - /// \param digraph is the digraph, to which we would like to define the + /// This function instantiates a \ref HeapCrossRef. + /// \param digraph is the digraph, to which we would like to define the /// HeapCrossRef. static HeapCrossRef *createHeapCrossRef(const Digraph &digraph) { return new HeapCrossRef(digraph); } - + template struct HeapSelector { template - struct Selector { + struct Selector { typedef BinHeap > Heap; }; }; @@ -128,7 +128,7 @@ /// \brief Instantiates a Heap. /// - /// This function instantiates a \ref Heap. + /// This function instantiates a \ref Heap. /// \param crossref The cross reference of the heap. static Heap *createHeap(HeapCrossRef& crossref) { return new Heap(crossref); @@ -143,7 +143,7 @@ /// \brief Instantiates a ProcessedMap. /// - /// This function instantiates a \ref ProcessedMap. + /// This function instantiates a \ref ProcessedMap. /// \param digraph is the digraph, to which /// we would like to define the \ref ProcessedMap #ifdef DOXYGEN @@ -156,15 +156,15 @@ } /// \brief The type of the map that stores the cardinalities of the nodes. - /// + /// /// The type of the map that stores the cardinalities of the nodes. /// It must meet the \ref concepts::WriteMap "WriteMap" concept. typedef typename Digraph::template NodeMap CardinalityMap; /// \brief Instantiates a CardinalityMap. /// - /// This function instantiates a \ref CardinalityMap. - /// \param digraph is the digraph, to which we would like to define the \ref + /// This function instantiates a \ref CardinalityMap. + /// \param digraph is the digraph, to which we would like to define the \ref /// CardinalityMap static CardinalityMap *createCardinalityMap(const Digraph &digraph) { return new CardinalityMap(digraph); @@ -172,13 +172,13 @@ }; - + /// \ingroup search /// /// \brief Maximum Cardinality Search algorithm class. /// - /// This class provides an efficient implementation of Maximum Cardinality - /// Search algorithm. The maximum cardinality search first chooses any + /// This class provides an efficient implementation of Maximum Cardinality + /// Search algorithm. The maximum cardinality search first chooses any /// node of the digraph. Then every time it chooses one unprocessed node /// with maximum cardinality, i.e the sum of capacities on out arcs to the nodes /// which were previusly processed. @@ -186,38 +186,38 @@ /// again any unprocessed node of the digraph. /// The arc capacities are passed to the algorithm using a - /// \ref concepts::ReadMap "ReadMap", so it is easy to change it to any + /// \ref concepts::ReadMap "ReadMap", so it is easy to change it to any /// kind of capacity. /// - /// The type of the capacity is determined by the \ref + /// The type of the capacity is determined by the \ref /// concepts::ReadMap::Value "Value" of the capacity map. /// /// It is also possible to change the underlying priority heap. /// /// /// \param GR The digraph type the algorithm runs on. The value of - /// Digraph is not used directly by the search algorithm, it + /// Digraph is not used directly by the search algorithm, it /// is only passed to \ref MaxCardinalitySearchDefaultTraits. - /// \param CAP This read-only ArcMap determines the capacities of + /// \param CAP This read-only ArcMap determines the capacities of /// the arcs. It is read once for each arc, so the map may involve in /// relatively time consuming process to compute the arc capacity if /// it is necessary. The default map type is \ref /// ConstMap "ConstMap >". The value - /// of CapacityMap is not used directly by search algorithm, it is only - /// passed to \ref MaxCardinalitySearchDefaultTraits. - /// \param TR Traits class to set various data types used by the - /// algorithm. The default traits class is - /// \ref MaxCardinalitySearchDefaultTraits - /// "MaxCardinalitySearchDefaultTraits". - /// See \ref MaxCardinalitySearchDefaultTraits + /// of CapacityMap is not used directly by search algorithm, it is only + /// passed to \ref MaxCardinalitySearchDefaultTraits. + /// \param TR Traits class to set various data types used by the + /// algorithm. The default traits class is + /// \ref MaxCardinalitySearchDefaultTraits + /// "MaxCardinalitySearchDefaultTraits". + /// See \ref MaxCardinalitySearchDefaultTraits /// for the documentation of a MaxCardinalitySearch traits class. #ifdef DOXYGEN template #else - template >, - typename TR = + template >, + typename TR = MaxCardinalitySearchDefaultTraits > #endif class MaxCardinalitySearch { @@ -226,7 +226,7 @@ typedef TR Traits; ///The type of the underlying digraph. typedef typename Traits::Digraph Digraph; - + ///The type of the capacity of the arcs. typedef typename Traits::CapacityMap::Value Value; ///The type of the map that stores the arc capacities. @@ -266,7 +266,7 @@ public : typedef MaxCardinalitySearch Create; - + ///\name Named template parameters ///@{ @@ -275,89 +275,89 @@ struct DefCapacityMapTraits : public Traits { typedef T CapacityMap; static CapacityMap *createCapacityMap(const Digraph &) { - LEMON_ASSERT(false,"Uninitialized parameter."); - return 0; + LEMON_ASSERT(false,"Uninitialized parameter."); + return 0; } }; - /// \brief \ref named-templ-param "Named parameter" for setting + /// \brief \ref named-templ-param "Named parameter" for setting /// CapacityMap type /// /// \ref named-templ-param "Named parameter" for setting CapacityMap type /// for the algorithm. template - struct SetCapacityMap - : public MaxCardinalitySearch > { - typedef MaxCardinalitySearch > { + typedef MaxCardinalitySearch > Create; }; template struct DefCardinalityMapTraits : public Traits { typedef T CardinalityMap; - static CardinalityMap *createCardinalityMap(const Digraph &) + static CardinalityMap *createCardinalityMap(const Digraph &) { - LEMON_ASSERT(false,"Uninitialized parameter."); - return 0; + LEMON_ASSERT(false,"Uninitialized parameter."); + return 0; } }; - /// \brief \ref named-templ-param "Named parameter" for setting + /// \brief \ref named-templ-param "Named parameter" for setting /// CardinalityMap type /// - /// \ref named-templ-param "Named parameter" for setting CardinalityMap + /// \ref named-templ-param "Named parameter" for setting CardinalityMap /// type for the algorithm. template - struct SetCardinalityMap - : public MaxCardinalitySearch > { - typedef MaxCardinalitySearch > { + typedef MaxCardinalitySearch > Create; }; - + template struct DefProcessedMapTraits : public Traits { typedef T ProcessedMap; static ProcessedMap *createProcessedMap(const Digraph &) { - LEMON_ASSERT(false,"Uninitialized parameter."); - return 0; + LEMON_ASSERT(false,"Uninitialized parameter."); + return 0; } }; - /// \brief \ref named-templ-param "Named parameter" for setting + /// \brief \ref named-templ-param "Named parameter" for setting /// ProcessedMap type /// /// \ref named-templ-param "Named parameter" for setting ProcessedMap type /// for the algorithm. template - struct SetProcessedMap - : public MaxCardinalitySearch > { - typedef MaxCardinalitySearch > { + typedef MaxCardinalitySearch > Create; }; - + template struct DefHeapTraits : public Traits { typedef CR HeapCrossRef; typedef H Heap; static HeapCrossRef *createHeapCrossRef(const Digraph &) { - LEMON_ASSERT(false,"Uninitialized parameter."); - return 0; + LEMON_ASSERT(false,"Uninitialized parameter."); + return 0; } static Heap *createHeap(HeapCrossRef &) { - LEMON_ASSERT(false,"Uninitialized parameter."); - return 0; + LEMON_ASSERT(false,"Uninitialized parameter."); + return 0; } }; - /// \brief \ref named-templ-param "Named parameter" for setting heap + /// \brief \ref named-templ-param "Named parameter" for setting heap /// and cross reference type /// - /// \ref named-templ-param "Named parameter" for setting heap and cross + /// \ref named-templ-param "Named parameter" for setting heap and cross /// reference type for the algorithm. template > struct SetHeap - : public MaxCardinalitySearch > { - typedef MaxCardinalitySearch< Digraph, CapacityMap, + : public MaxCardinalitySearch > { + typedef MaxCardinalitySearch< Digraph, CapacityMap, DefHeapTraits > Create; }; @@ -366,29 +366,29 @@ typedef CR HeapCrossRef; typedef H Heap; static HeapCrossRef *createHeapCrossRef(const Digraph &digraph) { - return new HeapCrossRef(digraph); + return new HeapCrossRef(digraph); } static Heap *createHeap(HeapCrossRef &crossref) { - return new Heap(crossref); + return new Heap(crossref); } }; - /// \brief \ref named-templ-param "Named parameter" for setting heap and + /// \brief \ref named-templ-param "Named parameter" for setting heap and /// cross reference type with automatic allocation /// - /// \ref named-templ-param "Named parameter" for setting heap and cross - /// reference type. It can allocate the heap and the cross reference - /// object if the cross reference's constructor waits for the digraph as + /// \ref named-templ-param "Named parameter" for setting heap and cross + /// reference type. It can allocate the heap and the cross reference + /// object if the cross reference's constructor waits for the digraph as /// parameter and the heap's constructor waits for the cross reference. template > struct SetStandardHeap - : public MaxCardinalitySearch > { - typedef MaxCardinalitySearch > + : public MaxCardinalitySearch > { + typedef MaxCardinalitySearch > Create; }; - + ///@} @@ -396,14 +396,14 @@ MaxCardinalitySearch() {} - public: - + public: + /// \brief Constructor. /// ///\param digraph the digraph the algorithm will run on. ///\param capacity the capacity map used by the algorithm. MaxCardinalitySearch(const Digraph& digraph, - const CapacityMap& capacity) : + const CapacityMap& capacity) : _graph(&digraph), _capacity(&capacity), local_capacity(false), _cardinality(0), local_cardinality(false), @@ -441,8 +441,8 @@ /// \return (*this) MaxCardinalitySearch &capacityMap(const CapacityMap &m) { if (local_capacity) { - delete _capacity; - local_capacity=false; + delete _capacity; + local_capacity=false; } _capacity=&m; return *this; @@ -456,7 +456,7 @@ return *_capacity; } - /// \brief Sets the map storing the cardinalities calculated by the + /// \brief Sets the map storing the cardinalities calculated by the /// algorithm. /// /// Sets the map storing the cardinalities calculated by the algorithm. @@ -466,8 +466,8 @@ /// \return (*this) MaxCardinalitySearch &cardinalityMap(CardinalityMap &m) { if(local_cardinality) { - delete _cardinality; - local_cardinality=false; + delete _cardinality; + local_cardinality=false; } _cardinality = &m; return *this; @@ -480,11 +480,11 @@ /// it will allocate one. The destuctor deallocates this /// automatically allocated map, of course. /// \return (*this) - MaxCardinalitySearch &processedMap(ProcessedMap &m) + MaxCardinalitySearch &processedMap(ProcessedMap &m) { if(local_processed) { - delete _processed; - local_processed=false; + delete _processed; + local_processed=false; } _processed = &m; return *this; @@ -507,13 +507,13 @@ /// \return (*this) MaxCardinalitySearch &heap(Heap& hp, HeapCrossRef &cr) { if(local_heap_cross_ref) { - delete _heap_cross_ref; - local_heap_cross_ref = false; + delete _heap_cross_ref; + local_heap_cross_ref = false; } _heap_cross_ref = &cr; if(local_heap) { - delete _heap; - local_heap = false; + delete _heap; + local_heap = false; } _heap = &hp; return *this; @@ -544,27 +544,27 @@ void create_maps() { if(!_capacity) { - local_capacity = true; - _capacity = Traits::createCapacityMap(*_graph); + local_capacity = true; + _capacity = Traits::createCapacityMap(*_graph); } if(!_cardinality) { - local_cardinality = true; - _cardinality = Traits::createCardinalityMap(*_graph); + local_cardinality = true; + _cardinality = Traits::createCardinalityMap(*_graph); } if(!_processed) { - local_processed = true; - _processed = Traits::createProcessedMap(*_graph); + local_processed = true; + _processed = Traits::createProcessedMap(*_graph); } if (!_heap_cross_ref) { - local_heap_cross_ref = true; - _heap_cross_ref = Traits::createHeapCrossRef(*_graph); + local_heap_cross_ref = true; + _heap_cross_ref = Traits::createHeapCrossRef(*_graph); } if (!_heap) { - local_heap = true; - _heap = Traits::createHeap(*_heap_cross_ref); + local_heap = true; + _heap = Traits::createHeap(*_heap_cross_ref); } } - + void finalizeNodeData(Node node, Value capacity) { _processed->set(node, true); _cardinality->set(node, capacity); @@ -589,22 +589,22 @@ create_maps(); _heap->clear(); for (NodeIt it(*_graph) ; it != INVALID ; ++it) { - _processed->set(it, false); - _heap_cross_ref->set(it, Heap::PRE_HEAP); + _processed->set(it, false); + _heap_cross_ref->set(it, Heap::PRE_HEAP); } } - + /// \brief Adds a new source node. - /// + /// /// Adds a new source node to the priority heap. /// /// It checks if the node has not yet been added to the heap. void addSource(Node source, Value capacity = 0) { if(_heap->state(source) == Heap::PRE_HEAP) { - _heap->push(source, capacity); - } + _heap->push(source, capacity); + } } - + /// \brief Processes the next node in the priority heap /// /// Processes the next node in the priority heap. @@ -613,22 +613,22 @@ /// /// \warning The priority heap must not be empty! Node processNextNode() { - Node node = _heap->top(); + Node node = _heap->top(); finalizeNodeData(node, _heap->prio()); _heap->pop(); - + for (InArcIt it(*_graph, node); it != INVALID; ++it) { - Node source = _graph->source(it); - switch (_heap->state(source)) { - case Heap::PRE_HEAP: - _heap->push(source, (*_capacity)[it]); - break; - case Heap::IN_HEAP: - _heap->decrease(source, (*_heap)[source] + (*_capacity)[it]); - break; - case Heap::POST_HEAP: - break; - } + Node source = _graph->source(it); + switch (_heap->state(source)) { + case Heap::PRE_HEAP: + _heap->push(source, (*_capacity)[it]); + break; + case Heap::IN_HEAP: + _heap->decrease(source, (*_heap)[source] + (*_capacity)[it]); + break; + case Heap::POST_HEAP: + break; + } } return node; } @@ -637,24 +637,24 @@ /// /// Next node to be processed. /// - /// \return The next node to be processed or INVALID if the + /// \return The next node to be processed or INVALID if the /// priority heap is empty. - Node nextNode() { + Node nextNode() { return !_heap->empty() ? _heap->top() : INVALID; } - + /// \brief Returns \c false if there are nodes /// to be processed in the priority heap /// /// Returns \c false if there are nodes /// to be processed in the priority heap bool emptyQueue() { return _heap->empty(); } - /// \brief Returns the number of the nodes to be processed + /// \brief Returns the number of the nodes to be processed /// in the priority heap /// /// Returns the number of the nodes to be processed in the priority heap int emptySize() { return _heap->size(); } - + /// \brief Executes the algorithm. /// /// Executes the algorithm. @@ -662,12 +662,12 @@ ///\pre init() must be called and at least one node should be added /// with addSource() before using this function. /// - /// This method runs the Maximum Cardinality Search algorithm from the + /// This method runs the Maximum Cardinality Search algorithm from the /// source node(s). void start() { while ( !_heap->empty() ) processNextNode(); } - + /// \brief Executes the algorithm until \c dest is reached. /// /// Executes the algorithm until \c dest is reached. @@ -675,13 +675,13 @@ /// \pre init() must be called and at least one node should be added /// with addSource() before using this function. /// - /// This method runs the %MaxCardinalitySearch algorithm from the source + /// This method runs the %MaxCardinalitySearch algorithm from the source /// nodes. void start(Node dest) { while ( !_heap->empty() && _heap->top()!=dest ) processNextNode(); if ( !_heap->empty() ) finalizeNodeData(_heap->top(), _heap->prio()); } - + /// \brief Executes the algorithm until a condition is met. /// /// Executes the algorithm until a condition is met. @@ -696,10 +696,10 @@ while ( !_heap->empty() && !nm[_heap->top()] ) processNextNode(); if ( !_heap->empty() ) finalizeNodeData(_heap->top(),_heap->prio()); } - + /// \brief Runs the maximum cardinality search algorithm from node \c s. /// - /// This method runs the %MaxCardinalitySearch algorithm from a root + /// This method runs the %MaxCardinalitySearch algorithm from a root /// node \c s. /// ///\note d.run(s) is just a shortcut of the following code. @@ -714,10 +714,10 @@ start(); } - /// \brief Runs the maximum cardinality search algorithm for the + /// \brief Runs the maximum cardinality search algorithm for the /// whole digraph. /// - /// This method runs the %MaxCardinalitySearch algorithm from all + /// This method runs the %MaxCardinalitySearch algorithm from all /// unprocessed node of the digraph. /// ///\note d.run(s) is just a shortcut of the following code. @@ -739,16 +739,16 @@ } } } - + ///@} /// \name Query Functions - /// The results of the maximum cardinality search algorithm can be + /// The results of the maximum cardinality search algorithm can be /// obtained using these functions. /// \n - /// Before the use of these functions, either run() or start() must be + /// Before the use of these functions, either run() or start() must be /// called. - + ///@{ /// \brief The cardinality of a node. @@ -767,10 +767,10 @@ /// \brief Returns a reference to the NodeMap of cardinalities. /// - /// Returns a reference to the NodeMap of cardinalities. \pre \ref run() + /// Returns a reference to the NodeMap of cardinalities. \pre \ref run() /// must be called before using this function. const CardinalityMap &cardinalityMap() const { return *_cardinality;} - + /// \brief Checks if a node is reachable from the root. /// /// Returns \c true if \c v is reachable from the root. @@ -784,7 +784,7 @@ /// path to \c v has already found. /// \pre \ref run() must be called before using this function. bool processed(Node v) { return (*_heap_cross_ref)[v] == Heap::POST_HEAP; } - + ///@} }; diff -r 9eac00ea588f -r dceba191c00d lemon/min_cost_arborescence.h --- a/lemon/min_cost_arborescence.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/min_cost_arborescence.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/nagamochi_ibaraki.h --- a/lemon/nagamochi_ibaraki.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/nagamochi_ibaraki.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -303,8 +303,8 @@ protected: //This is here to avoid a gcc-3.3 compilation error. //It should never be called. - NagamochiIbaraki() {} - + NagamochiIbaraki() {} + public: typedef NagamochiIbaraki Create; @@ -414,18 +414,18 @@ for (typename Graph::NodeIt n(_graph); n != INVALID; ++n) { for (typename Graph::OutArcIt a(_graph, n); a != INVALID; ++a) { typename Graph::Node m = _graph.target(a); - + if (!(n < m)) continue; (*_nodes)[n].sum += (*_capacity)[a]; (*_nodes)[m].sum += (*_capacity)[a]; - + int c = (*_nodes)[m].curr_arc; if (c != -1 && _arcs[c ^ 1].target == n) { _edges[c >> 1].capacity += (*_capacity)[a]; } else { _edges[index].capacity = (*_capacity)[a]; - + _arcs[index << 1].prev = -1; if ((*_nodes)[n].first_arc != -1) { _arcs[(*_nodes)[n].first_arc].prev = (index << 1); @@ -435,7 +435,7 @@ _arcs[index << 1].target = m; (*_nodes)[m].curr_arc = (index << 1); - + _arcs[(index << 1) | 1].prev = -1; if ((*_nodes)[m].first_arc != -1) { _arcs[(*_nodes)[m].first_arc].prev = ((index << 1) | 1); @@ -443,7 +443,7 @@ _arcs[(index << 1) | 1].next = (*_nodes)[m].first_arc; (*_nodes)[m].first_arc = ((index << 1) | 1); _arcs[(index << 1) | 1].target = n; - + ++index; } } @@ -452,7 +452,7 @@ typename Graph::Node cut_node = INVALID; _min_cut = std::numeric_limits::max(); - for (typename Graph::Node n = _first_node; + for (typename Graph::Node n = _first_node; n != INVALID; n = (*_nodes)[n].next) { if ((*_nodes)[n].sum < _min_cut) { cut_node = n; @@ -477,7 +477,7 @@ if (_first_node == INVALID) return true; _heap->clear(); - for (typename Graph::Node n = _first_node; + for (typename Graph::Node n = _first_node; n != INVALID; n = (*_nodes)[n].next) { (*_heap_cross_ref)[n] = Heap::PRE_HEAP; } @@ -497,7 +497,7 @@ _heap->pop(); for (int a = (*_nodes)[n].first_arc; a != -1; a = _arcs[a].next) { switch (_heap->state(_arcs[a].target)) { - case Heap::PRE_HEAP: + case Heap::PRE_HEAP: { Value nv = _edges[a >> 1].capacity; _heap->push(_arcs[a].target, nv); @@ -563,7 +563,7 @@ if (!(_edges[a >> 1].cut < pmc)) { if (!merged) { for (int b = (*_nodes)[n].first_arc; b != -1; b = _arcs[b].next) { - (*_nodes)[_arcs[b].target].curr_arc = b; + (*_nodes)[_arcs[b].target].curr_arc = b; } merged = true; } @@ -573,7 +573,7 @@ nb = _arcs[b].next; if ((b ^ a) == 1) continue; typename Graph::Node o = _arcs[b].target; - int c = (*_nodes)[o].curr_arc; + int c = (*_nodes)[o].curr_arc; if (c != -1 && _arcs[c ^ 1].target == n) { _edges[c >> 1].capacity += _edges[b >> 1].capacity; (*_nodes)[n].sum += _edges[b >> 1].capacity; @@ -606,7 +606,7 @@ _arcs[_arcs[a].prev].next = _arcs[a].next; } else { (*_nodes)[n].first_arc = _arcs[a].next; - } + } if (_arcs[a].next != -1) { _arcs[_arcs[a].next].prev = _arcs[a].prev; } @@ -614,7 +614,7 @@ (*_nodes)[n].sum -= _edges[a >> 1].capacity; (*_next_rep)[(*_nodes)[n].last_rep] = m; (*_nodes)[n].last_rep = (*_nodes)[m].last_rep; - + if ((*_nodes)[m].prev != INVALID) { (*_nodes)[(*_nodes)[m].prev].next = (*_nodes)[m].next; } else{ diff -r 9eac00ea588f -r dceba191c00d lemon/nearest_neighbor_tsp.h --- a/lemon/nearest_neighbor_tsp.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/nearest_neighbor_tsp.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/network_simplex.h --- a/lemon/network_simplex.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/network_simplex.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -1234,7 +1234,7 @@ return true; } - + // Check if the upper bound is greater or equal to the lower bound // on each arc. bool checkBoundMaps() { diff -r 9eac00ea588f -r dceba191c00d lemon/opt2_tsp.h --- a/lemon/opt2_tsp.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/opt2_tsp.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/path.h --- a/lemon/path.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/path.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/planarity.h --- a/lemon/planarity.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/planarity.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/preflow.h --- a/lemon/preflow.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/preflow.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -554,10 +554,10 @@ (*_excess)[v] += rem; } } - for (NodeIt n(_graph); n != INVALID; ++n) + for (NodeIt n(_graph); n != INVALID; ++n) if(n!=_source && n!=_target && _tolerance.positive((*_excess)[n])) _level->activate(n); - + return true; } @@ -585,7 +585,7 @@ if (n == INVALID) goto first_phase_done; level = _level->highestActiveLevel(); --num; - + Value excess = (*_excess)[n]; int new_level = _level->maxLevel(); diff -r 9eac00ea588f -r dceba191c00d lemon/radix_sort.h --- a/lemon/radix_sort.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/radix_sort.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/smart_graph.h --- a/lemon/smart_graph.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/smart_graph.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -1263,7 +1263,7 @@ } else { max_red = -1; } - Parent::notifier(RedNode()).erase(asRedNodeUnsafe(node)); + Parent::notifier(RedNode()).erase(asRedNodeUnsafe(node)); } else { first_blue = nodes[n].partition_next; if (first_blue != -1) { diff -r 9eac00ea588f -r dceba191c00d lemon/soplex.cc --- a/lemon/soplex.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/soplex.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/soplex.h --- a/lemon/soplex.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/soplex.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/suurballe.h --- a/lemon/suurballe.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/suurballe.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d lemon/time_measure.h --- a/lemon/time_measure.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/time_measure.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -98,7 +98,7 @@ ///The output format is global for all timestamp instances. static Format format() { return _format; } - + ///Read the current time values of the process void stamp() { @@ -522,14 +522,14 @@ ///\param active Sets whether the report should actually be printed /// on destruction. TimeReport(std::string title,std::ostream &os=std::cerr,bool run=true, - bool active=true) + bool active=true) : Timer(run), _title(title), _os(os), _active(active) {} ///Destructor that prints the ellapsed time ~TimeReport() { if(_active) _os << _title << *this << std::endl; } - + ///Retrieve the activity status ///\e diff -r 9eac00ea588f -r dceba191c00d lemon/unionfind.h --- a/lemon/unionfind.h Fri Aug 09 14:07:27 2013 +0200 +++ b/lemon/unionfind.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/adaptors_test.cc --- a/test/adaptors_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/adaptors_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/arc_look_up_test.cc --- a/test/arc_look_up_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/arc_look_up_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -68,17 +68,17 @@ ListDigraph graph; std::istringstream lgfs(lgf); DigraphReader(graph, lgfs).run(); - + AllArcLookUp lookup(graph); - + int numArcs = countArcs(graph); - + int arcCnt = 0; for(ListDigraph::NodeIt n1(graph); n1 != INVALID; ++n1) for(ListDigraph::NodeIt n2(graph); n2 != INVALID; ++n2) for(ListDigraph::Arc a = lookup(n1, n2); a != INVALID; - a = lookup(n1, n2, a)) - ++arcCnt; + a = lookup(n1, n2, a)) + ++arcCnt; check(arcCnt==numArcs, "Wrong total number of arcs"); return 0; diff -r 9eac00ea588f -r dceba191c00d test/bellman_ford_test.cc --- a/test/bellman_ford_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/bellman_ford_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/bfs_test.cc --- a/test/bfs_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/bfs_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/bpgraph_test.cc --- a/test/bpgraph_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/bpgraph_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -113,7 +113,7 @@ BpGraph G; RedNode - n1 = G.addRedNode(), n4 = G.addRedNode(); + n1 = G.addRedNode(), n4 = G.addRedNode(); BlueNode n2 = G.addBlueNode(), n3 = G.addBlueNode(); Edge @@ -161,7 +161,7 @@ BpGraph G; RedNode - n1 = G.addRedNode(), n4 = G.addRedNode(); + n1 = G.addRedNode(), n4 = G.addRedNode(); BlueNode n2 = G.addBlueNode(), n3 = G.addBlueNode(); Edge @@ -216,7 +216,7 @@ BlueNode n2 = G.addBlueNode(), n3 = G.addBlueNode(); - Edge + Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3); diff -r 9eac00ea588f -r dceba191c00d test/circulation_test.cc --- a/test/circulation_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/circulation_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/connectivity_test.cc --- a/test/connectivity_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/connectivity_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/dfs_test.cc --- a/test/dfs_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/dfs_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -223,7 +223,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 -r 9eac00ea588f -r dceba191c00d test/digraph_test.cc --- a/test/digraph_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/digraph_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/dijkstra_test.cc --- a/test/dijkstra_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/dijkstra_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/edge_set_test.cc --- a/test/edge_set_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/edge_set_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/euler_test.cc --- a/test/euler_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/euler_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -102,7 +102,7 @@ Graph g(d); Digraph::Node n = d.addNode(); ::lemon::ignore_unused_variable_warning(n); - + checkDiEulerIt(d); checkDiEulerIt(g); checkEulerIt(g); diff -r 9eac00ea588f -r dceba191c00d test/fractional_matching_test.cc --- a/test/fractional_matching_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/fractional_matching_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/gomory_hu_test.cc --- a/test/gomory_hu_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/gomory_hu_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/graph_copy_test.cc --- a/test/graph_copy_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/graph_copy_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -53,7 +53,7 @@ if (i == 0 && j == 0) fa = arc; } } - + // Test digraph copy GR to; typename GR::template NodeMap tnm(to); @@ -72,7 +72,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."); @@ -100,7 +100,7 @@ // Test repeated copy digraphCopy(from, to).run(); - + check(countNodes(from) == countNodes(to), "Wrong copy."); check(countArcs(from) == countArcs(to), "Wrong copy."); } @@ -203,7 +203,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."); @@ -366,7 +366,7 @@ // Test repeated copy bpGraphCopy(from, to).run(); - + check(countNodes(from) == countNodes(to), "Wrong copy."); check(countRedNodes(from) == countRedNodes(to), "Wrong copy."); check(countBlueNodes(from) == countBlueNodes(to), "Wrong copy."); diff -r 9eac00ea588f -r dceba191c00d test/graph_test.cc --- a/test/graph_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/graph_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/graph_test.h --- a/test/graph_test.h Fri Aug 09 14:07:27 2013 +0200 +++ b/test/graph_test.h Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/hao_orlin_test.cc --- a/test/hao_orlin_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/hao_orlin_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/heap_test.cc --- a/test/heap_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/heap_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/lgf_reader_writer_test.cc --- a/test/lgf_reader_writer_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/lgf_reader_writer_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -385,7 +385,7 @@ writer.edgeMap("edge_map2", edge_map, WriterConverter()); writer.arcMap("arc_map1", arc_map); writer.arcMap("arc_map2", arc_map, WriterConverter()); - writer.node("node", n2); + writer.node("node", n2); writer.edge("edge", e1); writer.arc("arc", graph.direct(e1, false)); writer.attribute("attr1", attr); @@ -492,7 +492,7 @@ writer.arcMap("arc_map1", arc_map); writer.arcMap("arc_map2", arc_map, WriterConverter()); writer.node("node", n); - writer.redNode("red_node", rn1); + writer.redNode("red_node", rn1); writer.blueNode("blue_node", bn2); writer.edge("edge", e1); writer.arc("arc", graph.direct(e1, false)); diff -r 9eac00ea588f -r dceba191c00d test/lgf_test.cc --- a/test/lgf_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/lgf_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2011 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -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&) + catch (FormatError&) { ok = true; } @@ -139,7 +139,7 @@ } { - ListDigraph d; + ListDigraph d; std::istringstream input(test_lgf_bad2); bool ok=false; try { diff -r 9eac00ea588f -r dceba191c00d test/lp_test.cc --- a/test/lp_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/lp_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/maps_test.cc --- a/test/maps_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/maps_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/matching_test.cc --- a/test/matching_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/matching_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/max_cardinality_search_test.cc --- a/test/max_cardinality_search_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/max_cardinality_search_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -67,7 +67,7 @@ CardMap card; ProcMap proc; HeapCrossRef crossref(g); - + typedef MaxCardinalitySearch ::SetCapacityMap ::SetCardinalityMap @@ -81,7 +81,7 @@ const MaxCardType::Heap& heap_const = const_maxcard.heap(); MaxCardType::Heap& heap = const_cast(heap_const); maxcard.heap(heap,crossref); - + maxcard.capacityMap(cap).cardinalityMap(card).processedMap(proc); maxcard.init(); diff -r 9eac00ea588f -r dceba191c00d test/max_clique_test.cc --- a/test/max_clique_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/max_clique_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -54,7 +54,7 @@ "5 6 13\n" "5 7 14\n" "6 7 15\n"; - + // Check with general graphs template @@ -62,7 +62,7 @@ typedef ListGraph GR; typedef GrossoLocatelliPullanMc McAlg; typedef McAlg::CliqueNodeIt CliqueIt; - + // Basic tests { GR g; @@ -81,7 +81,7 @@ CliqueIt it1(mc); check(static_cast(it1) == u && ++it1 == INVALID, "Wrong CliqueNodeIt"); - + GR::Node v = g.addNode(); check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause"); check(mc.cliqueSize() == 1, "Wrong clique size"); @@ -109,7 +109,7 @@ graphReader(g, input) .nodeMap("max_clique", max_clique) .run(); - + McAlg mc(g); mc.iterationLimit(50); check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause"); @@ -133,7 +133,7 @@ typedef FullGraph GR; typedef GrossoLocatelliPullanMc McAlg; typedef McAlg::CliqueNodeIt CliqueIt; - + for (int size = 0; size <= 40; size = size * 3 + 1) { GR g(size); GR::NodeMap map(g); @@ -156,7 +156,7 @@ GridGraph g(5, 7); GridGraph::NodeMap map(g); GrossoLocatelliPullanMc mc(g); - + mc.iterationLimit(100); check(mc.run(rule) == mc.ITERATION_LIMIT, "Wrong termination cause"); check(mc.cliqueSize() == 2, "Wrong clique size"); @@ -179,10 +179,10 @@ checkMaxCliqueFullGraph(GrossoLocatelliPullanMc::RANDOM); checkMaxCliqueFullGraph(GrossoLocatelliPullanMc::DEGREE_BASED); checkMaxCliqueFullGraph(GrossoLocatelliPullanMc::PENALTY_BASED); - + checkMaxCliqueGridGraph(GrossoLocatelliPullanMc::RANDOM); checkMaxCliqueGridGraph(GrossoLocatelliPullanMc::DEGREE_BASED); checkMaxCliqueGridGraph(GrossoLocatelliPullanMc::PENALTY_BASED); - + return 0; } diff -r 9eac00ea588f -r dceba191c00d test/max_flow_test.cc --- a/test/max_flow_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/max_flow_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -222,7 +222,7 @@ void initFlowTest() { DIGRAPH_TYPEDEFS(SmartDigraph); - + SmartDigraph g; SmartDigraph::ArcMap cap(g),iflow(g); Node s=g.addNode(); Node t=g.addNode(); @@ -382,7 +382,7 @@ checkMaxFlowAlg >(); checkMaxFlowAlg >(); initFlowTest(); - + // Check EdmondsKarp typedef EdmondsKarp > EKType1; typedef EdmondsKarp > EKType2; @@ -390,6 +390,6 @@ checkMaxFlowAlg >(); initFlowTest(); - + return 0; } diff -r 9eac00ea588f -r dceba191c00d test/min_cost_arborescence_test.cc --- a/test/min_cost_arborescence_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/min_cost_arborescence_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/min_cost_flow_test.cc --- a/test/min_cost_flow_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/min_cost_flow_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/min_mean_cycle_test.cc --- a/test/min_mean_cycle_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/min_mean_cycle_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -210,7 +210,7 @@ checkMmcAlg >(gr, l2, c2, 5, 2); checkMmcAlg >(gr, l3, c3, 0, 1); checkMmcAlg >(gr, l4, c4, -1, 1); - + // Howard with iteration limit HowardMmc mmc(gr, l1); check((mmc.findCycleMean(2) == HowardMmc::ITERATION_LIMIT), diff -r 9eac00ea588f -r dceba191c00d test/nagamochi_ibaraki_test.cc --- a/test/nagamochi_ibaraki_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/nagamochi_ibaraki_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/path_test.cc --- a/test/path_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/path_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/radix_sort_test.cc --- a/test/radix_sort_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/radix_sort_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -52,7 +52,7 @@ template T listsort(typename T::iterator b, typename T::iterator e) -{ +{ if(b==e) return T(); typename T::iterator bn=b; if(++bn==e) { diff -r 9eac00ea588f -r dceba191c00d test/suurballe_test.cc --- a/test/suurballe_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/suurballe_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/time_measure_test.cc --- a/test/time_measure_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/time_measure_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * diff -r 9eac00ea588f -r dceba191c00d test/tsp_test.cc --- a/test/tsp_test.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/test/tsp_test.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -41,7 +41,7 @@ // check(checkMetricCost(g, constMap(0)), "Wrong checkMetricCost()"); // check(checkMetricCost(g, constMap(1)), "Wrong checkMetricCost()"); // check(!checkMetricCost(g, constMap(-1)), "Wrong checkMetricCost()"); -// +// // FullGraph::EdgeMap cost(g); // for (NodeIt u(g); u != INVALID; ++u) { // for (NodeIt v(g); v != INVALID; ++v) { @@ -64,7 +64,7 @@ template bool checkTour(const FullGraph &gr, const Container &p) { FullGraph::NodeMap used(gr, false); - + int node_cnt = 0; for (typename Container::const_iterator it = p.begin(); it != p.end(); ++it) { FullGraph::Node node = *it; @@ -72,14 +72,14 @@ used[node] = true; ++node_cnt; } - + return (node_cnt == gr.nodeNum()); } // Checks tour validity bool checkTourPath(const FullGraph &gr, const Path &p) { FullGraph::NodeMap used(gr, false); - + if (!checkPath(gr, p)) return false; if (gr.nodeNum() <= 1 && p.length() != 0) return false; if (gr.nodeNum() > 1 && p.length() != gr.nodeNum()) return false; @@ -181,7 +181,7 @@ cost[g.edge(u, v)] = (pos[u] - pos[v]).normSquare(); } } - + check(alg.run() > 0, alg_name + ": Wrong total cost"); std::vector vec; @@ -195,14 +195,14 @@ check(checkTourPath(g, path), alg_name + ": Wrong tour"); check(checkCost(g, path, cost, alg.tourCost()), alg_name + ": Wrong tour cost"); - + check(!Tolerance().less(alg.tourCost(), opt2.run(alg.tourNodes())), "2-opt improvement: Wrong total cost"); check(checkTour(g, opt2.tourNodes()), "2-opt improvement: Wrong node sequence"); check(checkCost(g, opt2.tourNodes(), cost, opt2.tourCost()), "2-opt improvement: Wrong tour cost"); - + check(!Tolerance().less(alg.tourCost(), opt2.run(path)), "2-opt improvement: Wrong total cost"); check(checkTour(g, opt2.tourNodes()), @@ -212,7 +212,7 @@ } } -// Algorithm class for Nearest Insertion +// Algorithm class for Nearest Insertion template class NearestInsertionTsp : public InsertionTsp { public: @@ -223,7 +223,7 @@ } }; -// Algorithm class for Farthest Insertion +// Algorithm class for Farthest Insertion template class FarthestInsertionTsp : public InsertionTsp { public: @@ -234,7 +234,7 @@ } }; -// Algorithm class for Cheapest Insertion +// Algorithm class for Cheapest Insertion template class CheapestInsertionTsp : public InsertionTsp { public: @@ -245,7 +245,7 @@ } }; -// Algorithm class for Random Insertion +// Algorithm class for Random Insertion template class RandomInsertionTsp : public InsertionTsp { public: diff -r 9eac00ea588f -r dceba191c00d tools/dimacs-solver.cc --- a/tools/dimacs-solver.cc Fri Aug 09 14:07:27 2013 +0200 +++ b/tools/dimacs-solver.cc Fri Aug 09 11:28:17 2013 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). *