astar_heuristic.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <HTML>
  2. <!--
  3. Copyright (c) 2004 Kris Beevers
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. -->
  8. <Head>
  9. <Title>Boost Graph Library: astar_heuristic</Title>
  10. <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
  11. ALINK="#ff0000">
  12. <IMG SRC="../../../boost.png"
  13. ALT="C++ Boost" width="277" height="86">
  14. <BR Clear>
  15. <H1>
  16. <pre>
  17. astar_heuristic&lt;Graph, CostType&gt;
  18. </pre>
  19. </H1>
  20. This class is a default implementation of the <a
  21. href="./AStarHeuristic.html">AStarHeuristic</a> concept. It
  22. implements a "zero" heuristic -- a heuristic function that returns a
  23. cost of zero regardless of the vertex it is passed.
  24. <h3>Model of</h3>
  25. <a href="./AStarHeuristic.html">AStarHeuristic</a>
  26. <H3>Template Parameters</H3>
  27. <P>
  28. <TABLE border>
  29. <TR>
  30. <th>Parameter</th><th>Description</th><th>Default</th>
  31. </tr>
  32. <TR><TD><TT>Graph</TT></TD>
  33. <TD>
  34. The type of the graph being searched.
  35. </TD>
  36. <TD></TD>
  37. </TR>
  38. <TR><TD><TT>CostType</TT></TD>
  39. <TD>
  40. A type that can be used with the <tt>compare</tt> and
  41. <tt>combine</tt> functions passed to A*. Typically an integer or
  42. floating point type.
  43. </TD>
  44. <TD></TD>
  45. </TR>
  46. </table>
  47. <H3>Where Defined</H3>
  48. <P>
  49. <a href="../../../boost/graph/astar_search.hpp">
  50. <TT>boost/graph/astar_search.hpp</TT></a>
  51. <h3>Member Functions</h3>
  52. This class implements the single member function required by <a
  53. href="./AStarHeuristic.html">AStarHeuristic</a>:
  54. <table border>
  55. <tr>
  56. <th>Function</th><th>Description</th>
  57. </tr>
  58. <tr><td><tt>
  59. CostType operator()(graph_traits&lt;Graph&gt;::vertex_descriptor u);
  60. </tt></td><td>
  61. Called for the target of every out edge of a vertex being examined.
  62. Returns the cost, estimated by the heuristic, from vertex <tt>u</tt>
  63. to a goal.
  64. </td></tr>
  65. </table>
  66. <br>
  67. <HR>
  68. <TABLE>
  69. <TR valign=top>
  70. <TD nowrap>Copyright &copy; 2004</TD><TD>
  71. <A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
  72. Rensselaer Polytechnic Institute (<A
  73. HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
  74. </TD></TR></TABLE>
  75. </BODY>
  76. </HTML>