CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

ConstMinusFunction.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: ConstMinusFunction.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
4 
5 
6 namespace Genfun {
7 FUNCTION_OBJECT_IMP(ConstMinusFunction)
8 
9 ConstMinusFunction::ConstMinusFunction(double constant, const AbsFunction *arg):
10  _constant(constant),
11  _arg(arg->clone())
12 {
13 }
14 
16 AbsFunction(right),
17 _constant(right._constant),
18 _arg(right._arg->clone())
19 {}
20 
21 unsigned int ConstMinusFunction::dimensionality() const {
22  return _arg->dimensionality();
23 }
24 
26 {
27  delete _arg;
28 }
29 
30 
31 
32 double ConstMinusFunction::operator ()(double x) const
33 {
34  return _constant - (*_arg)(x);
35 }
36 
37 
39 {
40  return _constant - (*_arg)(x);
41 }
42 
43 
44 Derivative ConstMinusFunction::partial(unsigned int index) const {
45  const AbsFunction & fPrime = -_arg->partial(index);
46  return Derivative(& fPrime);
47 }
48 
49 
50 } // namespace Genfun
foreach
foreach(test ${Random_simple_tests}) clhep_test($
Definition: Random/test/CMakeLists.txt:34
example
user code seldom needs to call this function directly ZMerrno whether or not they are still recorded ZMerrno whether or not they are still since the user counter was last ZMerrno while ZMerrno ZMerrno while ZMerrno to note the handler and logger used when the exception was ZMthrow n etc The resulting pointer should generally be checked against in case ZMerrno does not go back as far as requested ZMerrno for example
Definition: mechanics_ZMx.txt:382
l
long l
Definition: JamesRandomSeeding.txt:30
exceptions
Ouch may be arbitrary text to be associated with this particular as described below Resulting log message Assuming that the ExcTest program has been compiled with appropriate compiler switches that enable use of exceptions
Definition: mechanics_ZMx.txt:90
X
Definition: testSharedPtrBasic.cc:28
LorentzVector
In alll angles are always treated as measured in RADIANS Spherical coordinate setting mof V in LorentzVector
Definition: merge-details.doc:22
CLHEP::engineIDulong
unsigned long engineIDulong()
Definition: Matrix/CLHEP/Random/engineIDulong.h:24
ZMthrow
#define ZMthrow(userExcept)
Definition: CLHEP/Exceptions/ZMthrow.h:97
foreach
foreach(test ${Matrix_simple_tests}) clhep_test($
Definition: Matrix/test/CMakeLists.txt:23
a
@ a
Definition: testCategories.cc:125
Genfun::Derivative
FunctionNoop Derivative
Definition: CLHEP/GenericFunctions/AbsFunction.hh:40
Genfun::AbsFunction
Definition: CLHEP/GenericFunctions/AbsFunction.hh:48
VERSION
#define VERSION
Definition: Cast/Cast/defs.h:42
zmex::ZMexLogResult
ZMexLogResult
Definition: CLHEP/Exceptions/ZMexLogResult.h:19
RandGeneral
the goal is to keep the overall false rejection probability down at the to level For each validated we discuss which of course is by necessity relative timing We take the time for a single random via one of the fastest good and at any rate the ratios will vary by around depending on the processor and memory configuration used A timing for a distribution of units would mean no time used beyond the uniform random Summary Distribution Validated Validation Rejected Past N RandGauss RandGaussT RandGaussQ RandGeneral(approximating a gaussian) linear N
drand48
double drand48(void)
b
@ b
Definition: testCategories.cc:125
set
set(PACKAGE RandomObjects) list(APPEND $
Definition: RandomObjects/CMakeLists.txt:4
set
set(PACKAGE GenericFunctions) clhep_package_config() add_subdirectory(GenericFunctions) add_subdirectory(src) add_subdirectory(test) if(CLHEP_BUILD_DOCS) message(STATUS "building documents for $
Definition: GenericFunctions/CMakeLists.txt:4
B
Definition: excDblThrow.cc:8
Genfun::ArgumentList
std::vector< Argument > ArgumentList
Definition: CLHEP/GenericFunctions/ArgumentList.hh:7
RandGauss
How the various random distributions are validated The distributions in for example RandGauss
Definition: validation.doc:4
zmex::ZMerrno
ZMerrnoList ZMerrno
Definition: Exceptions/ZMerrno.h:122
is
HepRotation and so forth isNear() norm2() rectify() static Rotation row1 row4(To avoid bloat in the code pulled in for programs which don 't use all these features, we split the implementation .cc files. Only isNear() goes into the original Rotation.cc) --------------------------------------- HepAxisAngle and HepEulerAngles classes --------------------------------------- These classes are very useful and simple structures for holding the result of a nice intuituve decomposition of a rotation there is no longer much content in the distinct ZOOM PhysicsVectors library The only content left in the library is the object files representing the various Exception objects When we build the CLHEP classes for the ZOOM we will set up so as to use ZOOM SpaceVector is(but we can disable namespace usage and most of our users do so at this point). What I do is leave Hep3Vector in the global namespace
SpaceVector
In alll angles are always treated as measured in RADIANS The full set of original signatures for set are still implemented via the SpaceVector h header for compatibility with ZOOM use Use of UnitVector Some code at Fermilab uses and I have also found some situations where the efficiency can make a significant difference I provide UnitVector as a class for ZOOM users in the zmpv namespace via a file UnitVector h This no longer inherits from SpaceVector
Definition: minorMergeIssues.doc:30
set
set(pkginclude_HEADERS BasicVector3D.h Normal3D.h Plane3D.h Point3D.h Transform3D.h Transform3D.icc Vector3D.h) INSTALL(FILES $
Definition: Geometry/Geometry/CMakeLists.txt:2
zmex::ZMexAction
ZMexAction
Definition: CLHEP/Exceptions/ZMexAction.h:20
CLHEP::gammln
double gammln(double xx)
Definition: RandPoisson.cc:55
RotationY
Z these are I think new Just check against the equivalent form by instantiating a general Lor Rot based on a ROtationX and so forth Rotation RotationY
Definition: merge-details.doc:110
set
set(Random_tests testRandom testRandDists) if($
Definition: Random/test/CMakeLists.txt:2
set
set(PACKAGE Vector) clhep_package_config() add_subdirectory(Vector) add_subdirectory(src) add_subdirectory(test) if(CLHEP_BUILD_DOCS) message(STATUS "building documents for $
Definition: Vector/CMakeLists.txt:4
set
set(pkginclude_HEADERS AxisAngle.h AxisAngle.icc Boost.h Boost.icc BoostX.h BoostX.icc BoostY.h BoostY.icc BoostZ.h BoostZ.icc EulerAngles.h EulerAngles.icc LorentzRotation.h LorentzRotation.icc LorentzVector.h LorentzVector.icc Rotation.h Rotation.icc RotationInterfaces.h RotationInterfaces.icc RotationX.h RotationX.icc RotationY.h RotationY.icc RotationZ.h RotationZ.icc Sqr.h ThreeVector.h ThreeVector.icc TwoVector.h TwoVector.icc ZMxpv.h) INSTALL(FILES $
Definition: Vector/Vector/CMakeLists.txt:2
set
set(PACKAGE Geometry) list(APPEND $
Definition: Geometry/CMakeLists.txt:4
clhep_test
clhep_test(testEvaluator) clhep_test(testBug66214 SIMPLE) if(NOT $
Definition: Evaluator/test/CMakeLists.txt:2
validation
How the various random distributions are validated The distributions in for example are independently validated By validation
Definition: validation.doc:7
CLHEP::detail::n
n
Definition: Ranlux64Engine.cc:85
Genfun::ConstMinusFunction::ConstMinusFunction
ConstMinusFunction(double constant, const AbsFunction *arg)
Definition: ConstMinusFunction.cc:9
clhep_test
clhep_test(${test}) endforeach(test $
Definition: Matrix/test/CMakeLists.txt:20
ZMuseCount
Definition: Exceptions/CLHEP/RefCount/ZMuseCount.h:17
clhep_package_config
_DEPS Cast RefCount clhep_package_config() add_subdirectory(Exceptions) add_subdirectory(src) add_subdirectory(test) if(CLHEP_BUILD_DOCS) message(STATUS "building documents for $
Definition: Exceptions/CMakeLists.txt:8
set
set(pkginclude_HEADERS ZMerrno.h ZMerrno.icc ZMexAction.h ZMexClassInfo.h ZMexClassInfo.icc ZMexHandler.h ZMexHandler.icc ZMexLogResult.h ZMexLogger.h ZMexSeverity.h ZMexception.h ZMexception.icc ZMthrow.h arch_spec_Exceptions.mk link_Exceptions.mk) INSTALL(FILES $
Definition: Exceptions/Exceptions/CMakeLists.txt:2
n_element_type::test
void test()
Definition: testSharedPtr.cc:41
set
set(PACKAGE Random) clhep_package_config() add_subdirectory(Random) add_subdirectory(src) add_subdirectory(test) if(CLHEP_BUILD_DOCS) message(STATUS "building documents for $
Definition: Random/CMakeLists.txt:4
common
#define common
f
void f(void g())
Definition: excDblThrow.cc:38
Genfun::AbsFunction::dimensionality
virtual unsigned int dimensionality() const
Definition: AbsFunction.cc:79
set
set(pkginclude_HEADERS DiagMatrix.h DiagMatrix.icc GenMatrix.h GenMatrix.icc Matrix.h Matrix.icc Pile.h SymMatrix.h SymMatrix.icc Vector.h Vector.icc) INSTALL(FILES $
Definition: Matrix/Matrix/CMakeLists.txt:2
CLHEP
Definition: ClhepVersion.h:13
set
set(PACKAGE Units) clhep_package_config_no_lib() add_subdirectory(Units) add_subdirectory(test) if(CLHEP_BUILD_DOCS) message(STATUS "building documents for $
Definition: Units/CMakeLists.txt:4
ZMhandleTo
Definition: Exceptions/CLHEP/RefCount/ZMhandleTo.h:24
zmpv::AxisAngle
CLHEP::HepAxisAngle AxisAngle
Definition: Geometry/CLHEP/Vector/AxisAngle.h:108
clhep_test
clhep_test(${test} SIMPLE NOLIB) endforeach(test $
Definition: Utility/test/CMakeLists.txt:13
Vector
HepGeom::Vector3D< double > Vector
Definition: testTransform3D.cc:20
Genfun::ConstMinusFunction::partial
Derivative partial(unsigned int) const
Definition: ConstMinusFunction.cc:44
clhep_test
clhep_test(${test}) endforeach(test $
Definition: Random/test/CMakeLists.txt:31
Genfun::ConstMinusFunction
Definition: CLHEP/GenericFunctions/ConstMinusFunction.hh:20
packages
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these packages
Definition: keyMergeIssues.doc:7
set
set(PACKAGE Exceptions) list(APPEND $
Definition: Exceptions/CMakeLists.txt:4
Genfun::Argument
Definition: CLHEP/GenericFunctions/Argument.hh:17
clhep_test
clhep_test(${test}) endforeach(test $
Definition: Exceptions/test/CMakeLists.txt:11
PACKAGE
#define PACKAGE
Definition: Cast/Cast/defs.h:9
zmex::ZMexSeverity
ZMexSeverity
Definition: CLHEP/Exceptions/ZMexSeverity.h:32
set
set(GenericFunctions_source Abs.cc AbsFunctional.cc AbsFunction.cc AbsParameter.cc ACos.cc AdaptiveRKStepper.cc AnalyticConvolution.cc ArrayFunction.cc ASin.cc AssociatedLaguerre.cc ATan.cc BetaDistribution.cc BivariateGaussian.cc ClassicalSolver.cc ClebschGordanCoefficientSet.cc ConstMinusFunction.cc ConstMinusParameter.cc ConstOverFunction.cc ConstOverParameter.cc ConstPlusFunction.cc ConstPlusParameter.cc ConstTimesFunction.cc ConstTimesParameter.cc Cos.cc CumulativeChiSquare.cc DefiniteIntegral.cc EfficiencyFunctional.cc EmbeddedRKStepper.cc Erf.cc Exp.cc Exponential.cc FixedConstant.cc FloatingConstant.cc FunctionComposition.cc FunctionConvolution.cc FunctionDifference.cc FunctionDirectProduct.cc FunctionNegation.cc FunctionNoop.cc FunctionNumDeriv.cc FunctionPlusParameter.cc FunctionProduct.cc FunctionQuotient.cc FunctionSum.cc FunctionTimesParameter.cc Gamma.cc GammaDistribution.cc Gaussian.cc IncompleteGamma.cc InterpolatingPolynomial.cc KroneckerDelta.cc Landau.cc LikelihoodFunctional.cc Ln.cc LogGamma.cc LogisticFunction.cc Mod.cc NonrelativisticBW.cc Parameter.cc ParameterComposition.cc ParameterDifference.cc ParameterNegation.cc ParameterProduct.cc ParameterQuotient.cc ParameterSum.cc PeriodicRectangular.cc PhaseSpace.cc Power.cc PtRelFcn.cc PuncturedSmearedExp.cc RCBase.cc Rectangular.cc RelativisticBW.cc ReverseExponential.cc RKIntegrator.cc RungeKuttaClassicalSolver.cc Sigma.cc SimpleRKStepper.cc Sin.cc Sqrt.cc Square.cc StepDoublingRKStepper.cc Tan.cc Theta.cc TrivariateGaussian.cc Variable.cc VoigtProfile.cc X.cc) clhep_build_library(GenericFunctions $
Definition: GenericFunctions/src/CMakeLists.txt:1
set
set(pkginclude_HEADERS ZMhandleTo.h ZMhandleTo.icc ZMuseCount.h ZMuseCount.icc) INSTALL(FILES $
Definition: RefCount/RefCount/CMakeLists.txt:2
set
set(Exceptions_tests testExceptions testThrowFrom exctest1 exctest2 exctest3 exctest4 exctestNothrow) foreach(test $
Definition: Exceptions/test/CMakeLists.txt:2
Genfun::FunctionNoop
Definition: CLHEP/GenericFunctions/FunctionNoop.hh:19
set
set(Vector_tests testThreeVector testLorentzVector) set(Vector_simple_tests testRotation testSubscripts) foreach(test $
Definition: Vector/test/CMakeLists.txt:2
HepGeom::Vector3D< double >
Definition: CLHEP/Geometry/Vector3D.h:102
Genfun::ConstMinusFunction::~ConstMinusFunction
virtual ~ConstMinusFunction()
Definition: ConstMinusFunction.cc:25
Genfun::AbsFunction::partial
virtual Derivative partial(unsigned int) const
Definition: AbsFunction.cc:40
set
set(Vector_source_list AxisAngle.cc Boost.cc BoostX.cc BoostY.cc BoostZ.cc EulerAngles.cc LorentzRotation.cc LorentzRotationC.cc LorentzRotationD.cc LorentzVector.cc LorentzVectorB.cc LorentzVectorC.cc LorentzVectorK.cc LorentzVectorL.cc LorentzVectorR.cc Rotation.cc RotationA.cc RotationC.cc RotationE.cc RotationIO.cc RotationInterfaces.cc RotationL.cc RotationP.cc RotationX.cc RotationY.cc RotationZ.cc SpaceVector.cc SpaceVectorD.cc SpaceVectorP.cc SpaceVectorR.cc ThreeVector.cc ThreeVectorR.cc TwoVector.cc ZMinput.cc ZMxpv.cc) if($
Definition: Vector/src/CMakeLists.txt:2
Genfun::ConstMinusFunction::dimensionality
virtual unsigned int dimensionality() const
Definition: ConstMinusFunction.cc:21
itos
std::string itos(long i)
Definition: itos.cc:18
set
set(pkginclude_HEADERS keywords.h memory.h noncopyable.h type_traits.h) INSTALL(FILES $
Definition: Utility/Utility/CMakeLists.txt:2
set
set(pkginclude_HEADERS itos.h) INSTALL(FILES $
Definition: Cast/Cast/CMakeLists.txt:2
set
set(Utility_simple_tests testNoncopyable testPrimaryTraits testCategories testIsSame testIsConvertible testSharedPtrBasic testSharedPtrConvertible testSharedPtr testWeakPtr) foreach(test $
Definition: Utility/test/CMakeLists.txt:2
s
Methods applicble to containers of as in std::list< LorentzVector > s
Definition: keyMergeIssues.doc:328
ConstMinusFunction.hh
i
long i
Definition: JamesRandomSeeding.txt:27
set
set(PACKAGE Matrix) set(CMAKE_CXX_FLAGS "$
Definition: Matrix/CMakeLists.txt:4
set
set(pkginclude_HEADERS AbsFunctional.hh AbsFunction.hh Abs.hh AbsParameter.hh ACos.hh AdaptiveRKStepper.hh Airy.hh Airy.icc AnalyticConvolution.hh Argument.hh ArgumentList.hh ArrayFunction.hh ASin.hh AssociatedLaguerre.hh AssociatedLegendre.hh AssociatedLegendre.icc ATan.hh Bessel.hh Bessel.icc BetaDistribution.hh BivariateGaussian.hh ButcherTableau.hh ButcherTableau.icc ClassicalSolver.hh ClebschGordanCoefficientSet.hh ConstMinusFunction.hh ConstMinusParameter.hh ConstOverFunction.hh ConstOverParameter.hh ConstPlusFunction.hh ConstPlusParameter.hh ConstTimesFunction.hh ConstTimesParameter.hh Cos.hh CumulativeChiSquare.hh CutBase.hh CutBase.icc DefiniteIntegral.hh DoubleParamToArgAdaptor.hh DoubleParamToArgAdaptor.icc EfficiencyFunctional.hh EllipticIntegral.hh EllipticIntegral.icc EmbeddedRKStepper.hh Erf.hh Exp.hh Exponential.hh ExtendedButcherTableau.hh ExtendedButcherTableau.icc FixedConstant.hh FloatingConstant.hh FourierFit.hh FourierFit.icc FunctionComposition.hh FunctionConvolution.hh FunctionDifference.hh FunctionDirectProduct.hh FunctionNegation.hh FunctionNoop.hh FunctionNumDeriv.hh FunctionPlusParameter.hh FunctionProduct.hh FunctionQuotient.hh FunctionSum.hh FunctionTimesParameter.hh GammaDistribution.hh Gamma.hh Gaussian.hh GenericFunctions.hh IncompleteGamma.hh InterpolatingPolynomial.hh KroneckerDelta.hh Landau.hh LegendreCoefficientSet.hh LegendreCoefficientSet.icc LegendreExpansion.hh LegendreExpansion.icc LegendreFit.hh LegendreFit.icc Legendre.hh Legendre.icc LikelihoodFunctional.hh Ln.hh LogGamma.hh LogisticFunction.hh Mod.hh NonrelativisticBW.hh ParameterComposition.hh ParameterDifference.hh Parameter.hh ParameterNegation.hh ParameterProduct.hh ParameterQuotient.hh ParameterSum.hh ParamToArgAdaptor.hh ParamToArgAdaptor.icc PeriodicRectangular.hh PhaseSpace.hh Power.hh Psi2Hydrogen.hh Psi2Hydrogen.icc PtRelFcn.hh PuncturedSmearedExp.hh RCBase.hh Rectangular.hh RelativisticBW.hh ReverseExponential.hh RKIntegrator.hh RungeKuttaClassicalSolver.hh Sigma.hh SimpleRKStepper.hh Sin.hh SphericalBessel.hh SphericalBessel.icc SphericalHarmonicCoefficientSet.hh SphericalHarmonicCoefficientSet.icc SphericalHarmonicExpansion.hh SphericalHarmonicExpansion.icc SphericalHarmonicFit.hh SphericalHarmonicFit.icc SphericalNeumann.hh SphericalNeumann.icc Sqrt.hh Square.hh StepDoublingRKStepper.hh SymToArgAdaptor.hh SymToArgAdaptor.icc Tan.hh Theta.hh TrivariateGaussian.hh Variable.hh VoigtProfile.hh X.hh) INSTALL(FILES $
Definition: GenericFunctions/GenericFunctions/CMakeLists.txt:2
HepTuple
Introduction to the Use of Zoom Exceptions W E last revised Jan Introduction This summary describes the mechanics decided on for creating and throwing a ZMexception as implemented by the zoom Exceptions package Note that all public C symbols used within this Exceptions class begin with the unlikely prefix we use ZMexception as the name of the class from which all other exception classes all ZOOM generated ZMexception classes will use at least ZMx as their name prefix More to avoid internal name the names start with a short string identifying the e g ZMxHep for HepTuple
Definition: mechanics_ZMx.txt:22
HepGeom::Rotate3D
Definition: CLHEP/Geometry/Transform3D.h:375
for
for(n=1 ;n< 98 ;n++)
Definition: JamesRandomSeeding.txt:34
clhep_test
clhep_test(${test}) endforeach(test $
Definition: Vector/test/CMakeLists.txt:8
endif
RotationXYZ cc endif() clhep_build_library(Vector $
Definition: Vector/src/CMakeLists.txt:42
x
any side effects of that construction would occur twice The semantics of throw x
Definition: whyZMthrowRethrows.txt:37
set
set(pkginclude_HEADERS RandMultiGauss.h RandomVector.h RandomVector.icc) INSTALL(FILES $
Definition: RandomObjects/RandomObjects/CMakeLists.txt:2
set
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DINSTALLATION_CHECK") set(Matrix_tests testMatrix testInversion testBug6176) if($
Definition: Matrix/test/CMakeLists.txt:3
include
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/ClhepOutOfSourceBuild.cmake) clhep_ensure_out_of_source_build() cmake_minimum_required(VERSION 2.6) project(CLHEP) set(VERSION 2.1.4.1) set(CMAKE_MODULE_PATH $
Definition: CMakeLists.txt:24
set
set(pkginclude_HEADERS Evaluator.h) INSTALL(FILES $
Definition: Evaluator/Evaluator/CMakeLists.txt:2
n_constructors::m
int m
Definition: testSharedPtr.cc:370
FUNCTION_OBJECT_IMP
#define FUNCTION_OBJECT_IMP(classname)
Definition: CLHEP/GenericFunctions/AbsFunction.hh:156
RotationZ
namespace and inside the zmpv namespace it typedef s UnitVector to be HepUnit3Vector The conversion which provide those methods available for GETTING INFORMATION if an object might be either a Rotation or a RotationZ
Definition: keyMergeIssues.doc:294
Genfun::ConstMinusFunction::operator()
virtual double operator()(double argument) const
Definition: ConstMinusFunction.cc:32
zmpv::EulerAngles
CLHEP::HepEulerAngles EulerAngles
Definition: Geometry/CLHEP/Vector/EulerAngles.h:106
set
set(pkginclude_HEADERS GlobalPhysicalConstants.h GlobalSystemOfUnits.h PhysicalConstants.h SystemOfUnits.h) INSTALL(FILES $
Definition: Units/Units/CMakeLists.txt:2
set
set(pkginclude_HEADERS DoubConv.hh DRand48Engine.h DualRand.h EngineFactory.h engineIDulong.h Hurd160Engine.h Hurd288Engine.h JamesRandom.h MTwistEngine.h NonRandomEngine.h RandBinomial.h RandBinomial.icc RandBit.h RandBit.icc RandBreitWigner.h RandBreitWigner.icc RandChiSquare.h RandChiSquare.icc RandEngine.h RandExponential.h RandExponential.icc RandExpZiggurat.h RandFlat.h RandFlat.icc RandGamma.h RandGamma.icc RandGauss.h RandGauss.icc RandGaussQ.h RandGaussQ.icc RandGaussT.h RandGaussT.icc RandGaussZiggurat.h RandGeneral.h RandGeneral.icc RandLandau.h RandLandau.icc RandomEngine.h RandomEngine.icc Random.h Random.icc Randomize.h RandomFunc.h RandPoisson.h RandPoisson.icc RandPoissonQ.h RandPoissonQ.icc RandPoissonT.h RandPoissonT.icc RandSkewNormal.h RandSkewNormal.icc RandStudentT.h RandStudentT.icc RanecuEngine.h Ranlux64Engine.h RanluxEngine.h RanshiEngine.h SeedTable.h Stat.h StaticRandomStates.h TripleRand.h) INSTALL(FILES $
Definition: Random/Random/CMakeLists.txt:2
Genfun
Definition: CLHEP/GenericFunctions/Abs.hh:14