equal
deleted
inserted
replaced
542 /// computes |
542 /// computes |
543 /// - The shortest path tree. |
543 /// - The shortest path tree. |
544 /// - The distance of each node from the root. |
544 /// - The distance of each node from the root. |
545 /// |
545 /// |
546 /// \note d.run(s) is just a shortcut of the following code. |
546 /// \note d.run(s) is just a shortcut of the following code. |
547 /// \code |
547 ///\code |
548 /// d.init(); |
548 /// d.init(); |
549 /// d.addSource(s); |
549 /// d.addSource(s); |
550 /// d.start(); |
550 /// d.start(); |
551 /// \endcode |
551 ///\endcode |
552 void run(Node s) { |
552 void run(Node s) { |
553 init(); |
553 init(); |
554 addSource(s); |
554 addSource(s); |
555 start(); |
555 start(); |
556 } |
556 } |
563 /// to each node. The algorithm computes |
563 /// to each node. The algorithm computes |
564 /// - The shortest path tree. |
564 /// - The shortest path tree. |
565 /// - The distance of each node from the root. |
565 /// - The distance of each node from the root. |
566 /// |
566 /// |
567 /// \note d.run(s, len) is just a shortcut of the following code. |
567 /// \note d.run(s, len) is just a shortcut of the following code. |
568 /// \code |
568 ///\code |
569 /// d.init(); |
569 /// d.init(); |
570 /// d.addSource(s); |
570 /// d.addSource(s); |
571 /// d.limitedStart(len); |
571 /// d.limitedStart(len); |
572 /// \endcode |
572 ///\endcode |
573 void run(Node s, int len) { |
573 void run(Node s, int len) { |
574 init(); |
574 init(); |
575 addSource(s); |
575 addSource(s); |
576 limitedStart(len); |
576 limitedStart(len); |
577 } |
577 } |
926 /// This function also has several \ref named-templ-func-param |
926 /// This function also has several \ref named-templ-func-param |
927 /// "named parameters", they are declared as the members of class |
927 /// "named parameters", they are declared as the members of class |
928 /// \ref BellmanFordWizard. |
928 /// \ref BellmanFordWizard. |
929 /// The following |
929 /// The following |
930 /// example shows how to use these parameters. |
930 /// example shows how to use these parameters. |
931 /// \code |
931 ///\code |
932 /// bellmanford(g,length,source).predMap(preds).run(); |
932 /// bellmanford(g,length,source).predMap(preds).run(); |
933 /// \endcode |
933 ///\endcode |
934 /// \warning Don't forget to put the \ref BellmanFordWizard::run() "run()" |
934 /// \warning Don't forget to put the \ref BellmanFordWizard::run() "run()" |
935 /// to the end of the parameter list. |
935 /// to the end of the parameter list. |
936 /// \sa BellmanFordWizard |
936 /// \sa BellmanFordWizard |
937 /// \sa BellmanFord |
937 /// \sa BellmanFord |
938 template<class _Graph, class _LengthMap> |
938 template<class _Graph, class _LengthMap> |