C++ main module for stochmagnet Package
1.0
|
This class implements a stochastic function with a normal law implemented from the boost library. More...
#include <SMS_STDNormalFunction.h>
Public Member Functions | |
SMS_STDNormalFunction () | |
create an object More... | |
virtual | ~SMS_STDNormalFunction (void) |
destroy an object. More... | |
virtual tMemSize | getMemorySize () const |
return the memory size of the class and the memory size of all its attributes/associations More... | |
virtual tMemSize | getContentsMemorySize () const |
return the memory size of the included associations More... | |
virtual void | setProperties (const tReal &mean, const tReal &sd) override |
set the properties of the stochastic futcion More... | |
virtual void | initializeSeed (const tULLInt &seed) override |
initialize the seed More... | |
virtual tReal | random () const override |
random return a random numbers in range More... | |
tReal | templatedRandom () const |
random return a random numbers in range More... | |
virtual tString | toString () const override |
turn the class into a string More... | |
template<class T > | |
std::shared_ptr< T > | getSharedPointer () |
return the shared pointer for this More... | |
template<class T > | |
std::shared_ptr< const T > | getConstSharedPointer () const |
return a const shared pointer for this More... | |
template<class T > | |
tBoolean | isInstanceOf () const |
test if the clas T is an instance of this class More... | |
tString | getClassName () const |
return the name of the class More... | |
tString | getPointerString () const |
retrun the pointer of the class as a string More... | |
tString | getIdentityString () const |
retrun the string identification of the class More... | |
Static Public Member Functions | |
static CORE_UniquePointer< SMS_STDNormalFunction > | New () |
build a new instance of the stochasticfunction More... | |
static tBoolean | EnableMemoryStack (const tBoolean &isMemoryChecked) |
enable the memory stack More... | |
static void | EnableMemoryStack () |
enable the memory stack More... | |
static void | DisableMemoryStack () |
disable the memory stack More... | |
static tBoolean | IsMemoryStackEnabled () |
return trur if the memory stack is enabled More... | |
static tString | MemoryStackToString () |
get the memory stack in string More... | |
static tIndex | GetRegisteredClassesNumber () |
get the memory stack in string More... | |
Private Member Functions | |
template<class T > | |
std::shared_ptr< T > | setThis (std::unique_ptr< T, CORE_Object::Delete > &up) |
set the shared pointer from an unique pointer More... | |
Static Private Member Functions | |
static std::mt19937 & | getRNGenerator () |
get the generator More... | |
Private Attributes | |
std::normal_distribution< tReal > * | mRandomDistribution |
std::weak_ptr< CORE_Object > | mThis |
Static Private Attributes | |
static std::random_device | mGenerator |
static std::mt19937 | mRNGenerator |
This class implements a stochastic function with a normal law implemented from the boost library.
SMS_STDNormalFunction::SMS_STDNormalFunction | ( | ) |
create an object
References initializeSeed(), mRandomDistribution, and setProperties().
Referenced by New().
|
virtual |
destroy an object.
References mRandomDistribution.
|
inlinestaticinherited |
disable the memory stack
Referenced by CORE_Object::EnableMemoryStack().
|
inlinestaticinherited |
enable the memory stack
Referenced by CORE_Object::EnableMemoryStack(), and CORE_Run::SetDebugOptions().
|
inlinestaticinherited |
enable the memory stack
[in] | isMemoryChecked | : true to verify memory allocation of CORE_Object classes |
References CORE_Object::DisableMemoryStack(), CORE_Object::EnableMemoryStack(), and CORE_Object::IsMemoryStackEnabled().
|
inlineinherited |
return the name of the class
Referenced by CORE_Object::getIdentityString(), and CORE_Test::testTypes().
|
inlineinherited |
return a const shared pointer for this
References CORE_Object::mThis.
|
inlinevirtual |
return the memory size of the included associations
Reimplemented from CORE_Object.
References CORE_Object::getContentsMemorySize(), mRandomDistribution, and tMemSize.
Referenced by getMemorySize().
|
inlineinherited |
retrun the string identification of the class
References CORE_Object::getClassName(), and core_functions::pointerToString().
Referenced by CORE_Test::testArray(), CORE_Test::testField(), CORE_Test::testTypes(), CORE_Object::toString(), CORE_ClassFactory::toString(), and CORE_Field< T, K, D, S, I >::toString().
|
inlinevirtual |
return the memory size of the class and the memory size of all its attributes/associations
Reimplemented from SM_StochasticFunction.
References getContentsMemorySize().
|
inlineinherited |
retrun the pointer of the class as a string
References core_functions::pointerToString().
|
inlinestaticinherited |
get the memory stack in string
|
inlinestaticprivate |
get the generator
References mRNGenerator.
Referenced by initializeSeed(), and templatedRandom().
|
inlineinherited |
return the shared pointer for this
References CORE_Object::mThis.
|
overridevirtual |
initialize the seed
seed | : init value of the seed for generating random numbers |
Implements SM_StochasticFunction.
References getRNGenerator().
Referenced by SMS_STDNormalFunction(), and SM_Test::testNormalLaw().
|
inlineinherited |
test if the clas T is an instance of this class
Referenced by SM_Beam::templatedSimulate().
|
inlinestaticinherited |
return trur if the memory stack is enabled
Referenced by CORE_Object::EnableMemoryStack(), and main().
|
inlinestaticinherited |
get the memory stack in string
Referenced by main().
|
inlinestatic |
build a new instance of the stochasticfunction
References SMS_STDNormalFunction().
Referenced by SM_ClassFactory::NewInstance().
|
inlineoverridevirtual |
random return a random numbers in range
Implements SM_StochasticFunction.
References templatedRandom().
Referenced by SM_Test::testNormalLaw().
set the properties of the stochastic futcion
[in] | mean | : mean of the random function |
[in] | sd | : strandt deviation of the random function |
Implements SM_StochasticFunction.
References mRandomDistribution.
Referenced by SMS_STDNormalFunction().
|
inlineprivateinherited |
set the shared pointer from an unique pointer
[in,out] | up | unique pointer of the class at input, points to null pointer at output |
Method only calledby the friend class CORE_ClassFactory::NewSharedInstance()
References CORE_Object::mThis.
|
inline |
random return a random numbers in range
References getRNGenerator(), and mRandomDistribution.
Referenced by random(), and SM_Test::testNormalLaw().
|
inlineoverridevirtualinherited |
turn the class into a string
Reimplemented from CORE_Object.
References CORE_Object::toString().
|
staticprivate |
|
private |
Referenced by getContentsMemorySize(), setProperties(), SMS_STDNormalFunction(), templatedRandom(), and ~SMS_STDNormalFunction().
|
staticprivate |
Referenced by getRNGenerator().
|
privateinherited |
Referenced by CORE_Object::getConstSharedPointer(), CORE_Object::getSharedPointer(), and CORE_Object::setThis().