COIN-OR::LEMON - Graph Library

Opened 9 years ago

Closed 9 years ago

#366 closed defect (fixed)

Bug in PredMapPath::empty()

Reported by: Alpar Juttner Owned by: Balazs Dezso
Priority: major Milestone: LEMON 1.3 release
Component: core Version: hg main
Keywords: Cc: retvari@…
Revision id:

Description (last modified by Alpar Juttner)

Dear all,

I think the below behavior of PredMapPath::empty() makes more sense.

Regards, Gabor

################

# HG changeset patch
# User retvari@everything
# Date 1271017722 -7200
# Node ID 6e741754566a2075505527319b57862baf59931f
# Parent  6dd226d3dcbaa9f7474a9b9f445f1c617d65d481
Fix PredMapPath::empty()

diff --git a/lemon/bits/path_dump.h b/lemon/bits/path_dump.h
--- a/lemon/bits/path_dump.h
+++ b/lemon/bits/path_dump.h
@@ -49,7 +49,7 @@
     }
 
     bool empty() const {
-      return predMap[target] != INVALID;
+      return predMap[target] == INVALID;
     }
 
     class RevArcIt {

Attachments (2)

1f2a734581f8.patch (510 bytes) - added by Balazs Dezso 9 years ago.
707b699ee369.patch (579 bytes) - added by Balazs Dezso 9 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by Alpar Juttner

Description: modified (diff)

Changed 9 years ago by Balazs Dezso

Attachment: 1f2a734581f8.patch added

Changed 9 years ago by Balazs Dezso

Attachment: 707b699ee369.patch added

comment:2 in reply to:  description Changed 9 years ago by Balazs Dezso

Owner: changed from Alpar Juttner to Balazs Dezso
Status: newassigned

Replying to alpar:

Dear all,

I think the below behavior of PredMapPath::empty() makes more sense.

Regards, Gabor

The PredMatrixMapPath::empty() was also erroneous. The [707b699ee369] fixes the bug.

comment:3 Changed 9 years ago by Alpar Juttner

Resolution: fixed
Status: assignedclosed

Both changes have been merged to all affected branches (1.0, 1.1, 1.2, main), see [1f2a734581f8], [1aa7eba26af5]

Note: See TracTickets for help on using tickets.