|
||||
Warning, file /include/root/RooNumber.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /***************************************************************************** 0002 * Project: RooFit * 0003 * Package: RooFitCore * 0004 * File: $Id: RooNumber.h,v 1.7 2007/05/11 09:11:30 verkerke Exp $ 0005 * Authors: * 0006 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * 0007 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * 0008 * * 0009 * Copyright (c) 2000-2005, Regents of the University of California * 0010 * and Stanford University. All rights reserved. * 0011 * * 0012 * Redistribution and use in source and binary forms, * 0013 * with or without modification, are permitted according to the terms * 0014 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 0015 *****************************************************************************/ 0016 #ifndef ROO_NUMBER 0017 #define ROO_NUMBER 0018 0019 #include <limits> 0020 #include <string> 0021 0022 class RooNumber { 0023 public: 0024 /// Return internal infinity representation. 0025 constexpr static double infinity() { return std::numeric_limits<double>::infinity(); } 0026 /// Return true if x is infinite by RooNumber internal specification. 0027 constexpr static int isInfinite(double x) { return (x >= +infinity()) ? +1 : ((x <= -infinity()) ? -1 : 0); } 0028 0029 /// Set the relative epsilon that is used by range checks in RooFit, 0030 /// e.g., in RooAbsRealLValue::inRange(). 0031 inline static void setRangeEpsRel(double epsRel) { staticRangeEpsRel() = epsRel; } 0032 /// Get the relative epsilon that is used by range checks in RooFit, 0033 /// e.g., in RooAbsRealLValue::inRange(). 0034 inline static double rangeEpsRel() { return staticRangeEpsRel(); } 0035 0036 /// Set the absolute epsilon that is used by range checks in RooFit, 0037 /// e.g., in RooAbsRealLValue::inRange(). 0038 inline static void setRangeEpsAbs(double epsRel) { staticRangeEpsAbs() = epsRel; } 0039 /// Get the absolute epsilon that is used by range checks in RooFit, 0040 /// e.g., in RooAbsRealLValue::inRange(). 0041 inline static double rangeEpsAbs() { return staticRangeEpsAbs(); } 0042 static std::string toString(double x); 0043 0044 private: 0045 static double &staticRangeEpsRel(); 0046 static double &staticRangeEpsAbs(); 0047 }; 0048 0049 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |