Example #1
0
        public static Node dictSearch(Dictionary dict, DictKey key)
        {
            Node node = dict._head;

            do
            {
                node = node.next;
            } while (node.Key != null && !ActiveRegion.EdgeLeq(dict._tess.currentSweepVertex, key, node.Key));
            return(node);
        }
Example #2
0
        public static Node dictSearch(Dictionary dict, DictKey key)
        {
            Node node = dict.head;

            do
            {
                node = node.next;
            } while (node.Key != null && !ActiveRegion.EdgeLeq(dict.tesseator, key, node.Key));
            return(node);
        }
Example #3
0
        public Node InsertBefore(Node node, DictKey key)
        {
            do
            {
                node = node.prev;
            } while (node.Key != null && !ActiveRegion.EdgeLeq(_tess.currentSweepVertex, node.Key, key));

            var newNode = new Node();

            newNode.Key    = key;
            newNode.next   = node.next;
            node.next.prev = newNode;
            newNode.prev   = node;
            node.next      = newNode;
            return(newNode);
        }
Example #4
0
        public Node InsertBefore(Node node, DictKey key)
        {
            Node newNode;

            do
            {
                node = node.prev;
            } while (node.Key != null &&
                     !ActiveRegion.EdgeLeq(this.tesseator, node.Key, key));
            newNode        = new Node();
            newNode.Key    = key;
            newNode.next   = node.next;
            node.next.prev = newNode;
            newNode.prev   = node;
            node.next      = newNode;
            return(newNode);
        }
Example #5
0
 public Dictionary.Node Insert(DictKey k)
 {
     return(this.InsertBefore(head, k));
 }
Example #6
0
        //public static void dictDeleteDict(Dictionary dict)
        //{
        //    Node node, next;
        //    for (node = dict._head.next; node != dict._head; node = next)
        //    {
        //        next = node.next;
        //        node = null;
        //    }

        //    dict = null;
        //}

        public Node Insert(DictKey k)
        {
            return(this.InsertBefore(_head, k));
        }
Example #7
0
        public static Node dictSearch(Dictionary dict, DictKey key)
        {
            Node node = dict.head;

            do
            {
                node = node.next;
            } while (node.Key != null && !ActiveRegion.EdgeLeq(dict.tesseator, key, node.Key));

            return node;
        }
Example #8
0
        public Node InsertBefore(Node node, DictKey key)
        {
            Node newNode;

            do
            {
                node = node.prev;
            } while (node.Key != null && !ActiveRegion.EdgeLeq(this.tesseator, node.Key, key));

            newNode = new Node();

            newNode.Key = key;
            newNode.next = node.next;
            node.next.prev = newNode;
            newNode.prev = node;
            node.next = newNode;

            return newNode;
        }
Example #9
0
 public Dictionary.Node Insert(DictKey k)
 {
     return this.InsertBefore(head, k);
 }