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.tesseator, 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._tess.currentSweepVertex, 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);
        }