public GeneticKMeansSpeciationStrategy(
     IDistanceMetric <T> distanceMetric,
     int maxKMeansIters,
     IRandomSource rng)
 {
     _distanceMetric = distanceMetric;
     _maxKMeansIters = maxKMeansIters;
     _kmeansInit     = new GeneticKMeansSpeciationInit <T>(distanceMetric, rng);
 }
 /// <summary>
 /// Construct with the provided distance metric and k-means settings.
 /// </summary>
 /// <param name="distanceMetric">Distance metric.</param>
 /// <param name="maxKMeansIters">Maximum number of k-means iterations.</param>
 /// <param name="regularizationConstant">Regularization constant.</param>
 public RegularizedGeneticKMeansSpeciationStrategy(
     IDistanceMetric <T> distanceMetric,
     int maxKMeansIters,
     double regularizationConstant)
 {
     _distanceMetric         = distanceMetric;
     _maxKMeansIters         = maxKMeansIters;
     _regularizationConstant = regularizationConstant;
     _kmeansInit             = new GeneticKMeansSpeciationInit <T>(distanceMetric);
 }
 /// <summary>
 /// Construct a new instance.
 /// </summary>
 /// <param name="distanceMetric">Distance metric.</param>
 /// <param name="maxKMeansIters">Maximum number of k-means iterations.</param>
 public GeneticKMeansSpeciationStrategy(IDistanceMetric <T> distanceMetric, int maxKMeansIters)
 {
     _distanceMetric = distanceMetric ?? throw new ArgumentNullException(nameof(distanceMetric));
     _maxKMeansIters = maxKMeansIters;
     _kmeansInit     = new GeneticKMeansSpeciationInit <T>(distanceMetric);
 }