IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.SamplerBoxRandomUniform Class Reference

Uniformly distributed random sampling within the coordinate origin-centered cube. More...

+ Inheritance diagram for IG.Num.SamplerBoxRandomUniform:
+ Collaboration diagram for IG.Num.SamplerBoxRandomUniform:

Public Member Functions

 SamplerBoxRandomUniform (int spaceDimension, IRandomGenerator rand, IBoundingBox box)
 Construct a new sampling object with the specified random generator that is used for creating new sampling points, and the specified bounding box that defines the sampling region. More...
 
 SamplerBoxRandomUniform (IRandomGenerator rand, IBoundingBox box)
 Construct a new sampling object with the specified random generator that is used for creating new sampling points. More...
 
override void GetSamplingPoint (ref IVector samplingPoint)
 Creates the next sampling point and stores it to the specified vector. More...
 
- Public Member Functions inherited from IG.Num.SamplerBaseRandom
 SamplerBaseRandom (int spaceDimension, IRandomGenerator rand)
 Construct a new sampling object with the specified random generator that is used for creating new sampling points. More...
 
void SetRandomGenerator (IRandomGenerator rand)
 Sets the random generator that will be used for generation of sampling points. More...
 
- Public Member Functions inherited from IG.Num.SamplerBase
 SamplerBase (int spaceDimension)
 Constructs a new sampling point generator for the specified dimension of sampling space. More...
 
virtual void GetSamplingPoints (int numPoints, ref IVector[] samplingPoints)
 Creates the specified number of next sampling points and stores it to the specified array of vectors. More...
 
void ResizeSamplingPoints (int numPoints, ref IVector[] samplingPoints)
 Auxiliary method that resizes the array of sampling points, and also the vectors contained in it, as necessary. More...
 

Protected Attributes

IBoundingBox _box
 
- Protected Attributes inherited from IG.Num.SamplerBase
int _spaceDimension
 

Properties

IBoundingBox Box [get, protected set]
 Bounding box that defines the sampling region. More...
 
- Properties inherited from IG.Num.SamplerBaseRandom
IRandomGenerator Random [get, protected set]
 The random generator that will be used for generation of sampling points. If it is null, the next call to getter will automatically assign it to the global random generator. More...
 
- Properties inherited from IG.Num.SamplerBase
object Lock [get]
 This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More...
 
int SpaceDimension [get, protected set]
 
- Properties inherited from IG.Num.ISampler
int SpaceDimension [get]
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Detailed Description

Uniformly distributed random sampling within the coordinate origin-centered cube.

Cube side lengths can be specified, and are 1 by default.

$A Igor May08;

Constructor & Destructor Documentation

IG.Num.SamplerBoxRandomUniform.SamplerBoxRandomUniform ( int  spaceDimension,
IRandomGenerator  rand,
IBoundingBox  box 
)
inline

Construct a new sampling object with the specified random generator that is used for creating new sampling points, and the specified bounding box that defines the sampling region.

Constructed sampler object generates uniformly distributed random samples within the specified bounding box.

Parameters
spaceDimensionDimension of the sampled space.

Random generator can be null, in which case a global random generator will be used.

Parameters
randThe random generator that will be used for generation of sampling points. It can be null, in which case the global random generator will be used.
IG.Num.SamplerBoxRandomUniform.SamplerBoxRandomUniform ( IRandomGenerator  rand,
IBoundingBox  box 
)
inline

Construct a new sampling object with the specified random generator that is used for creating new sampling points.

Constructed sampler object generates uniformly distributed random samples within a cube centered around coordinate origin with specified side length.

Dimension of the space is obtained from the bounding box.

Random generator can be null, in which case a global random generator will be used.

Parameters
randThe random generator that will be used for generation of sampling points. It can be null, in which case the global random generator will be used.

Member Function Documentation

override void IG.Num.SamplerBoxRandomUniform.GetSamplingPoint ( ref IVector  samplingPoint)
inline

Creates the next sampling point and stores it to the specified vector.

Parameters
samplingPointVector where the generated sampling point is stored.

Implements IG.Num.ISampler.

References IG.Num.IBoundingBox.GetMax(), IG.Num.IBoundingBox.GetMin(), IG.Num.IRandomGenerator.NextDouble(), and IG.Num.VectorBase.Resize().

Member Data Documentation

IBoundingBox IG.Num.SamplerBoxRandomUniform._box
protected

Property Documentation

IBoundingBox IG.Num.SamplerBoxRandomUniform.Box
getprotected set

Bounding box that defines the sampling region.


The documentation for this class was generated from the following file: