public IEnumerable <CRegion> AggregateSmallestAndUpdateQ(CRegion crg, CRegion lscrg, CRegion sscrg, SortedSet <CRegion> Q,
                                                                 List <SortedDictionary <CRegion, CRegion> > ExistingCrgSDLt, List <SortedDictionary <CPatch, CPatch> > ExistingCphSDLt,
                                                                 SortedDictionary <CCorrCphs, CCorrCphs> ExistingCorrCphsSD, double[,] padblTD, int intEstSteps)
        {
            var pAdjCorrCphsSD = crg.AdjCorrCphsSD;
            var mincph         = crg.GetSmallestCph();

            var pCphRecords = crg.GetNeighborCphRecords(mincph).ToList();

            if (pCphRecords.Count == 0)
            {
                CSaveFeature.SaveCpgEb(mincph.CpgSS, "PolygonsOfMincph");
                throw new ArgumentNullException("There is no neighbor of mincph!");
            }

            //for every pair of neighboring Cphs, we aggregate them and generate a new Crg
            foreach (var pCphRecord in pCphRecords)
            {
                foreach (var item in AggregateAndUpdateQ_Common(crg, lscrg, sscrg, Q, pAdjCorrCphsSD, pCphRecord.CorrCphs,
                                                                ExistingCrgSDLt, ExistingCphSDLt, ExistingCorrCphsSD, padblTD, intEstSteps))
                {
                    yield return(item);
                }
            }
        }
Exemplo n.º 2
0
        public IEnumerable <CRegion> AggregateSmallestAndUpdateQ(CRegion crg, CRegion lscrg, CRegion sscrg, SortedSet <CRegion> Q,
                                                                 List <SortedDictionary <CRegion, CRegion> > ExistingCrgSDLt, List <SortedDictionary <CPatch, CPatch> > ExistingCphSDLt,
                                                                 SortedDictionary <CCorrCphs, CCorrCphs> ExistingCorrCphsSD, double[,] padblTD, int intEstSteps)
        {
            var pAdjCorrCphsSD = crg.AdjCorrCphsSD;
            var mincph         = crg.GetSmallestCph();

            //for every pair of neighboring Cphs, we aggregate them and generate a new Crg
            foreach (var pCphRecord in crg.GetNeighborCphRecords(mincph))
            {
                foreach (var item in AggregateAndUpdateQ_Common(crg, lscrg, sscrg, Q, pAdjCorrCphsSD, pCphRecord.CorrCphs,
                                                                ExistingCrgSDLt, ExistingCphSDLt, ExistingCorrCphsSD, padblTD, intEstSteps))
                {
                    yield return(item);
                }
            }
        }