C++ main module for stochmagnet Package  1.0
SM_StochasticFunction.h
Go to the documentation of this file.
1 #ifndef SM_StochasticFunction_H
2 #define SM_StochasticFunction_H
3 
4 #include "SM_Object.h"
5 
15 class SM_StochasticFunction : public virtual SM_Object {
16 
17  // ATTRIBUTES
18 
19 public:
20 
21 
22 
23 private:
24 
25 
26 
27 
28 protected:
29  // METHODS
30 
31  // CONSTRUCTORS
32 
36  }
37 
38 
39 
40  // DESTRUCTORS
41 
42 
45  virtual ~SM_StochasticFunction(void) {
46  }
47 
48 
49 public:
50 
51 
52  //MEMORY
53 
67  virtual tMemSize getMemorySize() const {
68  return sizeof(*this)+getContentsMemorySize();
69  }
70 
71 
72  // SET methods
77  virtual void setProperties(const tReal& mean,
78  const tReal& sd)=0;
79 
80 
84  virtual void initializeSeed(const tULLInt& seed)=0;
85 
86 
87 
88  // GET method
89  // ==========
90 
94  virtual tReal random() const =0;
95 
96 
97 public:
98  // OTHERS methods
99 
100 
104  virtual tString toString() const override {
105  return CORE_Object::toString();
106  }
107 
108 };
109 
110 #endif
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:259
virtual tString toString() const
return the string representation of the object node
Definition: CORE_Object.h:314
This class is a base class for Stoch Microm package.
Definition: SM_Object.h:19
This class describes a stochastic function interface to generate random numbers.
Definition: SM_StochasticFunction.h:15
SM_StochasticFunction(void)
create
Definition: SM_StochasticFunction.h:35
virtual tString toString() const override
turn the class into a string
Definition: SM_StochasticFunction.h:104
virtual void setProperties(const tReal &mean, const tReal &sd)=0
set the properties of the stochastic function
virtual tReal random() const =0
compute a random number
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_StochasticFunction.h:67
virtual ~SM_StochasticFunction(void)
destroy
Definition: SM_StochasticFunction.h:45
virtual void initializeSeed(const tULLInt &seed)=0
initialize the seed of the stochastic function
#define tString
Definition: types.h:147
#define tULLInt
Definition: types.h:58
#define tMemSize
Definition: types.h:166
#define tReal
Definition: types.h:137