COIN-OR::LEMON - Graph Library

Changeset 292:e7af73f1805e in lemon-main


Ignore:
Timestamp:
10/01/08 12:26:45 (16 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Parents:
291:d901321d6555 (diff), 289:d91884dcd572 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge

Location:
lemon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lemon/bfs.h

    r288 r292  
    136136  class Bfs {
    137137  public:
    138     ///\ref Exception for uninitialized parameters.
    139 
    140     ///This error represents problems in the initialization of the
    141     ///parameters of the algorithm.
    142     class UninitializedParameter : public lemon::UninitializedParameter {
    143     public:
    144       virtual const char* what() const throw() {
    145         return "lemon::Bfs::UninitializedParameter";
    146       }
    147     };
    148138
    149139    ///The type of the digraph the algorithm runs on.
     
    233223      static PredMap *createPredMap(const Digraph &)
    234224      {
    235         throw UninitializedParameter();
     225        LEMON_ASSERT(false, "PredMap is not initialized");
     226        return 0; // ignore warnings
    236227      }
    237228    };
     
    251242      static DistMap *createDistMap(const Digraph &)
    252243      {
    253         throw UninitializedParameter();
     244        LEMON_ASSERT(false, "DistMap is not initialized");
     245        return 0; // ignore warnings
    254246      }
    255247    };
     
    269261      static ReachedMap *createReachedMap(const Digraph &)
    270262      {
    271         throw UninitializedParameter();
     263        LEMON_ASSERT(false, "ReachedMap is not initialized");
     264        return 0; // ignore warnings
    272265      }
    273266    };
     
    287280      static ProcessedMap *createProcessedMap(const Digraph &)
    288281      {
    289         throw UninitializedParameter();
     282        LEMON_ASSERT(false, "ProcessedMap is not initialized");
     283        return 0; // ignore warnings
    290284      }
    291285    };
     
    305299      {
    306300        return new ProcessedMap(g);
     301        return 0; // ignore warnings
    307302      }
    308303    };
     
    10411036    bool run(Node s, Node t)
    10421037    {
    1043       if (s==INVALID || t==INVALID) throw UninitializedParameter();
    10441038      Bfs<Digraph,TR> alg(*reinterpret_cast<const Digraph*>(Base::_g));
    10451039      if (Base::_pred)
     
    13241318  public:
    13251319
    1326     /// \brief \ref Exception for uninitialized parameters.
    1327     ///
    1328     /// This error represents problems in the initialization
    1329     /// of the parameters of the algorithm.
    1330     class UninitializedParameter : public lemon::UninitializedParameter {
    1331     public:
    1332       virtual const char* what() const throw()
    1333       {
    1334         return "lemon::BfsVisit::UninitializedParameter";
    1335       }
    1336     };
    1337 
    13381320    ///The traits class.
    13391321    typedef _Traits Traits;
     
    13901372      typedef T ReachedMap;
    13911373      static ReachedMap *createReachedMap(const Digraph &digraph) {
    1392         throw UninitializedParameter();
     1374        LEMON_ASSERT(false, "ReachedMap is not initialized");
     1375        return 0; // ignore warnings
    13931376      }
    13941377    };
  • lemon/bfs.h

    r290 r292  
    13131313  template <typename _Digraph = ListDigraph,
    13141314            typename _Visitor = BfsVisitor<_Digraph>,
    1315             typename _Traits = BfsDefaultTraits<_Digraph> >
     1315            typename _Traits = BfsVisitDefaultTraits<_Digraph> >
    13161316#endif
    13171317  class BfsVisit {
  • lemon/dfs.h

    r288 r292  
    137137  class Dfs {
    138138  public:
    139     ///\ref Exception for uninitialized parameters.
    140 
    141     ///This error represents problems in the initialization of the
    142     ///parameters of the algorithm.
    143     class UninitializedParameter : public lemon::UninitializedParameter {
    144     public:
    145       virtual const char* what() const throw() {
    146         return "lemon::Dfs::UninitializedParameter";
    147       }
    148     };
    149139
    150140    ///The type of the digraph the algorithm runs on.
     
    233223      static PredMap *createPredMap(const Digraph &)
    234224      {
    235         throw UninitializedParameter();
     225        LEMON_ASSERT(false, "PredMap is not initialized");
     226        return 0; // ignore warnings
    236227      }
    237228    };
     
    251242      static DistMap *createDistMap(const Digraph &)
    252243      {
    253         throw UninitializedParameter();
     244        LEMON_ASSERT(false, "DistMap is not initialized");
     245        return 0; // ignore warnings
    254246      }
    255247    };
     
    269261      static ReachedMap *createReachedMap(const Digraph &)
    270262      {
    271         throw UninitializedParameter();
     263        LEMON_ASSERT(false, "ReachedMap is not initialized");
     264        return 0; // ignore warnings
    272265      }
    273266    };
     
    287280      static ProcessedMap *createProcessedMap(const Digraph &)
    288281      {
    289         throw UninitializedParameter();
     282        LEMON_ASSERT(false, "ProcessedMap is not initialized");
     283        return 0; // ignore warnings
    290284      }
    291285    };
     
    975969    bool run(Node s, Node t)
    976970    {
    977       if (s==INVALID || t==INVALID) throw UninitializedParameter();
    978971      Dfs<Digraph,TR> alg(*reinterpret_cast<const Digraph*>(Base::_g));
    979972      if (Base::_pred)
     
    12711264  public:
    12721265
    1273     /// \brief \ref Exception for uninitialized parameters.
    1274     ///
    1275     /// This error represents problems in the initialization
    1276     /// of the parameters of the algorithm.
    1277     class UninitializedParameter : public lemon::UninitializedParameter {
    1278     public:
    1279       virtual const char* what() const throw()
    1280       {
    1281         return "lemon::DfsVisit::UninitializedParameter";
    1282       }
    1283     };
    1284 
    12851266    ///The traits class.
    12861267    typedef _Traits Traits;
     
    13371318      typedef T ReachedMap;
    13381319      static ReachedMap *createReachedMap(const Digraph &digraph) {
    1339         throw UninitializedParameter();
     1320        LEMON_ASSERT(false, "ReachedMap is not initialized");
     1321        return 0; // ignore warnings
    13401322      }
    13411323    };
  • lemon/dfs.h

    r290 r292  
    12591259  template <typename _Digraph = ListDigraph,
    12601260            typename _Visitor = DfsVisitor<_Digraph>,
    1261             typename _Traits = DfsDefaultTraits<_Digraph> >
     1261            typename _Traits = DfsVisitDefaultTraits<_Digraph> >
    12621262#endif
    12631263  class DfsVisit {
Note: See TracChangeset for help on using the changeset viewer.