classalgo_1_1KShortestPaths.tex 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. \hypertarget{classalgo_1_1KShortestPaths}{}\section{algo\+:\+:K\+Shortest\+Paths Class Reference}
  2. \label{classalgo_1_1KShortestPaths}\index{algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}}
  3. {\ttfamily \#include $<$K\+Shortest\+Paths.\+h$>$}
  4. \subsection*{Public Member Functions}
  5. \begin{DoxyCompactItemize}
  6. \item
  7. \hyperlink{classalgo_1_1KShortestPaths_ad8654c43c8354f734870ec98783f9756}{K\+Shortest\+Paths} (Directed\+Graph input\+\_\+graph, Vertex source, Vertex sink)
  8. \item
  9. void \hyperlink{classalgo_1_1KShortestPaths_a4ad79f2618bf3fc36b591ff69efd3c76}{Run} (size\+\_\+t max\+\_\+path\+\_\+count)
  10. \item
  11. void \hyperlink{classalgo_1_1KShortestPaths_a6af47b5af40e75786924941b3472ada2}{Get\+Paths} (std\+::vector$<$ std\+::vector$<$ Vertex $>$$>$ \&paths)
  12. \end{DoxyCompactItemize}
  13. \subsection{Detailed Description}
  14. Finds the k-\/shortest paths in a specified graph, from the source vertex to the sink vertex. The algorithm provides a global optimal path, thus reducing the overall sum of all path costs in trade off for higher cost of one single path.
  15. \subsection{Constructor \& Destructor Documentation}
  16. \index{algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}!K\+Shortest\+Paths@{K\+Shortest\+Paths}}
  17. \index{K\+Shortest\+Paths@{K\+Shortest\+Paths}!algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}}
  18. \subsubsection[{\texorpdfstring{K\+Shortest\+Paths(\+Directed\+Graph input\+\_\+graph, Vertex source, Vertex sink)}{KShortestPaths(DirectedGraph input\_graph, Vertex source, Vertex sink)}}]{\setlength{\rightskip}{0pt plus 5cm}algo\+::\+K\+Shortest\+Paths\+::\+K\+Shortest\+Paths (
  19. \begin{DoxyParamCaption}
  20. \item[{Directed\+Graph}]{input\+\_\+graph, }
  21. \item[{Vertex}]{source, }
  22. \item[{Vertex}]{sink}
  23. \end{DoxyParamCaption}
  24. )}\hypertarget{classalgo_1_1KShortestPaths_ad8654c43c8354f734870ec98783f9756}{}\label{classalgo_1_1KShortestPaths_ad8654c43c8354f734870ec98783f9756}
  25. Initializes the algorithm for the specified graph with the specified source and sink vertex to find a path between.
  26. \begin{DoxyParams}{Parameters}
  27. {\em input\+\_\+graph} & The graph to work with (will not be altered) \\
  28. \hline
  29. {\em source} & The vertex to start all path searches from \\
  30. \hline
  31. {\em sink} & The vertex to end all path searches at \\
  32. \hline
  33. \end{DoxyParams}
  34. \subsection{Member Function Documentation}
  35. \index{algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}!Get\+Paths@{Get\+Paths}}
  36. \index{Get\+Paths@{Get\+Paths}!algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}}
  37. \subsubsection[{\texorpdfstring{Get\+Paths(std\+::vector$<$ std\+::vector$<$ Vertex $>$$>$ \&paths)}{GetPaths(std::vector< std::vector< Vertex >> \&paths)}}]{\setlength{\rightskip}{0pt plus 5cm}void algo\+::\+K\+Shortest\+Paths\+::\+Get\+Paths (
  38. \begin{DoxyParamCaption}
  39. \item[{std\+::vector$<$ std\+::vector$<$ Vertex $>$$>$ \&}]{paths}
  40. \end{DoxyParamCaption}
  41. )}\hypertarget{classalgo_1_1KShortestPaths_a6af47b5af40e75786924941b3472ada2}{}\label{classalgo_1_1KShortestPaths_a6af47b5af40e75786924941b3472ada2}
  42. Gets the last found paths.
  43. \begin{DoxyParams}{Parameters}
  44. {\em paths} & The vector to store all found paths in \\
  45. \hline
  46. \end{DoxyParams}
  47. \index{algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}!Run@{Run}}
  48. \index{Run@{Run}!algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}}
  49. \subsubsection[{\texorpdfstring{Run(size\+\_\+t max\+\_\+path\+\_\+count)}{Run(size\_t max\_path\_count)}}]{\setlength{\rightskip}{0pt plus 5cm}void algo\+::\+K\+Shortest\+Paths\+::\+Run (
  50. \begin{DoxyParamCaption}
  51. \item[{size\+\_\+t}]{max\+\_\+path\+\_\+count}
  52. \end{DoxyParamCaption}
  53. )}\hypertarget{classalgo_1_1KShortestPaths_a4ad79f2618bf3fc36b591ff69efd3c76}{}\label{classalgo_1_1KShortestPaths_a4ad79f2618bf3fc36b591ff69efd3c76}
  54. Runs the algorithm to store the specified number of paths. These paths can later be retrieved by the Get\+Paths method.
  55. \begin{DoxyParams}{Parameters}
  56. {\em max\+\_\+path\+\_\+count} & The number of paths to find \\
  57. \hline
  58. \end{DoxyParams}
  59. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  60. \item
  61. algo/K\+Shortest\+Paths.\+h\item
  62. algo/K\+Shortest\+Paths.\+cpp\end{DoxyCompactItemize}