Пример #1
0
        internal override void Match(int valIndex, ref Value val, QueryBranchResultSet results)
        {
            QueryBranch branch = null;

            if (ValueDataType.Sequence == val.Type)
            {
                NodeSequence sequence = val.Sequence;
                for (int i = 0; i < sequence.Count; ++i)
                {
                    branch = this[sequence.Items[i].NumberValue()];
                    if (null != branch)
                    {
                        results.Add(branch, valIndex);
                    }
                }
            }
            else
            {
                branch = this[val.ToDouble()];
                if (null != branch)
                {
                    results.Add(branch, valIndex);
                }
            }
        }
Пример #2
0
        internal override void Match(int valIndex, ref Value val, QueryBranchResultSet results)
        {
            QueryBranch branch = null;

            if (ValueDataType.Sequence == val.Type)
            {
                NodeSequence sequence = val.Sequence;
                for (int i = 0; i < sequence.Count; i++)
                {
                    branch = this[sequence.Items[i].StringValue()];
                    if (branch != null)
                    {
                        results.Add(branch, valIndex);
                    }
                }
            }
            else
            {
                branch = this[val.String];
                if (branch != null)
                {
                    results.Add(branch, valIndex);
                }
            }
        }
        private void Match(int valIndex, string segment, QueryBranchResultSet results)
        {
            TrieTraverser traverser = new TrieTraverser(this.trie.Root, segment);

            while (traverser.MoveNext())
            {
                object data = traverser.Segment.Data;
                if (data != null)
                {
                    results.Add((QueryBranch)data, valIndex);
                }
            }
        }
Пример #4
0
        void Match(int valIndex, double point, QueryBranchResultSet results)
        {
            IntervalTreeTraverser traverser = new IntervalTreeTraverser(point, this.intervalTree.Root);

            while (traverser.MoveNext())
            {
                IntervalCollection matches = traverser.Slot;
                for (int i = 0, count = matches.Count; i < count; ++i)
                {
                    QueryBranch branch = matches[i].Branch;
                    if (null != branch)
                    {
                        results.Add(branch, valIndex);
                    }
                }
            }
        }
Пример #5
0
        private void Match(int valIndex, double point, QueryBranchResultSet results)
        {
            IntervalTreeTraverser traverser = new IntervalTreeTraverser(point, this.intervalTree.Root);

            while (traverser.MoveNext())
            {
                IntervalCollection slot = traverser.Slot;
                int num   = 0;
                int count = slot.Count;
                while (num < count)
                {
                    QueryBranch branch = slot[num].Branch;
                    if (branch != null)
                    {
                        results.Add(branch, valIndex);
                    }
                    num++;
                }
            }
        }