Click or drag to resize

SimpleRandomSampling Class

Provides methods to randomly select samples from a finite population where all samples of a given size share the same probability to be selected.
Inheritance Hierarchy

Namespace:  Novacta.Analytics
Assembly:  Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.0.0
Syntax
public class SimpleRandomSampling : RandomSampling

The SimpleRandomSampling type exposes the following members.

Constructors
  NameDescription
Public methodSimpleRandomSampling
Initializes a new instance of the SimpleRandomSampling class.
Top
Properties
  NameDescription
Public propertyInclusionProbabilities
Gets the inclusion probabilities of the population units.
(Overrides RandomSamplingInclusionProbabilities.)
Public propertyPopulationSize
Gets the size of the population from which this instance draws samples.
(Overrides RandomSamplingPopulationSize.)
Public propertyRandomNumberGenerator
Gets or sets the basic random generator for this instance.
(Inherited from RandomDevice.)
Public propertySampleSize
Gets the size of the samples drawn by this instance.
(Overrides RandomSamplingSampleSize.)
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNextDoubleMatrix
Draws a random sample represented as a DoubleMatrix instance.
(Overrides RandomSamplingNextDoubleMatrix.)
Public methodNextIndexCollection
Draws a sample represented as an IndexCollection instance.
(Overrides RandomSamplingNextIndexCollection.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The current implementation of the SimpleRandomSampling class is based on the Donald E. Knuth's Algorithm S (Selection sampling technique, p. 142)[1] .

Bibliography
[1] Knuth, D.E., The Art of Computer Programming, Volume 2: Seminumerical Algorithms, Addison-Wesley, Reading, MA, third edition. (1997)
See Also