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);
            }
        }
 /// <summary>
 /// Overloaded constructor
 /// </summary>
 /// <param name="data">Sample pool of cases in a datatable</param>
 /// <param name="seed">Random seed for replicability</param>
 /// <param name="indexer">Easting and northing column indexes for datatables</param>
 public RandomTourWithSpecifiedBase(DataTable data, RandomTourArguments args)
 {
     this.data    = data;
     this.sampler = new DataTableRandomRowSampler(data, args.Seed);
     this.indexer = args.Indexer;
 }
 /// <summary>
 /// Overloaded constructor
 /// </summary>
 /// <param name="data">Sample pool of cases in a datatable</param>
 /// <param name="seed">Random seed for replicability</param>
 /// <param name="indexer">Easting and northing column indexes for datatables</param>
 public RandomTourWithSpecifiedBase(DataTable data, RandomTourArguments args)
 {
     this.data = data;
     this.sampler = new DataTableRandomRowSampler(data, args.Seed);
     this.indexer = args.Indexer;
 }
        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;

            }
        }