graphmatrixreppositionuos.java

来自「国外的数据结构与算法分析用书」· Java 代码 · 共 38 行

JAVA
38
字号
/* GraphMatrixRepPositionUos.java
 * -------------------------------------------------
 * Copyright (c) 2001 University of Saskatchewan 
 * All Rights Reserved
 * ------------------------------------------------- */

package dslib.graph;

/**	The current position of a graph stored using matrix representation. */
public class GraphMatrixRepPositionUos extends GraphPositionUos
{   
	/**	Construct an object to store the current graph position. <br>
		Analysis: Time = O(1) 
		@param curItem The current vertex
		@param curItemIndex The index of the current vertex
		@param curIterationIndex The index of the vertex whose edges are being iterated
		@param curEItem The current edge
		@param curAdjIndex The index of the vertex at the other end of the current edge */
	public GraphMatrixRepPositionUos (VertexUos curItem, int curItemIndex, int curIterationIndex ,
         EdgeUos curEItem, int curAdjIndex)
	{
		item = curItem;
		itemIndex = curItemIndex;
		iterationIndex = curIterationIndex;
		eItem = curEItem;
		adjIndex = curAdjIndex;
	}

	/**	The current vertex for a search or vertex iteration. */
	public VertexUos item; 
        
	/**	The current edge for a search or edge iteration. */
	public EdgeUos eItem;

	/**	The index of the adjacent vertex in an edge iteration. */
	public int adjIndex;
}

⌨️ 快捷键说明

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