📄 graphmatrix.html
字号:
<DT><B>Parameters:</B><DD><CODE>label1</CODE> - The first (or source, if directed) vertex.<DD><CODE>label2</CODE> - The second (or destination, if directed) vertex.<DT><B>Postcondition:</B><DD>returns actual edge between vertices<DT><B>Returns:</B><DD>The edge, if found, or null.</DL></DD></DL><HR><A NAME="contains(java.lang.Object)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Test for vertex membership.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#contains(java.lang.Object)">contains</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractStructure.html#contains(java.lang.Object)">contains</A></CODE> in class <CODE><A HREF="../structure/AbstractStructure.html">AbstractStructure</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>label</CODE> - The label of the vertex sought.<DT><B>Postcondition:</B><DD>returns true iff vertex with "equals" label exists<DT><B>Returns:</B><DD>True iff vertex with matching label is found.</DL></DD></DL><HR><A NAME="containsEdge(java.lang.Object, java.lang.Object)"><!-- --></A><H3>containsEdge</H3><PRE>public boolean <B>containsEdge</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> vLabel1, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> vLabel2)</PRE><DL><DD>Test for edge membership. If edges are directed, vLabel1 indicates source.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#containsEdge(java.lang.Object, java.lang.Object)">containsEdge</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>vLabel1</CODE> - First (or source, if directed) vertex.<DD><CODE>vLabel2</CODE> - Second (or destination, if directed) vertex.<DT><B>Postcondition:</B><DD>returns true iff edge with "equals" label exists<DT><B>Returns:</B><DD>True iff the edge exists within the graph.</DL></DD></DL><HR><A NAME="visit(java.lang.Object)"><!-- --></A><H3>visit</H3><PRE>public boolean <B>visit</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Test and set visited flag of vertex.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#visit(java.lang.Object)">visit</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>label</CODE> - Label of vertex to be visited.<DT><B>Postcondition:</B><DD>sets visited flag on vertex, returns previous value<DT><B>Returns:</B><DD>Previous value of visited flag on vertex.</DL></DD></DL><HR><A NAME="visitEdge(structure.Edge)"><!-- --></A><H3>visitEdge</H3><PRE>public boolean <B>visitEdge</B>(<A HREF="../structure/Edge.html">Edge</A> e)</PRE><DL><DD>Test and set visited flag of edge.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#visitEdge(structure.Edge)">visitEdge</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - Edge object that is part of graph.<DT><B>Precondition:</B><DD>sets visited flag on edge; returns previous value<DT><B>Returns:</B><DD>Previous value of the Edge's visited flag.</DL></DD></DL><HR><A NAME="isVisited(java.lang.Object)"><!-- --></A><H3>isVisited</H3><PRE>public boolean <B>isVisited</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Return visited flag of vertex.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#isVisited(java.lang.Object)">isVisited</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>label</CODE> - Label of vertex.<DT><B>Postcondition:</B><DD>returns visited flag on labeled vertex<DT><B>Returns:</B><DD>True if vertex has been visited.</DL></DD></DL><HR><A NAME="isVisitedEdge(structure.Edge)"><!-- --></A><H3>isVisitedEdge</H3><PRE>public boolean <B>isVisitedEdge</B>(<A HREF="../structure/Edge.html">Edge</A> e)</PRE><DL><DD>Return visited flag of edge.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#isVisitedEdge(structure.Edge)">isVisitedEdge</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - Edge of graph to be considered.<DT><B>Postcondition:</B><DD>returns visited flag on edge between vertices<DT><B>Returns:</B><DD>True if the edge has been visited.</DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>()</PRE><DL><DD>Clear visited flags of edges and vertices.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#reset()">reset</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>resets visited flags to false</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Determine number of vertices within graph.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#size()">size</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns the number of vertices in graph<DT><B>Returns:</B><DD>The number of vertices within graph.</DL></DD></DL><HR><A NAME="degree(java.lang.Object)"><!-- --></A><H3>degree</H3><PRE>public int <B>degree</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Determine out degree of vertex.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#degree(java.lang.Object)">degree</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>label</CODE> - Label associated with vertex.<DT><B>Precondition:</B><DD>label labels an existing vertex<DT><B>Postcondition:</B><DD>returns the number of vertices adjacent to vertex<DT><B>Returns:</B><DD>The number of edges with this vertex as source.</DL></DD></DL><HR><A NAME="edgeCount()"><!-- --></A><H3>edgeCount</H3><PRE>public abstract int <B>edgeCount</B>()</PRE><DL><DD>Determine the number of edges in graph.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#edgeCount()">edgeCount</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns the number of edges in graph<DT><B>Returns:</B><DD>Number of edges in graph.</DL></DD></DL><HR><A NAME="iterator()"><!-- --></A><H3>iterator</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html">Iterator</A> <B>iterator</B>()</PRE><DL><DD>Construct vertex traversal. Vertices are not visited in any guaranteed order.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns traversal across all vertices of graph<DT><B>Returns:</B><DD>AbstractIterator traversing vertices in graph.</DL></DD></DL><HR><A NAME="neighbors(java.lang.Object)"><!-- --></A><H3>neighbors</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html">Iterator</A> <B>neighbors</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Construct an adjacent vertex traversal. Adjacent vertices (those on destination of edge, if directed) are considered, but not in any guaranteed order.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#neighbors(java.lang.Object)">neighbors</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>label</CODE> - Label of the vertex.<DT><B>Precondition:</B><DD>label is label of vertex in graph<DT><B>Postcondition:</B><DD>returns traversal over vertices adj. to vertex each edge beginning at label visited exactly once<DT><B>Returns:</B><DD>AbstractIterator traversing the adjacent vertices of labeled vertex.</DL></DD></DL><HR><A NAME="edges()"><!-- --></A><H3>edges</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html">Iterator</A> <B>edges</B>()</PRE><DL><DD>Construct an traversal over all edges. Every directed/undirected edge is considered exactly once. Order is not guaranteed.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#edges()">edges</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns traversal across edges of graph traversal returns edges; each edge visited once<DT><B>Returns:</B><DD>AbstractIterator over edges.</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Remove all vertices (and thus, edges) of the graph.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#clear()">clear</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>removes all vertices from graph</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Determine if graph is empty.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#isEmpty()">isEmpty</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../structure/AbstractStructure.html#isEmpty()">isEmpty</A></CODE> in class <CODE><A HREF="../structure/AbstractStructure.html">AbstractStructure</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns true if graph contains no vertices<DT><B>Returns:</B><DD>True iff there are no vertices in graph.</DL></DD></DL><HR><A NAME="isDirected()"><!-- --></A><H3>isDirected</H3><PRE>public boolean <B>isDirected</B>()</PRE><DL><DD>Determine if graph is directed.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#isDirected()">isDirected</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Postcondition:</B><DD>returns true if edges of graph are directed<DT><B>Returns:</B><DD>True iff the graph is directed.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href=../copyright.html target=_top>© 1998-2002 McGraw-Hill</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../structure/GraphListVertex.html"><B>PREV CLASS</B></A> <A HREF="../structure/GraphMatrixDirected.html"><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> <A HREF="GraphMatrix.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -