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

📄 graphmatrixvertex.java

📁 赫夫曼编译码器: 用哈夫曼编码进行通信可以大大提高信道利用率
💻 JAVA
字号:
package structure;/** * A private implementation of a vertex for use in graphs that * are internally represented as a Matrix.  A vertex * is capable of holding a label and has a flag that can be set   * to mark it as visited.    * <P> * Typical Usage: * <P> * <pre> *     Vertex v = new {@link #GraphMatrixVertex(Object, int) Vertex(someLabel)}; *     //...several graph related operations occur *     if(!v.{@link #isVisited() isVisited()}){ *         Object label = v.label(); *         v.{@link #visit() visit()}; *     } * </pre> * @see GraphListVertex * @see Vertex * @version $Id: GraphMatrix.java,v 4.0 2000/12/27 20:57:33 bailey Exp bailey $ * @author, 2001 duane a. bailey */class GraphMatrixVertex extends Vertex {    protected int index;    /**     * @post constructs a new augmented vertex     *      * @param label      * @param idx      */    public GraphMatrixVertex(Object label, int idx)    {	super(label);	index = idx;    }    /**     * @post returns index associated with vertex     *      * @return      */    public int index()    {	return index;    }    /**     * @post returns string representation of vertex     *      * @return      */    public String toString()    {	return "<GraphMatrixVertex: "+label()+">";    }}

⌨️ 快捷键说明

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