COIN-OR::LEMON - Graph Library

Ticket #607: 607-patch1-f37f0845cf32.patch

File 607-patch1-f37f0845cf32.patch, 755 bytes (added by Peter Kovacs, 7 years ago)
  • lemon/dimacs.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1504882923 -7200
    # Node ID f37f0845cf3238988e8f635b32f3d173cd957f0f
    # Parent  6e0525ec5355243555def854496159f61034a1ae
    Bug fix in DIMACS reader (#607)
    
    diff --git a/lemon/dimacs.h b/lemon/dimacs.h
    a b  
    339339                     DimacsDescriptor desc=DimacsDescriptor()) {
    340340    typename Digraph::Node u,v;
    341341    if(desc.type==DimacsDescriptor::NONE) desc=dimacsType(is);
    342     if(desc.type!=DimacsDescriptor::MAX || desc.type!=DimacsDescriptor::SP)
     342    if(desc.type!=DimacsDescriptor::MAX && desc.type!=DimacsDescriptor::SP)
    343343      throw FormatError("Problem type mismatch");
    344344    _readDimacs(is, g, capacity, u, v, infty, desc);
    345345  }