Esempio n. 1
0
 // DO SAMPLE //
 //
 // Does the actual sampling.
 override public void ManageSampling(int particleIndex)
 {
     if (particleIndex < 0 && ShouldSample())
     {
         vector.Randomize();
         vectors[0] = vector.GetValue();
     }
     else if (particleIndex >= 0 && ShouldSample(particleIndex))
     {
         vector.Randomize();
         vectors[particleIndex] = vector.GetValue(particleIndex);
     }
 }
Esempio n. 2
0
 // MANAGE SAMPLING //
 //
 // Does the actual sampling.
 override public void ManageSampling(int particleIndex)
 {
     if (particleIndex < 0 && ShouldSample())
     {
         point.Randomize();
         points[0] = point.GetValue();
     }
     else if (particleIndex >= 0 && ShouldSample(particleIndex))
     {
         point.Randomize();
         points[particleIndex] = point.GetValue(particleIndex);
     }
 }