| 
            
              VectorSample Method (Double, Double)
             | 
          
        
         
              Returns a vector of the specified percentage of the 
              populationSize containing non-repeating indices in the 
              range [0, populationSize) in random order.
            
 
    Namespace: 
   Accord.Math
    Assembly:
   Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntaxpublic static double[] Sample(
	double percentage,
	double populationSize
)
Public Shared Function Sample ( 
	percentage As Double,
	populationSize As Double
) As Double()
 Request Example
		View SourceParameters
- percentage
 - Type: SystemDouble
The percentage of the population to sample. - populationSize
 - Type: SystemDouble
The non-inclusive maximum number an index can have. 
Return Value
Type: 
Double
Examplesvar a = Vector.Sample(0.3, 10);  
var b = Vector.Sample(1.0, 10); 
foreach (var i in Vector.Sample(0.2, 6))
{
   
}
See Also