COIN-OR::LEMON - Graph Library

Ticket #69: a4a945914af3.patch

File a4a945914af3.patch, 841 bytes (added by Poroszkai Daniel, 13 years ago)

Update lgf reader

  • lemon/lgf_reader.h

    # HG changeset patch
    # User Daniel Poroszkai <poroszd@inf.elte.hu>
    # Date 1328396684 -3600
    # Node ID a4a945914af3e7c3c798b763899229b9e1d05009
    # Parent  7b95667b0241007b7f725d0bf286f7bbdb82920e
    Update LGF reader to work with typesafe bipartite node sets
    
    diff --git a/lemon/lgf_reader.h b/lemon/lgf_reader.h
    a b  
    29532953            throw FormatError(msg.str());
    29542954          }
    29552955
    2956           e = _graph.addEdge(source, target);
     2956          // It is checked that source is red and
     2957          // target is blue, so this should be safe:
     2958          e = _graph.addEdge(_graph.asRedNodeUnsafe(source),
     2959                             _graph.asBlueNodeUnsafe(target));
    29572960          if (label_index != -1)
    29582961            _edge_index.insert(std::make_pair(tokens[label_index], e));
    29592962        } else {