COIN-OR::LEMON - Graph Library

Changeset 1196:4bebc22ab77c in lemon-0.x for src/lemon/dijkstra.h


Ignore:
Timestamp:
03/05/05 00:14:36 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1608
Message:
  • Bugfix in setting the previous Node
  • Bugfix in DijkstraWizard? _source member initialization
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/dijkstra.h

    r1193 r1196  
    452452      _reached->set(v,true);
    453453      _dist->set(v, dst);
    454       _predNode->set(v,G->source((*_pred)[v]));
     454      if((*_pred)[v]!=INVALID) _predNode->set(v,G->source((*_pred)[v])); ///\todo What to do?
    455455    }
    456456
     
    752752    /// all of the attributes to default values (0, INVALID).
    753753    DijkstraWizardBase() : _g(0), _length(0), _pred(0), _predNode(0),
    754                        _dist(0), _source(INVALID) {}
     754                       _dist(0), _source(0) {}
    755755
    756756    /// Constructor.
     
    764764    DijkstraWizardBase(const GR &g,const LM &l, Node s=INVALID) :
    765765      _g((void *)&g), _length((void *)&l), _pred(0), _predNode(0),
    766                   _dist(0), _source((void *)&s) {}
     766                  _dist(0), _source((s==INVALID)?0:(void *)&s) {}
    767767
    768768  };
Note: See TracChangeset for help on using the changeset viewer.