graphlinkedreppositionuos.java

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

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

package dslib.graph;

import dslib.base.*;

/**	The current position of a graph stored using linked representation. */
public class GraphLinkedRepPositionUos 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 curListPosition The cursor recording the present position in the list being iterated */
	public GraphLinkedRepPositionUos (VertexUos curItem, int curItemIndex, int curIterationIndex ,
         EdgeUos curEItem, CursorUos curListPosition)
	{
		item = curItem;
		itemIndex = curItemIndex;
		iterationIndex = curIterationIndex;
		eItem = curEItem;
		listPosition = curListPosition;
	}

	/**	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 position in the edge list being iterated. */
	public CursorUos listPosition;
}

⌨️ 快捷键说明

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