Changeset 2399:ccf2a1fa1821 in lemon0.x for lemon
 Timestamp:
 03/07/07 12:57:51 (13 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@3230
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/steiner.h
r2391 r2399 126 126 FilterMap *_filter; 127 127 TreeMap *_tree; 128 129 Value _value; 128 130 129 131 public: … … 248 250 } 249 251 250 prim(nodeSubUGraphAdaptor(_graph, *_filter), _cost, *_tree);252 _value = prim(nodeSubUGraphAdaptor(_graph, *_filter), _cost, *_tree); 251 253 252 254 } … … 269 271 return (*_filter)[n]; 270 272 } 271 272 273 274 /// \brief Checks if the node is a Steinernode. 275 /// 276 /// Checks if the node is a Steinernode (i.e. a tree node but 277 /// not terminal). 278 /// \param n is the node that will be checked 279 /// \return \c true if n is a Steinernode, \c false otherwise 280 bool steiner(Node n){ 281 return (*_filter)[n] && (*_pred)[n] != INVALID; 282 } 283 284 /// \brief Checks if the node is a terminal. 285 /// 286 /// Checks if the node is a terminal. 287 /// \param n is the node that will be checked 288 /// \return \c true if n is a terminal, \c false otherwise 289 bool terminal(Node n){ 290 return _dijkstra.reached(n) && (*_pred)[n] == INVALID; 291 } 292 293 /// \brief The total cost of the tree 294 /// 295 /// The total cost of the constructed tree. The calculated value does 296 /// not exceed the double of the optimal value. 297 Value treeValue() const { 298 return _value; 299 } 300 273 301 }; 274 302
Note: See TracChangeset
for help on using the changeset viewer.