摘要: namespace DSList{ //有向图邻接表类(Directed Graph Adjacency List Class) public class DireGraAdjList<T> : IDireGraph<T> { private ALVexNode<T>[] adjList; public ALVexNode<T> this[int index] { get { return adjList[index]; } set { adjList[index] = value; } } public DireGraAdjList(GvNod 阅读全文
posted @ 2011-03-27 13:15 山之松 阅读(148) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //有向图邻接矩阵类(Directed Graph Adjacency Matrix Class) public class DireGraAdjMatrix<T> : IDireGraph<T> { //Fields private GvNode<T>[] nodes; private int numArcs; private int[,] matrix; //Constructor public DireGraAdjMatrix(int n) { nodes = new GvNode<T>[n]; numA 阅读全文
posted @ 2011-03-27 13:14 山之松 阅读(330) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //有向网邻接表类(Directed Net Adjacency List Class) public class DireNetAdjList<T> : IDireGraph<T> { //Field private ALVexNode<T>[] adjList; //Property public ALVexNode<T> this[int index] { get { return adjList[index]; } set { adjList[index] = value; } } //Construc 阅读全文
posted @ 2011-03-27 13:12 山之松 阅读(279) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //无向网邻接表类(Undirected Net Adjacency List Class) public class NetAdjList<T> : IGraph<T> { //Field private ALVexNode<T>[] adjList; //vertex array //Property public ALVexNode<T> this[int index] { get { return adjList[index]; } set { adjList[index] = value; } } / 阅读全文
posted @ 2011-03-27 13:10 山之松 阅读(203) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //有向网邻接矩阵类(Directed Net Adjacency Matrix Class) public class DireNetAdjMatrix<T> : IDireGraph<T> { //Fields private GvNode<T>[] nodes; //有向网的顶点数组 private int numArcs; //弧的数目 private int[,] matrix; //邻接矩阵数组 //Constructor public DireNetAdjMatrix(int n) { nodes = new 阅读全文
posted @ 2011-03-27 13:06 山之松 阅读(369) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //无向网邻接矩阵类(Undirected Net Adjacency Matrix Class) public class NetAdjMatrix<T> : IGraph<T> { //Fields private GvNode<T>[] nodes; private int numEdges; private int[,] matrix; //Constructor public NetAdjMatrix(int n) { nodes = new GvNode<T>[n]; matrix = new in 阅读全文
posted @ 2011-03-27 12:57 山之松 阅读(168) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //无向图邻接表类(Undirected Graph Adjacency List Class) public class GraphAdjList<T> : IGraph<T> { //Fields private ALVexNode<T>[] adjList; //Vertex array private int[] visited; //Auxiliary array of DFS() or BFS() //Property public ALVexNode<T> this[int index] { ge 阅读全文
posted @ 2011-03-27 12:54 山之松 阅读(289) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //无向图邻接表的顶点结点类(Undirected Graph Adjacency List of Vertex Node) public class ALVexNode<T> { private GvNode<T> data; private AdjListNode<T> firstAdj; public GvNode<T> Data { get { return data; } set { data = value; } } public AdjListNode<T> FirstAdj { ge 阅读全文
posted @ 2011-03-27 12:52 山之松 阅读(256) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //无向图邻接表的邻接结点类(Undirected Graph Adjacency List of Adjaceney Node) public class AdjListNode<T> { private int adjVex; private AdjListNode<T> next; private int weight; public int AdjVex { get { return adjVex; } set { adjVex = value; } } public AdjListNode<T> Next { g 阅读全文
posted @ 2011-03-27 12:49 山之松 阅读(181) 评论(0) 推荐(0) 编辑
摘要: namespace DSList{ //无向图邻接矩阵类(Undirected Graph Adjacency Matrix Class) public class GraphAdjMatrix<T> : IGraph<T> { //Fields private GvNode<T>[] nodes; //vertex array private int numEdges; //Edges number private int[,] matrix; //Matrix array //Constructor public GraphAdjMatrix(int n 阅读全文
posted @ 2011-03-27 12:46 山之松 阅读(350) 评论(0) 推荐(0) 编辑