⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 breadthfirstiterator.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_13) on Tue Jun 05 11:36:40 GMT-05:00 2007 --><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>BreadthFirstIterator (Geotools 2.3.x 2.3.2 API)</TITLE><META NAME="keywords" CONTENT="org.geotools.graph.traverse.standard.BreadthFirstIterator class"><META NAME="keywords" CONTENT="setSource()"><META NAME="keywords" CONTENT="init()"><META NAME="keywords" CONTENT="next()"><META NAME="keywords" CONTENT="cont()"><META NAME="keywords" CONTENT="killBranch()"><META NAME="keywords" CONTENT="buildQueue()"><META NAME="keywords" CONTENT="getQueue()"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="BreadthFirstIterator (Geotools 2.3.x 2.3.2 API)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BreadthFirstIterator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstTopologicalIterator.html" title="class in org.geotools.graph.traverse.standard"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="BreadthFirstIterator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.geotools.graph.traverse.standard</FONT><BR>Class BreadthFirstIterator</H2><PRE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../../org/geotools/graph/traverse/basic/AbstractGraphIterator.html" title="class in org.geotools.graph.traverse.basic">AbstractGraphIterator</A>      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../../org/geotools/graph/traverse/basic/SourceGraphIterator.html" title="class in org.geotools.graph.traverse.basic">SourceGraphIterator</A>          <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>BreadthFirstIterator</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/geotools/graph/traverse/GraphIterator.html" title="interface in org.geotools.graph.traverse">GraphIterator</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/geotools/graph/traverse/standard/DepthFirstIterator.html" title="class in org.geotools.graph.traverse.standard">DepthFirstIterator</A>, <A HREF="../../../../../org/geotools/graph/traverse/standard/DirectedBreadthFirstIterator.html" title="class in org.geotools.graph.traverse.standard">DirectedBreadthFirstIterator</A></DD></DL><HR><DL><DT>public class <B>BreadthFirstIterator</B><DT>extends <A HREF="../../../../../org/geotools/graph/traverse/basic/SourceGraphIterator.html" title="class in org.geotools.graph.traverse.basic">SourceGraphIterator</A></DL><P>Iterates over the nodes of a graph in a <B>Breadth First Search</B> pattern  starting from a specified node. The following illustrates the iteration  order. <BR> <BR> <IMG src="doc-files/bfs.gif"/><BR> <BR> The iteration operates by maintaning a node queue of <B>active</B> nodes.   An <B>active</B> node is a node that will returned at a later stage of the i teration. The node queue for a Breadth First iteration is implemented as a  <B>First In First Out</B> queue. A node is placed in the the node queue if it has not been visited, and  it is adjacent to a a node that has been visited. The node queue intially  contains only the source node of the traversal.<P><P><DL><DT><B>Author:</B></DT>  <DD>Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net</DD><DT><B>Module:</B></DT><DD><CODE><B>ext/graph</B></CODE> &nbsp; (<A HREF="http://maven.geotools.fr/repository/org/geotools/gt2-graph/"><CODE>gt2-graph.jar</CODE></A>) (<A HREF="http://maven.geotools.fr/reports/graph/index.html">Maven report</A>) (<A HREF="http://svn.geotools.org/geotools/tags/2.3.2/ext/graph/src/org/geotools/graph/traverse/standard/BreadthFirstIterator.java">SVN head</A>)</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstIterator.html#BreadthFirstIterator()">BreadthFirstIterator</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../../org/geotools/graph/util/Queue.html" title="interface in org.geotools.graph.util">Queue</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstIterator.html#buildQueue(org.geotools.graph.structure.Graph)">buildQueue</A></B>(<A HREF="../../../../../org/geotools/graph/structure/Graph.html" title="interface in org.geotools.graph.structure">Graph</A>&nbsp;graph)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Builds the node queue for the iteration.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstIterator.html#cont(org.geotools.graph.structure.Graphable, org.geotools.graph.traverse.GraphTraversal)">cont</A></B>(<A HREF="../../../../../org/geotools/graph/structure/Graphable.html" title="interface in org.geotools.graph.structure">Graphable</A>&nbsp;current,     <A HREF="../../../../../org/geotools/graph/traverse/GraphTraversal.html" title="interface in org.geotools.graph.traverse">GraphTraversal</A>&nbsp;traversal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Looks for nodes adjacent to the current node to place into the node queue.  </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../../org/geotools/graph/util/Queue.html" title="interface in org.geotools.graph.util">Queue</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstIterator.html#getQueue()">getQueue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the node queue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstIterator.html#init(org.geotools.graph.structure.Graph, org.geotools.graph.traverse.GraphTraversal)">init</A></B>(<A HREF="../../../../../org/geotools/graph/structure/Graph.html" title="interface in org.geotools.graph.structure">Graph</A>&nbsp;graph,     <A HREF="../../../../../org/geotools/graph/traverse/GraphTraversal.html" title="interface in org.geotools.graph.traverse">GraphTraversal</A>&nbsp;traversal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does nothing.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstIterator.html#killBranch(org.geotools.graph.structure.Graphable, org.geotools.graph.traverse.GraphTraversal)">killBranch</A></B>(<A HREF="../../../../../org/geotools/graph/structure/Graphable.html" title="interface in org.geotools.graph.structure">Graphable</A>&nbsp;current,           <A HREF="../../../../../org/geotools/graph/traverse/GraphTraversal.html" title="interface in org.geotools.graph.traverse">GraphTraversal</A>&nbsp;traversal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kills the current branch by not looking for any adjacent nodes to place into the node queue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/geotools/graph/structure/Graphable.html" title="interface in org.geotools.graph.structure">Graphable</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstIterator.html#next(org.geotools.graph.traverse.GraphTraversal)">next</A></B>(<A HREF="../../../../../org/geotools/graph/traverse/GraphTraversal.html" title="interface in org.geotools.graph.traverse">GraphTraversal</A>&nbsp;traversal)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the next node from the node queue that has not yet been visited. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/graph/traverse/standard/BreadthFirstIterator.html#setSource(org.geotools.graph.structure.Graphable)">setSource</A></B>(<A HREF="../../../../../org/geotools/graph/structure/Graphable.html" title="interface in org.geotools.graph.structure">Graphable</A>&nbsp;source)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the source of the traversal and places it in the node queue. </TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_SourceGraphIterator"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -