COIN-OR::LEMON - Graph Library

Changes in / [959:17e36e175725:957:2eebc8f7dca5] in lemon-main


Ignore:
Files:
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • AUTHORS

    r951 r320  
    2424
    2525Again, please visit the history of the old LEMON repository for more
    26 details: http://lemon.cs.elte.hu/hg/lemon-0.x
     26details: http://lemon.cs.elte.hu/svn/lemon/trunk
  • doc/lgf.dox

    r950 r440  
    6464\endcode
    6565
    66 The \c \@arcs section is very similar to the \c \@nodes section, it
    67 again starts with a header line describing the names of the maps, but
    68 the \c "label" map is not obligatory here. The following lines
    69 describe the arcs. The first two tokens of each line are the source
    70 and the target node of the arc, respectively, then come the map
     66The \c \@arcs section is very similar to the \c \@nodes section,
     67it again starts with a header line describing the names of the maps,
     68but the \c "label" map is not obligatory here. The following lines
     69describe the arcs. The first two tokens of each line are
     70the source and the target node of the arc, respectively, then come the map
    7171values. The source and target tokens must be node labels.
    7272
     
    7979\endcode
    8080
    81 If there is no map in the \c \@arcs section at all, then it must be
    82 indicated by a sole '-' sign in the first line.
    83 
    84 \code
    85  @arcs
    86          -
    87  1   2
    88  1   3
    89  2   3
    90 \endcode
    91 
    9281The \c \@edges is just a synonym of \c \@arcs. The \@arcs section can
    9382also store the edge set of an undirected graph. In such case there is
    9483a conventional method for store arc maps in the file, if two columns
    95 have the same caption with \c '+' and \c '-' prefix, then these columns
     84has the same caption with \c '+' and \c '-' prefix, then these columns
    9685can be regarded as the values of an arc map.
    9786
  • lemon/Makefile.am

    r959 r681  
    11EXTRA_DIST += \
    22        lemon/lemon.pc.in \
    3         lemon/lemon.pc.cmake \
    43        lemon/CMakeLists.txt \
    54        lemon/config.h.cmake
  • lemon/bits/path_dump.h

    r887 r529  
    5050
    5151    bool empty() const {
    52       return predMap[target] == INVALID;
     52      return predMap[target] != INVALID;
    5353    }
    5454
     
    124124
    125125    bool empty() const {
    126       return predMatrixMap(source, target) == INVALID;
     126      return source != target;
    127127    }
    128128
  • lemon/core.h

    r959 r671  
    395395      static void copy(const From& from, Digraph &to,
    396396                       NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) {
    397         to.clear();
    398397        for (typename From::NodeIt it(from); it != INVALID; ++it) {
    399398          nodeRefMap[it] = to.addNode();
     
    423422      static void copy(const From& from, Graph &to,
    424423                       NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) {
    425         to.clear();
    426424        for (typename From::NodeIt it(from); it != INVALID; ++it) {
    427425          nodeRefMap[it] = to.addNode();
  • lemon/dfs.h

    r959 r584  
    558558    void start(Node t)
    559559    {
    560       while ( !emptyQueue() && !(*_reached)[t] )
     560      while ( !emptyQueue() && G->target(_stack[_stack_head])!=t )
    561561        processNextArc();
    562562    }
     
    15101510    /// with addSource() before using this function.
    15111511    void start(Node t) {
    1512       while ( !emptyQueue() && !(*_reached)[t] )
     1512      while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t )
    15131513        processNextArc();
    15141514    }
  • lemon/graph_to_eps.h

    r959 r617  
    685685#else
    686686      os << bits::getWinFormattedDate();
    687       os << std::endl;
    688687#endif
    689688    }
     689    os << std::endl;
    690690
    691691    if (_autoArcWidthScale) {
  • lemon/lgf_reader.h

    r959 r599  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2011
     5 * Copyright (C) 2003-2009
    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             }
    974967          if (maps.find(map) != maps.end()) {
    975968            std::ostringstream msg;
     
    18421835        int index = 0;
    18431836        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             }
    18511837          if (maps.find(map) != maps.end()) {
    18521838            std::ostringstream msg;
  • test/CMakeLists.txt

    r959 r945  
    3232  heap_test
    3333  kruskal_test
    34   lgf_test
    3534  maps_test
    3635  matching_test
  • test/Makefile.am

    r959 r649  
    2626        test/heap_test \
    2727        test/kruskal_test \
    28         test/lgf_test \
    2928        test/maps_test \
    3029        test/matching_test \
     
    7271test_kruskal_test_SOURCES = test/kruskal_test.cc
    7372test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc
    74 test_lgf_test_SOURCES = test/lgf_test.cc
    7573test_lp_test_SOURCES = test/lp_test.cc
    7674test_maps_test_SOURCES = test/maps_test.cc
  • test/dfs_test.cc

    r959 r585  
    5151  "@attributes\n"
    5252  "source 0\n"
    53   "target 5\n"
    54   "source1 6\n"
    55   "target1 3\n";
    56 
     53  "target 5\n";
    5754
    5855void checkDfsCompile()
     
    183180  Digraph G;
    184181  Node s, t;
    185   Node s1, t1;
    186182
    187183  std::istringstream input(test_lgf);
     
    189185    node("source", s).
    190186    node("target", t).
    191     node("source1", s1).
    192     node("target1", t1).
    193187    run();
    194188
     
    217211
    218212  {
    219   Dfs<Digraph> dfs(G);
    220   check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
    221   }
    222  
    223   {
    224213    NullMap<Node,Arc> myPredMap;
    225214    dfs(G).predMap(myPredMap).run(s);
  • test/graph_copy_test.cc

    r893 r440  
    3030  const int nn = 10;
    3131
    32   // Build a digraph
    3332  SmartDigraph from;
    3433  SmartDigraph::NodeMap<int> fnm(from);
     
    5352  }
    5453
    55   // Test digraph copy
    5654  ListDigraph to;
    5755  ListDigraph::NodeMap<int> tnm(to);
     
    7169    nodeCrossRef(ncr).arcCrossRef(ecr).
    7270    node(fn, tn).arc(fa, ta).run();
    73  
    74   check(countNodes(from) == countNodes(to), "Wrong copy.");
    75   check(countArcs(from) == countArcs(to), "Wrong copy.");
    7671
    7772  for (SmartDigraph::NodeIt it(from); it != INVALID; ++it) {
     
    9691  check(tn == nr[fn], "Wrong copy.");
    9792  check(ta == er[fa], "Wrong copy.");
    98 
    99   // Test repeated copy
    100   digraphCopy(from, to).run();
    101  
    102   check(countNodes(from) == countNodes(to), "Wrong copy.");
    103   check(countArcs(from) == countArcs(to), "Wrong copy.");
    10493}
    10594
     
    10796  const int nn = 10;
    10897
    109   // Build a graph
    11098  SmartGraph from;
    11199  SmartGraph::NodeMap<int> fnm(from);
     
    135123  }
    136124
    137   // Test graph copy
    138125  ListGraph to;
    139126  ListGraph::NodeMap<int> tnm(to);
     
    157144    nodeCrossRef(ncr).arcCrossRef(acr).edgeCrossRef(ecr).
    158145    node(fn, tn).arc(fa, ta).edge(fe, te).run();
    159 
    160   check(countNodes(from) == countNodes(to), "Wrong copy.");
    161   check(countEdges(from) == countEdges(to), "Wrong copy.");
    162   check(countArcs(from) == countArcs(to), "Wrong copy.");
    163146
    164147  for (SmartGraph::NodeIt it(from); it != INVALID; ++it) {
     
    198181  check(ta == ar[fa], "Wrong copy.");
    199182  check(te == er[fe], "Wrong copy.");
    200 
    201   // Test repeated copy
    202   graphCopy(from, to).run();
    203  
    204   check(countNodes(from) == countNodes(to), "Wrong copy.");
    205   check(countEdges(from) == countEdges(to), "Wrong copy.");
    206   check(countArcs(from) == countArcs(to), "Wrong copy.");
    207183}
    208184
Note: See TracChangeset for help on using the changeset viewer.