📣 An issue occured with the embedded container registry on October 25 2021, between 10:30 and 12:10 (UTC+2). Any persisting issues should be reported to CC-IN2P3 Support. 🐛

Commit 865818d8 authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

Merge branch 'master' of gitlab.in2p3.fr:campagne/LagSHT

parents 470b1e42 66afe14f
#ifndef UTIL_H_SEEN
#define UTIL_H_SEEN
/*
* This file is part of LagSHT.
*
* LagSHT is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* LagSHT is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with libsharp; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* LagSHT is being developed at the Linear Accelerateur Laboratory (LAL)
* 91898 ORSAY CEDEX - FRANCE
* main author: J.E Campagne
*/
namespace LagSHT {
/* 1D function Class
*/
/*!
\class GenericFunction
\brief Base class definition for objects representing functions
*/
class GenericFunction {
public:
GenericFunction() { }
virtual ~GenericFunction() { }
};
/*!
\class ClassFunc1D
\brief Abstract interface definition for 1 D real functions viewed as classes
This class represents real function of a single real argument : double f(double x)
Inheriting classes should define the double operator()(double x)
For convenience, ClassFunc has been defined using a typedef as an alias
*/
class ClassFunc1D : public GenericFunction {
public:
virtual double operator()(double x) const =0;
};
//! typedef definition of ClassFunc as ClassFunc1D for convenience
typedef ClassFunc1D ClassFunc ;
/*!
\class Function1D
\brief ClassFunc constructed from a a function:simple forward to function
For convenience, ClassFunc has been defined using a typedef as an alias
*/
//ClassFunc constructed from a a function:simple forward to function
class Function1D : public ClassFunc1D {
private:
double (*f)(double);
public:
Function1D(double (*g)(double)):f(g){}
virtual double operator()(double x) const { return f(x);}
};
typedef Function1D Function;
}//end namespace
#endif //UTIL_H_SEEN
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment