22.无向图邻接表的顶点结点类

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
        {
            get
            {
                return firstAdj;
            }
            set
            {
                firstAdj = value;
            }
        }
 
        public ALVexNode()
        {
            data = null;
            firstAdj = null;
        }
 
        public ALVexNode(GvNode<T> nd)
        {
            data = nd;
            firstAdj = null;
        }
 
        public ALVexNode(GvNode<T> nd, AdjListNode<T> alNode)
        {
            data = nd;
            firstAdj = alNode;
        }
    }
}
posted @ 2013-04-26 10:10  小泥巴1024  阅读(160)  评论(0)    收藏  举报