configuration.h
Go to the documentation of this file.
1 
40 #ifndef ARBITRARY_PRECISION_CALCULATION_CONFIGURATION_H_
41 #define ARBITRARY_PRECISION_CALCULATION_CONFIGURATION_H_
42 
43 #include <string>
44 #include <vector>
45 
47 
52 
56 namespace configuration {
73 };
74 } // namespace configuration
75 
80 public:
81 
85  static void Init();
86 
93 
99  static void setCheckPrecisionMode(
101 
107  static double getCheckPrecisionProbability();
108 
114  static void setCheckPrecisionProbability(double checkPrecisionProbability);
115 
122  static bool isIncreasePrecisionRecommended();
123 
127  static void ResetIncreasePrecisionRecommended();
128 
132  static void RecommendIncreasePrecision();
133 
139  static int getInitialPrecision();
140 
146  static void setInitialPrecision(int initialPrecision);
147 
153  static int getOutputPrecision();
154 
160  static void setOutputPrecision(int outputPrecision);
161 
167  static int getPrecisionSafetyMargin();
168 
174  static void setPrecisionSafetyMargin(int precisionSafetyMargin);
175 
181  static RandomNumberGenerator* getStandardRandomNumberGenerator();
182 
188  static void setStandardRandomNumberGenerator(
189  RandomNumberGenerator* standardRandomNumberGenerator);
190 
191 private:
195  static int initial_precision_;
200  static bool initial_precision_already_set_;
204  static int precision_safety_margin_;
205 
206 
214  static double check_precision_probability_;
218  static bool increase_precision_recommended_;
219 
224  static int output_precision_;
225 
229  static RandomNumberGenerator* standard_random_number_generator_;
230 
231 
232 }; // class Configuration
233 
234 } // namespace arbitraryprecisioncalculation
235 
236 #endif /* ARBITRARY_PRECISION_CALCULATION_CONFIGURATION_H_ */
CheckPrecisionMode
Specification possibilities in which cases precision checks occur.
Definition: configuration.h:60
The precision is never checked.
Definition: configuration.h:72
The precision is checked on each addition and subtraction.
Definition: configuration.h:68
This file contains the available random number generators.
If there are statistical calculations then no precision is checked. Beside that the precision is chec...
Definition: configuration.h:64
void Init()
Resets all variables in the configuration section to the default values.
base namespace for arbitrary precision calculation.
Definition: check_condition.h:45
This class is an abstract class. It supplies the interface for random number generators.
Definition: random_number_generator.h:52
Contains configuration of arbitrary precision calculation and supplies them by get and set methods...
Definition: configuration.h:79