CLHEP/GenericFunctions/FunctionNegation.hh

// -*- C++ -*-
// $Id: FunctionNegation.hh,v 1.2 2001/05/16 05:10:33 joeb Exp $
//--------------------------FunctionNegation--------------------------------//
//                                                                          //
// Class FunctionNegation, output of the unary - operator                   //
// Joe Boudreau, Petar Maksimovic, November 1999                            //
//                                                                          //
//--------------------------------------------------------------------------//
#ifndef FunctionNegation_h
#define FunctionNegation_h 1
#include "CLHEP/GenericFunctions/AbsFunction.hh"

HEP_BEGIN_NAMESPACE(Genfun)

  class FunctionNegation : public AbsFunction {
  
    FUNCTION_OBJECT_DEF(FunctionNegation)

      public:

    // Constructor
    FunctionNegation(const AbsFunction *arg1);
  
    // Copy constructor.
    FunctionNegation(const FunctionNegation &right);
  
    // Destructor
    virtual ~FunctionNegation();
  
    // Retreive function value
    virtual double operator ()(double argument) const;
    virtual double operator ()(const Argument & a) const;
  
    // Dimensionality 
    virtual unsigned int dimensionality() const;

    // Derivative.  
    Derivative partial (unsigned int) const;

    // Does this function have an analytic derivative?
    virtual bool hasAnalyticDerivative() const {return true;}

  private:
  
    // It is illegal to assign a FunctionNegation
    const FunctionNegation & operator=(const FunctionNegation &right);

    // The function we're negating.  
    const AbsFunction *_arg1;
  };
HEP_END_NAMESPACE(Genfun)
#endif

Generated by GNU enscript 1.6.1.