Changeset 290:f6899946c1ac in lemon-1.2 for lemon/dfs.h
- Timestamp:
- 09/30/08 20:53:18 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/dfs.h
r287 r290 137 137 class Dfs { 138 138 public: 139 ///\ref Exception for uninitialized parameters.140 141 ///This error represents problems in the initialization of the142 ///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 };149 139 150 140 ///The type of the digraph the algorithm runs on. … … 233 223 static PredMap *createPredMap(const Digraph &) 234 224 { 235 throw UninitializedParameter(); 225 LEMON_ASSERT(false, "PredMap is not initialized"); 226 return 0; // ignore warnings 236 227 } 237 228 }; … … 251 242 static DistMap *createDistMap(const Digraph &) 252 243 { 253 throw UninitializedParameter(); 244 LEMON_ASSERT(false, "DistMap is not initialized"); 245 return 0; // ignore warnings 254 246 } 255 247 }; … … 269 261 static ReachedMap *createReachedMap(const Digraph &) 270 262 { 271 throw UninitializedParameter(); 263 LEMON_ASSERT(false, "ReachedMap is not initialized"); 264 return 0; // ignore warnings 272 265 } 273 266 }; … … 287 280 static ProcessedMap *createProcessedMap(const Digraph &) 288 281 { 289 throw UninitializedParameter(); 282 LEMON_ASSERT(false, "ProcessedMap is not initialized"); 283 return 0; // ignore warnings 290 284 } 291 285 }; … … 975 969 bool run(Node s, Node t) 976 970 { 977 if (s==INVALID || t==INVALID) throw UninitializedParameter();978 971 Dfs<Digraph,TR> alg(*reinterpret_cast<const Digraph*>(Base::_g)); 979 972 if (Base::_pred) … … 1271 1264 public: 1272 1265 1273 /// \brief \ref Exception for uninitialized parameters.1274 ///1275 /// This error represents problems in the initialization1276 /// 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 1285 1266 ///The traits class. 1286 1267 typedef _Traits Traits; … … 1337 1318 typedef T ReachedMap; 1338 1319 static ReachedMap *createReachedMap(const Digraph &digraph) { 1339 throw UninitializedParameter(); 1320 LEMON_ASSERT(false, "ReachedMap is not initialized"); 1321 return 0; // ignore warnings 1340 1322 } 1341 1323 };
Note: See TracChangeset
for help on using the changeset viewer.