COIN-OR::LEMON - Graph Library

Changeset 964:2b6bffe0e7e8 in lemon-main for lemon/lgf_reader.h


Ignore:
Timestamp:
12/20/11 18:15:14 (12 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Parents:
963:7c4ba7daaf5f (diff), 942:633956ca9421 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/lgf_reader.h

    r877 r964  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2010
     5 * Copyright (C) 2003-2011
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    965965        int index = 0;
    966966        while (_reader_bits::readToken(line, map)) {
     967          if(map == "-") {
     968              if(index!=0)
     969                throw FormatError("'-' is not allowed as a map name");
     970              else if (line >> std::ws >> c)
     971                throw FormatError("Extra character at the end of line");
     972              else break;
     973            }
    967974          if (maps.find(map) != maps.end()) {
    968975            std::ostringstream msg;
     
    18351842        int index = 0;
    18361843        while (_reader_bits::readToken(line, map)) {
     1844          if(map == "-") {
     1845              if(index!=0)
     1846                throw FormatError("'-' is not allowed as a map name");
     1847              else if (line >> std::ws >> c)
     1848                throw FormatError("Extra character at the end of line");
     1849              else break;
     1850            }
    18371851          if (maps.find(map) != maps.end()) {
    18381852            std::ostringstream msg;
  • lemon/lgf_reader.h

    r959 r964  
    428428  ///\endcode
    429429  ///
    430   /// By default the reader uses the first section in the file of the
     430  /// By default, the reader uses the first section in the file of the
    431431  /// proper type. If a section has an optional name, then it can be
    432432  /// selected for reading by giving an optional name parameter to the
     
    563563    friend DigraphReader<TDGR> digraphReader(TDGR& digraph, std::istream& is);
    564564    template <typename TDGR>
    565     friend DigraphReader<TDGR> digraphReader(TDGR& digraph, 
     565    friend DigraphReader<TDGR> digraphReader(TDGR& digraph,
    566566                                             const std::string& fn);
    567567    template <typename TDGR>
     
    11951195
    11961196  };
    1197  
     1197
    11981198  /// \ingroup lemon_io
    11991199  ///
     
    12021202  /// This function just returns a \ref DigraphReader class.
    12031203  ///
    1204   /// With this function a digraph can be read from an 
     1204  /// With this function a digraph can be read from an
    12051205  /// \ref lgf-format "LGF" file or input stream with several maps and
    12061206  /// attributes. For example, there is network flow problem on a
     
    12571257  template <typename GR>
    12581258  class GraphReader;
    1259  
     1259
    12601260  template <typename TGR>
    12611261  GraphReader<TGR> graphReader(TGR& graph, std::istream& is = std::cin);
     
    13941394    friend GraphReader<TGR> graphReader(TGR& graph, std::istream& is);
    13951395    template <typename TGR>
    1396     friend GraphReader<TGR> graphReader(TGR& graph, const std::string& fn); 
     1396    friend GraphReader<TGR> graphReader(TGR& graph, const std::string& fn);
    13971397    template <typename TGR>
    13981398    friend GraphReader<TGR> graphReader(TGR& graph, const char *fn);
     
    20782078  /// \brief Return a \ref GraphReader class
    20792079  ///
    2080   /// This function just returns a \ref GraphReader class. 
    2081   ///
    2082   /// With this function a graph can be read from an 
     2080  /// This function just returns a \ref GraphReader class.
     2081  ///
     2082  /// With this function a graph can be read from an
    20832083  /// \ref lgf-format "LGF" file or input stream with several maps and
    20842084  /// attributes. For example, there is weighted matching problem on a
     
    22362236    /// whitespaces are trimmed from each processed string.
    22372237    ///
    2238     /// For example let's see a section, which contain several
     2238    /// For example, let's see a section, which contain several
    22392239    /// integers, which should be inserted into a vector.
    22402240    ///\code
Note: See TracChangeset for help on using the changeset viewer.