Ejemplo n.º 1
0
        /// Insert data at the tail of the list
        public void AddTail(dt[] mdata)
        {
            ChNode <dt> nnode = new ChNode <dt>();

            nnode.data = mdata;
            nnode.prev = tail;
            nnode.next = null;
            if (head == null)              // first elem
            {
                head = nnode;
                tail = nnode;
            }
            else
            {
                tail.next = nnode;
                tail      = nnode;
            }
        }
Ejemplo n.º 2
0
        /// Insert data at the head of the list
        public void AddHead(dt[] mdata)
        {
            ChNode <dt> nnode = new ChNode <dt>();

            nnode.data = mdata;
            nnode.prev = null;
            nnode.next = head;
            if (head == null)              // first elem
            {
                head = nnode;
                tail = nnode;
            }
            else
            {
                head.prev = nnode;
                head      = nnode;
            }
        }
Ejemplo n.º 3
0
        public ChNode <dt> next;  //< next node

        /// Constructor for node
        public ChNode()
        {
            data = null;
            next = prev = null;
        }
Ejemplo n.º 4
0
 /// Removes a node and deletes its data.
 /// Note the Kill() commands remove and also use delete(data) to free the objects pointed by nodes!,
 public void Kill(ChNode <dt> mnode)
 {
 }
Ejemplo n.º 5
0
        /// Removes a node.
        /// Note the Remove() command delete just the Ch_node, not the pointed 'data' object

        public void Remove(ChNode <dt> mnode)
        {
        }
Ejemplo n.º 6
0
 public void InsertBefore(ChNode <dt> mnode, dt mdata)
 {
 }
Ejemplo n.º 7
0
 public void InsertAfter(ChNode <dt> mnode, dt mdata)
 {
 }
Ejemplo n.º 8
0
 public void InsertBefore(ChNode <dt> mnode, ChNode <dt> newnode)
 {
 }
Ejemplo n.º 9
0
 public void InsertAfter(ChNode <dt> mnode, ChNode <dt> newnode)
 {
 }