#ifndef PSEUDO_VOIGT_2CONV_H
#define PSEUDO_VOIGT_2CONV_H 1
#include "AdvFuncConv.hh"
#include "AdvFuncBase.hh"
#include "AdvGaussian.hh"
#include "AdvLorentzian.hh"

#define NumberOfParamForPseudoVoigt2Conv 5U

/**
 *  psedo voigt function (gaussian + lorentzian)
 */
class AdvPseudoVoigt2Conv : public AdvFuncBase, public AdvFuncConv {

    private:
        AdvGaussian   gaussian;
        AdvLorentzian lorentzian;

    public:
        /** default constructor */
        AdvPseudoVoigt2Conv();
        /** copy constructor */
        AdvPseudoVoigt2Conv(const AdvPseudoVoigt2Conv &obj);

        /** destructor */
        ~AdvPseudoVoigt2Conv();

        ///** assigne operator */
        //AdvPseudoVoigt2 operator=(const AdvPseudoVoigt2 &obj);

        Double PseudoVoigt2Func(const Double x, const Double h, const Double c, const Double s, const Double g, const Double m);
        Double PseudoVoigt2ConvFunc(const Double x, const Double h, const Double c, const Double s, const Double g, const Double m);

        /** evaluate the value of the function */
        //Double eval(const Double x, const Double h, const Double c, const Double s, const Double g, const Double m);
        /** evaluate the value of the 1st. differential coefficient */
        //Double der1st(const Double x, const Double h, const Double c, const Double s, const Double g, const Double m);
        /** evaluate the value of the 2nd. differential coefficient */
        //Double der2nd(const Double x, const Double h, const Double c, const Double s, const Double g, const Double m);

#ifdef USE_POINTER
        /** evaluate the value of the function */
        Double eval(const Double x, const Double *p);
#ifdef HAVE_DIFFERENTIAL_MEMBER
        /** evaluate the value of the 1st. differential coefficient */
        Double der1st(const Double x, const Double *p);
        /** evaluate the value of the 2nd. differential coefficient */
        Double der2nd(const Double x, const Double *p);
        /** evaluate the gradient of the function for parameters */
        Double *gradient(const Double x, const Double *p);
#endif //  HAVE_DIFFERENTIAL_MEMBER
#endif // USE_POINTER

#ifdef USE_VECTOR
        /** evaluate the value of the function */
        Double eval(const Double x, const vector<Double> &p);
#ifdef HAVE_DIFFERENTIAL_MEMBER
        /** evaluate the value of the 1st. differential coefficient */
        Double der1st(const Double x, const vector<Double> &p);
        /** evaluate the value of the 2nd. differential coefficient */
        Double der2nd(const Double x, const vector<Double> &p);
        /** evaluate the gradient of the function for parameters */
        vector<Double> gradient(const Double x, const vector<Double> &p);
#endif // HAVE_DIFFERENTIAL_MEMBER
#endif // USE_VECTOR
};

#endif
