Go to the documentation of this file. 1 #ifndef __JMATH__JTRIGONOMETRIC__
2 #define __JMATH__JTRIGONOMETRIC__
16 namespace JPP {
using namespace JMATH; }
33 typedef double (*
pF)(double);
44 if (
f1 != sin &&
f1 != cos) {
45 throw JException(
"Invalid trigonometric function.");
113 throw JException(
"Invalid trigonometric function.");
129 throw JException(
"Invalid trigonometric function.");
144 if (in >>
object.
factor >> buffer) {
147 else if (buffer ==
"cos")
150 throw JException(
"Invalid trigonometric function.");
166 out <<
object.factor;
168 if (
object.
f1 == sin)
170 else if (
object.
f1 == cos)
173 throw JException(
"Invalid trigonometric function.");
JTrigonometric(pF f1, const double factor=1.0)
Constructor.
double(* pF)(double)
Type definition of pointer to trigonometric function.
double operator()(const double x) const
Function value.
double getIntegral(const double x) const
Integral value.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getDerivative(const double x) const
Derivative value.
JTrigonometric getDerivative() const
Derivative function.
friend std::istream & operator>>(std::istream &in, JTrigonometric &object)
Read trigonometric from input.
Auxiliary classes and methods for mathematical operations.
friend std::ostream & operator<<(std::ostream &out, const JTrigonometric &object)
Write trigonometric to output.
double getValue(const double x) const
Function value.
JTrigonometric getIntegral() const
Integral function.
Trigonometric function object for sin and cos.