| 450 | } |
| 451 | |
| 452 | node graph::center() const |
| 453 | { |
| 454 | int min_excentricity = number_of_nodes()+1; |
| 455 | node n, center; |
| 456 | forall_nodes(n, *this) |
| 457 | { |
| 458 | int excentricity = n.excentricity(); |
| 459 | if(excentricity < min_excentricity) |
| 460 | { |
| 461 | center = n; |
| 462 | min_excentricity = excentricity; |
| 463 | } |
| 464 | } |
| 465 | return center; |
| 466 | } |
| 467 | |
| 468 | //-------------------------------------------------------------------------- |
| 469 | // Iterators |
nothing calls this directly
no test coverage detected