linkedlistgraph.java

来自「最短路径和哈密顿通路」· Java 代码 · 共 25 行

JAVA
25
字号


public class LinkedListGraph extends UnorderedLinkedList{
	public LinkedListGraph()
	{
		super();
	}
	public LinkedListGraph(LinkedListGraph otherGraph)
	{
		super(otherGraph);
	}
	public int getAdjacentVertices(DataElement []adjacencyList)
	{
		LinkedListNode current;
		int length=0;
		current=first;
		while(current!=null)
		{
			adjacencyList[length++]=current.info;
			current=current.link;
		}
		return length;
	}
}

⌨️ 快捷键说明

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