GeoModel - GeoModelCore
Main Page
Related Pages
Classes
Files
File List
GeoGenericFunctions
src
Sin.cpp
1
//==========================================================================//
2
// Imported from the QAT library (qat.pitt.edu) by the copyright holder //
3
// Joe Boudreau. Software licensed under the terms and conditions of the //
4
// GNU Lesser Public License v3. //
5
//==========================================================================//
6
#include "GeoGenericFunctions/Sin.h"
7
#include "GeoGenericFunctions/Cos.h"
8
#include <stdexcept>
9
#include <cmath>
10
11
namespace
GeoGenfun
{
12
FUNCTION_OBJECT_IMP(Sin)
13
14
Sin::Sin()
15
{}
16
17
Sin::~Sin() {
18
}
19
20
Sin::Sin(
const
Sin & right) : AbsFunction(right)
21
{ }
22
23
24
double
Sin::operator() (
double
x)
const
{
25
return
sin(x);
26
}
27
28
29
30
Derivative Sin::partial(
unsigned
int
index)
const
{
31
if
(index!=0)
throw
std::range_error(
"Sin: partial derivative index out of range"
);
32
const
AbsFunction & fPrime = Cos();
33
return
Derivative(& fPrime);
34
}
35
36
}
// namespace GeoGenfun
GeoGenfun
Definition:
Abs.h:15
Generated on Thu May 28 2020 05:11:07 for GeoModel - GeoModelCore by
1.8.11