Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        private void IntersectChains()
        {
            MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(SegmentIntersector);

            foreach (var obj in monoChains)
            {
                var queryChain    = (MonotoneChain)obj;
                var overlapChains = index.Query(queryChain.Envelope);
                foreach (var j in overlapChains)
                {
                    var testChain = (MonotoneChain)j;

                    /*
                     * following test makes sure we only compare each pair of chains once
                     * and that we don't compare a chain to itself
                     */
                    if (testChain.Id <= queryChain.Id)
                    {
                        continue;
                    }
                    queryChain.ComputeOverlaps(testChain, overlapAction);
                    nOverlaps++;
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        private void IntersectChains()
        {
            MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(SegmentIntersector);

            foreach (var obj in _monoChains)
            {
                var queryChain    = obj;
                var overlapChains = _index.Query(queryChain.Envelope);
                foreach (var testChain in overlapChains)
                {
                    /*
                     * following test makes sure we only compare each pair of chains once
                     * and that we don't compare a chain to itself
                     */
                    if (testChain.Id > queryChain.Id)
                    {
                        queryChain.ComputeOverlaps(testChain, overlapAction);
                        _nOverlaps++;
                    }
                    // short-circuit if possible
                    if (SegmentIntersector.IsDone)
                    {
                        return;
                    }
                }
            }
        }
        private void IntersectChains(List <MonotoneChain> monoChains, ISegmentIntersector segmentIntersector)
        {
            var overlapAction = new SegmentOverlapAction(segmentIntersector);

            foreach (var queryChain in monoChains)
            {
                var overlapChains = _index.Query(queryChain.Envelope);
                foreach (var testChain in overlapChains)
                {
                    queryChain.ComputeOverlaps(testChain, overlapAction);
                    if (segmentIntersector.IsDone)
                    {
                        return;
                    }
                }
            }
        }
Esempio n. 4
0
 /// <summary>
 /// 
 /// </summary>
 private void IntersectChains()
 {
     MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(SegmentIntersector);
     foreach(var obj in monoChains) 
     {
         var queryChain = (MonotoneChain)obj;
         var overlapChains = index.Query(queryChain.Envelope);
         foreach(var j in overlapChains)
         {
             var testChain = (MonotoneChain)j;
             /*
              * following test makes sure we only compare each pair of chains once
              * and that we don't compare a chain to itself
              */
             if (testChain.Id <= queryChain.Id)
                 continue;
             queryChain.ComputeOverlaps(testChain, overlapAction);
             nOverlaps++;
         }
     }
 }
Esempio n. 5
0
        private void IntersectChains()
        {
            MonotoneChainOverlapAction overlapAction =
                new SegmentOverlapAction(this, segInt);

            for (IEnumerator i = monoChains.GetEnumerator(); i.MoveNext();)
            {
                MonotoneChain queryChain    = (MonotoneChain)i.Current;
                IList         overlapChains = index.Query(queryChain.Envelope);

                for (IEnumerator j = overlapChains.GetEnumerator(); j.MoveNext();)
                {
                    MonotoneChain testChain = (MonotoneChain)j.Current;
                    // following test makes sure we only compare each pair of chains once
                    // and that we don't compare a chain to itself
                    if (testChain.Id > queryChain.Id)
                    {
                        queryChain.ComputeOverlaps(testChain, overlapAction);
                        nOverlaps++;
                    }
                }
            }
        }
Esempio n. 6
0
        /// <summary>
        ///
        /// </summary>
        private void IntersectChains()
        {
            MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(SegmentIntersector);

            foreach (object obj in _monoChains)
            {
                MonotoneChain queryChain    = (MonotoneChain)obj;
                IList         overlapChains = _index.Query(queryChain.Envelope);
                foreach (object j in overlapChains)
                {
                    MonotoneChain testChain = (MonotoneChain)j;

                    /*
                     * following test makes sure we only compare each pair of chains once
                     * and that we don't compare a chain to itself
                     */
                    if (testChain.Id > queryChain.Id)
                    {
                        queryChain.ComputeOverlaps(testChain, overlapAction);
                        _nOverlaps++;
                    }
                }
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 
        /// </summary>
        private void IntersectChains()
        {
            MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(SegmentIntersector);
            foreach(var obj in _monoChains)
            {
                var queryChain = obj;
                var overlapChains = _index.Query(queryChain.Envelope);
                foreach(var testChain in overlapChains)
                {
                    /*
                     * following test makes sure we only compare each pair of chains once
                     * and that we don't compare a chain to itself
                     */
                    if (testChain.Id > queryChain.Id)
                    {
                        queryChain.ComputeOverlaps(testChain, overlapAction);
                        _nOverlaps++;
                    }
                    // short-circuit if possible
                    if (SegmentIntersector.IsDone)
                        return;

                }
            }
        }
        private void IntersectChains(IEnumerable<MonotoneChain> monoChains, ISegmentIntersector segmentIntersector)
        {
            MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(segmentIntersector);

            foreach (var queryChain in monoChains)
            {
                var overlapChains = _index.Query(queryChain.Envelope);
                foreach (var testChain in overlapChains)
                {
                    queryChain.ComputeOverlaps(testChain, overlapAction);
                    if (segmentIntersector.IsDone) return;
                }
            }
        }
Esempio n. 9
0
 /// <summary>
 ///
 /// </summary>
 private void IntersectChains()
 {
     MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(SegmentIntersector);
     foreach (object obj in _monoChains)
     {
         MonotoneChain queryChain = (MonotoneChain)obj;
         IList overlapChains = _index.Query(queryChain.Envelope);
         foreach (object j in overlapChains)
         {
             MonotoneChain testChain = (MonotoneChain)j;
             /*
              * following test makes sure we only compare each pair of chains once
              * and that we don't compare a chain to itself
              */
             if (testChain.Id > queryChain.Id)
             {
                 queryChain.ComputeOverlaps(testChain, overlapAction);
                 _nOverlaps++;
             }
         }
     }
 }