Click or drag to resize

RandomSampling Class

Provides methods to draw samples having the specified size from a finite population.
Inheritance Hierarchy

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

The RandomSampling type exposes the following members.

Constructors
  NameDescription
Protected methodRandomSampling
Initializes a new instance of the RandomSampling class
Top
Properties
  NameDescription
Public propertyInclusionProbabilities
Gets the inclusion probabilities of the population units.
Public propertyPopulationSize
Gets the size of the population from which this instance draws samples.
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.
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.
Public methodNextIndexCollection
Draws a sample represented as an IndexCollection instance.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

A finite population of size LaTeX equation can be defined as the set LaTeX equation. Elements of LaTeX equation are referred to as units. Property PopulationSize should return the size of the population.

A sample is every non empty subset of LaTeX equation. Class RandomSampling exposes several methods to draw samples having size returned by SampleSize from a finite population.

Method NextIndexCollection returns a sample which is represented as an IndexCollection instance having Count equal to SampleSize and whose indexes are less than PopulationSize .

Method NextDoubleMatrix returns a sample represented as a DoubleMatrix instance, having one row and a number of columns equal to PopulationSize. In this context, the sample is the set of linear indexes corresponding to entries in the returned matrix equal to 1, other entries storing 0 otherwise. For an introduction to linear indexes, see the remarks of the DoubleMatrix class.

See Also