21.无向图邻接表的邻接结点类

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
        {
            get
            {
                return next;
            }
            set
            {
                next = value;
            }
        }
        public int Weight
        {
            get
            {
                return weight;
            }
            set
            {
                weight = value;
            }
        }
        public AdjListNode(int vex)
        {
            adjVex = vex;
            next = null;
            weight = 0;
        }
    }
}
posted @ 2011-03-27 12:49  山之松  阅读(181)  评论(0编辑  收藏  举报