Merge bugfix #607 to branch 1.2 1.2
authorAlpar Juttner <alpar@cs.elte.hu>
Tue, 19 Sep 2017 15:19:48 +0200
branch1.2
changeset 137400769a5f0f5d
parent 1365 1e87c18cf65e
parent 1373 332627dd249e
child 1424 7edc220d6244
Merge bugfix #607 to branch 1.2
lemon/dimacs.h
     1.1 --- a/lemon/dimacs.h	Wed Oct 07 18:56:56 2015 +0200
     1.2 +++ b/lemon/dimacs.h	Tue Sep 19 15:19:48 2017 +0200
     1.3 @@ -25,6 +25,7 @@
     1.4  #include <limits>
     1.5  #include <lemon/maps.h>
     1.6  #include <lemon/error.h>
     1.7 +
     1.8  /// \ingroup dimacs_group
     1.9  /// \file
    1.10  /// \brief DIMACS file format reader.
    1.11 @@ -122,7 +123,7 @@
    1.12    /// a non-zero value, that value will be used as "infinite".
    1.13    ///
    1.14    /// If the file type was previously evaluated by dimacsType(), then
    1.15 -  /// the descriptor struct should be given by the \c dest parameter.
    1.16 +  /// the descriptor struct should be given by the \c desc parameter.
    1.17    template <typename Digraph, typename LowerMap,
    1.18              typename CapacityMap, typename CostMap,
    1.19              typename SupplyMap>
    1.20 @@ -276,7 +277,7 @@
    1.21    /// a non-zero value, that value will be used as "infinite".
    1.22    ///
    1.23    /// If the file type was previously evaluated by dimacsType(), then
    1.24 -  /// the descriptor struct should be given by the \c dest parameter.
    1.25 +  /// the descriptor struct should be given by the \c desc parameter.
    1.26    template<typename Digraph, typename CapacityMap>
    1.27    void readDimacsMax(std::istream& is,
    1.28                       Digraph &g,
    1.29 @@ -303,7 +304,7 @@
    1.30    /// source node.
    1.31    ///
    1.32    /// If the file type was previously evaluated by dimacsType(), then
    1.33 -  /// the descriptor struct should be given by the \c dest parameter.
    1.34 +  /// the descriptor struct should be given by the \c desc parameter.
    1.35    template<typename Digraph, typename LengthMap>
    1.36    void readDimacsSp(std::istream& is,
    1.37                      Digraph &g,
    1.38 @@ -334,7 +335,7 @@
    1.39    /// a non-zero value, that value will be used as "infinite".
    1.40    ///
    1.41    /// If the file type was previously evaluated by dimacsType(), then
    1.42 -  /// the descriptor struct should be given by the \c dest parameter.
    1.43 +  /// the descriptor struct should be given by the \c desc parameter.
    1.44    template<typename Digraph, typename CapacityMap>
    1.45    void readDimacsCap(std::istream& is,
    1.46                       Digraph &g,
    1.47 @@ -343,7 +344,7 @@
    1.48                       DimacsDescriptor desc=DimacsDescriptor()) {
    1.49      typename Digraph::Node u,v;
    1.50      if(desc.type==DimacsDescriptor::NONE) desc=dimacsType(is);
    1.51 -    if(desc.type!=DimacsDescriptor::MAX || desc.type!=DimacsDescriptor::SP)
    1.52 +    if(desc.type!=DimacsDescriptor::MAX && desc.type!=DimacsDescriptor::SP)
    1.53        throw FormatError("Problem type mismatch");
    1.54      _readDimacs(is, g, capacity, u, v, infty, desc);
    1.55    }
    1.56 @@ -374,7 +375,7 @@
    1.57    /// At the beginning, \c g is cleared by \c g.clear().
    1.58    ///
    1.59    /// If the file type was previously evaluated by dimacsType(), then
    1.60 -  /// the descriptor struct should be given by the \c dest parameter.
    1.61 +  /// the descriptor struct should be given by the \c desc parameter.
    1.62    template<typename Graph>
    1.63    void readDimacsMat(std::istream& is, Graph &g,
    1.64                       DimacsDescriptor desc=DimacsDescriptor())