COIN-OR::LEMON - Graph Library

Opened 14 years ago

Closed 13 years ago

#382 closed task (done)

LGF without arc maps

Reported by: Peter Kovacs Owned by: Balazs Dezso
Priority: major Milestone: LEMON 1.3 release
Component: core Version: hg main
Keywords: Cc:
Revision id:

Description

Arc maps are not obligatory in LGF. However, it is problematic, if you do not specify any arc maps. If you only write an empty line instead of map names, the reader will consider the first arc definition as map names and fails to read the second arc definition line (missing columns).

I realized that if you write a single @ sign instead of the map names, then the reader handles it correctly. If this behavior is acceptable, then we should write it in the LGF documentation and maybe in the tutorial, too.

Attachments (1)

801f8c1c86b5.patch (6.1 KB) - added by Alpar Juttner 13 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 in reply to:  description Changed 14 years ago by Alpar Juttner

Replying to kpeter:

Arc maps are not obligatory in LGF. However, it is problematic, if you do not specify any arc maps. If you only write an empty line instead of map names, the reader will consider the first arc definition as map names and fails to read the second arc definition line (missing columns).

I realized that if you write a single @ sign instead of the map names, then the reader handles it correctly. If this behavior is acceptable, then we should write it in the LGF documentation and maybe in the tutorial, too.

I think it is an acceptable solution.

comment:2 Changed 14 years ago by Peter Kovacs

Okay. Let's improve the documentation.

comment:3 Changed 13 years ago by Peter Kovacs

It seems that I was wrong. If you write a single @ letter instead of map names, then the reader can read the file, but it finds the arcs/edges section to be empty. So it is not a solution for the problem currently.

Changed 13 years ago by Alpar Juttner

Attachment: 801f8c1c86b5.patch added

comment:4 Changed 13 years ago by Alpar Juttner

The attached changeset [801f8c1c86b5] implements arcs sections without arc maps. A single '-' character in the header line indicates it.

Lgf doc is yet to be updated.

Could you please review the changes?

comment:5 Changed 13 years ago by Balazs Dezso

In my opinion it's a reasonable workaround for the problem.

Minor remarks:

  • The indentation does not match to the remaining part of the file lgf_reader.h.
  • It's good that there are tests for LGF reader.
  • It would be good to add documentation to the lgf.dox.

comment:6 Changed 13 years ago by Alpar Juttner

Resolution: done
Status: newclosed

[54464584b157] is the same as 801f8c1c86b5.patch, fixes the indentation and and a section about this feature to the dox page describing the lgf format.

The changeset has been merged to branches 1.0, 1.1, 1.2 and main.

Note: See TracTickets for help on using tickets.