Changeset 1762:3915867b6975 in lemon-0.x for lemon
- Timestamp:
- 11/04/05 14:53:22 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2294
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/preflow.h
r1742 r1762 21 21 #include <queue> 22 22 23 #include <lemon/error.h> 23 24 #include <lemon/invalid.h> 24 25 #include <lemon/maps.h> … … 89 90 static const int H1=1; 90 91 92 public: 93 94 ///\ref Exception for the case when s=t. 95 96 ///\ref Exception for the case when the source equals the target. 97 class InvalidArgument : public lemon::LogicError { 91 98 public: 92 99 virtual const char* exceptionName() const { 100 return "lemon::Preflow::InvalidArgument"; 101 } 102 }; 103 104 93 105 ///Indicates the property of the starting flow map. 94 106 95 107 ///Indicates the property of the starting flow map. 96 108 ///The meanings are as follows: … … 127 139 }; 128 140 129 130 141 protected: 142 FlowEnum flow_prop; 131 143 StatusEnum status; // Do not needle this flag only if necessary. 132 144 … … 147 159 _g(&_gr), _source(_s), _target(_t), _capacity(&_cap), 148 160 _flow(&_f), _node_num(countNodes(_gr)), level(_gr), excess(_gr,0), 149 flow_prop(NO_FLOW), status(AFTER_NOTHING) { } 150 161 flow_prop(NO_FLOW), status(AFTER_NOTHING) { 162 if ( _source==_target ) 163 throw InvalidArgument(); 164 } 165 151 166 152 167
Note: See TracChangeset
for help on using the changeset viewer.