private IDataTableRowSampler CreateRowSampler() { if (options.TourBaseSetup == BaseSetup.LocalityCentroid) { var sampler = new RandomTourWithCentroidBase(this.options.Seed, new EastingNorthingColumnIndexer(0, 1)); samplePrimer = new StandardSamplePoolPrimer(sampler); return(sampler); } else if (options.TourBaseSetup == BaseSetup.RandomWithinLocality) { var sampler = new RandomTourRandomBase(this.options.Seed); samplePrimer = new StandardSamplePoolPrimer(sampler); return(sampler); } else { var args = new RandomTourArguments(this.options.Seed) { Indexer = new EastingNorthingColumnIndexer(0, 1) }; args.DataSets.Add("hub", GetHubData()); var sampler = new RandomTourWithSpecifiedBase(args); samplePrimer = new SamplePoolPrimerSpecifiedBase(sampler, GetHubData()); return(sampler); } }
private IDataTableRowSampler CreateRowSampler() { if (options.TourBaseSetup == BaseSetup.LocalityCentroid) { var sampler = new RandomTourWithCentroidBase(this.options.Seed, new EastingNorthingColumnIndexer(0, 1)); samplePrimer = new StandardSamplePoolPrimer(sampler); return sampler; } else if (options.TourBaseSetup == BaseSetup.RandomWithinLocality) { var sampler = new RandomTourRandomBase(this.options.Seed); samplePrimer = new StandardSamplePoolPrimer(sampler); return sampler; } else { var args = new RandomTourArguments(this.options.Seed) { Indexer = new EastingNorthingColumnIndexer(0, 1) }; args.DataSets.Add("hub", GetHubData()); var sampler = new RandomTourWithSpecifiedBase(args); samplePrimer = new SamplePoolPrimerSpecifiedBase(sampler, GetHubData()); return sampler; } }