?? graphmatrix.html
字號:
<BR> Return visited flag of vertex.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#isVisitedEdge(structure.Edge)">isVisitedEdge</A></B>(<A HREF="../structure/Edge.html">Edge</A> e)</CODE><BR> Return visited flag of edge.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html">Iterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#iterator()">iterator</A></B>()</CODE><BR> Construct vertex traversal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html">Iterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#neighbors(java.lang.Object)">neighbors</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</CODE><BR> Construct an adjacent vertex traversal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#remove(java.lang.Object)">remove</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</CODE><BR> Remove a vertex from the graph.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#removeEdge(java.lang.Object, java.lang.Object)">removeEdge</A></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)</CODE><BR> Remove possible edge between vertices labeled vLabel1 and vLabel2.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#reset()">reset</A></B>()</CODE><BR> Clear visited flags of edges and vertices.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#size()">size</A></B>()</CODE><BR> Determine number of vertices within graph.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#visit(java.lang.Object)">visit</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</CODE><BR> Test and set visited flag of vertex.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../structure/GraphMatrix.html#visitEdge(structure.Edge)">visitEdge</A></B>(<A HREF="../structure/Edge.html">Edge</A> e)</CODE><BR> Test and set visited flag of edge.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_structure.AbstractStructure"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class structure.<A HREF="../structure/AbstractStructure.html">AbstractStructure</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../structure/AbstractStructure.html#elements()">elements</A>, <A HREF="../structure/AbstractStructure.html#hashCode()">hashCode</A>, <A HREF="../structure/AbstractStructure.html#values()">values</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#<clinit>()"><clinit></A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#registerNatives()">registerNatives</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_structure.Structure"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface structure.<A HREF="../structure/Structure.html">Structure</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../structure/Structure.html#elements()">elements</A>, <A HREF="../structure/Structure.html#values()">values</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="size"><!-- --></A><H3>size</H3><PRE>protected int <B>size</B></PRE><DL><DD>Number of vertices in graph.</DL><HR><A NAME="data"><!-- --></A><H3>data</H3><PRE>protected <A HREF="../structure/Edge.html">Edge</A>[][] <B>data</B></PRE><DL><DD>The edge data. Every edge appears on one (directed) or two (undirected) locations within graph.</DL><HR><A NAME="dict"><!-- --></A><H3>dict</H3><PRE>protected <A HREF="../structure/Map.html">Map</A> <B>dict</B></PRE><DL><DD>Translation between vertex labels and vertex structures.</DL><HR><A NAME="freeList"><!-- --></A><H3>freeList</H3><PRE>protected <A HREF="../structure/List.html">List</A> <B>freeList</B></PRE><DL><DD>List of free vertex indices within graph.</DL><HR><A NAME="directed"><!-- --></A><H3>directed</H3><PRE>protected boolean <B>directed</B></PRE><DL><DD>Whether or not graph is directed.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="GraphMatrix(int, boolean)"><!-- --></A><H3>GraphMatrix</H3><PRE>protected <B>GraphMatrix</B>(int size, boolean dir)</PRE><DL><DD>Constructor of directed/undirected GraphMatrix. Protected constructor.<DD><DL><DT><B>Parameters:</B><DD><CODE>size</CODE> - Maximum size of graph.<DD><CODE>dir</CODE> - True if graph is to be directed.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="add(java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public void <B>add</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Add a vertex to the graph.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#add(java.lang.Object)">add</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; should be non-null.<DT><B>Precondition:</B><DD>label is a non-null label for vertex<DT><B>Postcondition:</B><DD>a vertex with label is added to graph; if vertex with label is already in graph, no action</DL></DD></DL><HR><A NAME="addEdge(java.lang.Object, java.lang.Object, java.lang.Object)"><!-- --></A><H3>addEdge</H3><PRE>public abstract void <B>addEdge</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> v1, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> v2, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Add an edge between two vertices within the graph. Edge is directed iff graph is directed. Duplicate edges are silently replaced. Labels on edges may be null.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#addEdge(java.lang.Object, java.lang.Object, java.lang.Object)">addEdge</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>vtx1</CODE> - First (or source, if directed) vertex.<DD><CODE>vtx2</CODE> - Second (or destination, if directed) vertex.<DD><CODE>label</CODE> - Label associated with the edge.<DT><B>Precondition:</B><DD>vtx1 and vtx2 are labels of existing vertices<DT><B>Postcondition:</B><DD>an edge (possibly directed) is inserted between vtx1 and vtx2.</DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>remove</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Remove a vertex from the graph. Associated edges are also removed. Non-vertices are silently ignored.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#remove(java.lang.Object)">remove</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> - The label of the vertex within the graph.<DT><B>Precondition:</B><DD>label is non-null vertex label<DT><B>Postcondition:</B><DD>vertex with "equals" label is removed, if found<DT><B>Returns:</B><DD>The label associated with the vertex.</DL></DD></DL><HR><A NAME="removeEdge(java.lang.Object, java.lang.Object)"><!-- --></A><H3>removeEdge</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>removeEdge</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>Remove possible edge between vertices labeled vLabel1 and vLabel2. Directed edges consider vLabel1 to be the source.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#removeEdge(java.lang.Object, java.lang.Object)">removeEdge</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>Precondition:</B><DD>vLabel1 and vLabel2 are labels of existing vertices<DT><B>Postcondition:</B><DD>edge is removed, its label is returned<DT><B>Returns:</B><DD>The label associated with the edge removed.</DL></DD></DL><HR><A NAME="get(java.lang.Object)"><!-- --></A><H3>get</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>get</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label)</PRE><DL><DD>Get reference to actual label of vertex. Vertex labels are matched using their equals method, which may or may not test for actual equivalence. Result remains part of graph.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#get(java.lang.Object)">get</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> - The label of the vertex sought.<DT><B>Postcondition:</B><DD>returns actual label of indicated vertex<DT><B>Returns:</B><DD>The actual label, or null if none is found.</DL></DD></DL><HR><A NAME="getEdge(java.lang.Object, java.lang.Object)"><!-- --></A><H3>getEdge</H3><PRE>public <A HREF="../structure/Edge.html">Edge</A> <B>getEdge</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label1, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> label2)</PRE><DL><DD>Get reference to actual edge. Edge is identified by the labels on associated vertices. If edge is directed, the label1 indicates source.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../structure/Graph.html#getEdge(java.lang.Object, java.lang.Object)">getEdge</A></CODE> in interface <CODE><A HREF="../structure/Graph.html">Graph</A></CODE></DL></DD><DD><DL>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -