Ejemplo n.º 1
0
 public Sampler(ISampleGenerator sampler, ISampleDistributor mapper, int sampleCt, int setCt)
 {
     _sets       = new List <Vector2[]>(setCt);
     _random     = new Random(0);
     SampleCount = sampleCt;
     for (var i = 0; i < setCt; i++)
     {
         var samples       = sampler.Sample(sampleCt);
         var mappedSamples = samples.Select(mapper.MapSample).ToArray();
         _sets.Add(mappedSamples);
     }
 }