- Timestamp:
- Feb 3, 2011, 9:59:58 AM (14 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 5347cd
- Parents:
- 9964ff
- git-author:
- Frederik Heber <heber@…> (01/07/11 15:36:14)
- git-committer:
- Frederik Heber <heber@…> (02/03/11 09:59:58)
- Location:
- src/RandomNumbers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/RandomNumbers/RandomNumberDistribution_Encapsulation.cpp
r9964ff recb6c5 22 22 #include "CodePatterns/MemDebug.hpp" 23 23 24 #include <limits> 25 24 26 #include "RandomNumberDistribution_Encapsulation.hpp" 25 27 … … 130 132 } 131 133 132 134 template <> 135 double RandomNumberDistribution_Encapsulation< boost::bernoulli_distribution<> >::min() const 136 { 137 return 0.; 138 } 139 140 template <> 141 double RandomNumberDistribution_Encapsulation< boost::binomial_distribution<> >::min() const 142 { 143 return 0.; 144 } 145 146 template <> 147 double RandomNumberDistribution_Encapsulation< boost::cauchy_distribution<> >::min() const 148 { 149 return std::numeric_limits<double>::min(); 150 } 151 152 template <> 153 double RandomNumberDistribution_Encapsulation< boost::gamma_distribution<> >::min() const 154 { 155 return 0.; 156 } 157 158 template <> 159 double RandomNumberDistribution_Encapsulation< boost::poisson_distribution<> >::min() const 160 { 161 return 0.; 162 } 163 164 template <> 165 double RandomNumberDistribution_Encapsulation< boost::geometric_distribution<> >::min() const 166 { 167 return 0.; 168 } 169 170 template <> 171 double RandomNumberDistribution_Encapsulation< boost::triangle_distribution<> >::min() const 172 { 173 return distribution_type.a(); 174 } 175 176 template <> 177 double RandomNumberDistribution_Encapsulation< boost::exponential_distribution<> >::min() const 178 { 179 return 0.; 180 } 181 182 template <> 183 double RandomNumberDistribution_Encapsulation< boost::normal_distribution<> >::min() const 184 { 185 return std::numeric_limits<double>::min(); 186 } 187 188 template <> 189 double RandomNumberDistribution_Encapsulation< boost::lognormal_distribution<> >::min() const 190 { 191 return 0.; 192 } 133 193 134 194 /* =============== max() ======================= */ … … 158 218 } 159 219 220 template <> 221 double RandomNumberDistribution_Encapsulation< boost::bernoulli_distribution<> >::max() const 222 { 223 return 1.; 224 } 225 226 template <> 227 double RandomNumberDistribution_Encapsulation< boost::binomial_distribution<> >::max() const 228 { 229 return distribution_type.t(); 230 } 231 232 template <> 233 double RandomNumberDistribution_Encapsulation< boost::cauchy_distribution<> >::max() const 234 { 235 return std::numeric_limits<double>::max(); 236 } 237 238 template <> 239 double RandomNumberDistribution_Encapsulation< boost::gamma_distribution<> >::max() const 240 { 241 return std::numeric_limits<double>::max(); 242 } 243 244 template <> 245 double RandomNumberDistribution_Encapsulation< boost::poisson_distribution<> >::max() const 246 { 247 return std::numeric_limits<double>::max(); 248 } 249 250 template <> 251 double RandomNumberDistribution_Encapsulation< boost::geometric_distribution<> >::max() const 252 { 253 return std::numeric_limits<double>::max(); 254 } 255 256 template <> 257 double RandomNumberDistribution_Encapsulation< boost::triangle_distribution<> >::max() const 258 { 259 return distribution_type.c(); 260 } 261 262 template <> 263 double RandomNumberDistribution_Encapsulation< boost::exponential_distribution<> >::max() const 264 { 265 return std::numeric_limits<double>::max(); 266 } 267 268 template <> 269 double RandomNumberDistribution_Encapsulation< boost::normal_distribution<> >::max() const 270 { 271 return std::numeric_limits<double>::max(); 272 } 273 274 template <> 275 double RandomNumberDistribution_Encapsulation< boost::lognormal_distribution<> >::max() const 276 { 277 return std::numeric_limits<double>::max(); 278 } 160 279 161 280 /* =============== p() ======================= */ -
src/RandomNumbers/RandomNumberGenerator.hpp
r9964ff recb6c5 39 39 virtual void seed(unsigned int _seed)=0; 40 40 41 /** Getter for smallest possible random number 42 * 43 * @return smallest possible random number 44 */ 45 virtual double min() const=0; 46 47 /** Getter for largest possible random number 48 * 49 * @return largest possible random number 50 */ 51 virtual double max() const=0; 52 41 53 /** Getter for the type name of the internal engine. 42 54 * -
src/RandomNumbers/RandomNumberGenerator_Encapsulation.hpp
r9964ff recb6c5 98 98 } 99 99 100 /** Getter for smallest possible random number 101 * 102 * @return smallest possible random number 103 */ 104 double min() const { 105 return distribution_type->min(); 106 } 107 108 /** Getter for largest possible random number 109 * 110 * @return largest possible random number 111 */ 112 double max() const { 113 return distribution_type->max(); 114 } 115 100 116 /** Getter for the type name of the internal engine. 101 117 *
Note:
See TracChangeset
for help on using the changeset viewer.