File indexing completed on 2025-01-18 10:04:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _math_TrigonometricEquationFunction_HeaderFile
0018 #define _math_TrigonometricEquationFunction_HeaderFile
0019
0020 #include <math_FunctionWithDerivative.hxx>
0021
0022
0023
0024
0025 class math_TrigonometricEquationFunction : public math_FunctionWithDerivative
0026 {
0027 Standard_Real myAA;
0028 Standard_Real myBB;
0029 Standard_Real myCC;
0030 Standard_Real myDD;
0031 Standard_Real myEE;
0032
0033 public:
0034
0035 math_TrigonometricEquationFunction(const Standard_Real A,
0036 const Standard_Real B,
0037 const Standard_Real C,
0038 const Standard_Real D,
0039 const Standard_Real E)
0040 : myAA(A), myBB(B), myCC(C), myDD(D), myEE(E)
0041 {
0042 }
0043
0044 Standard_Boolean Value(const Standard_Real X, Standard_Real& F) {
0045 Standard_Real CN = cos(X), SN = sin(X);
0046
0047 F = CN*(myAA*CN + (myBB + myBB)*SN + myCC) + myDD*SN + myEE;
0048 return Standard_True;
0049 }
0050
0051 Standard_Boolean Derivative(const Standard_Real X, Standard_Real& D) {
0052 Standard_Real CN = Cos(X), SN = Sin(X);
0053
0054 D = -myAA*CN*SN + myBB*(CN*CN - SN*SN);
0055 D += D;
0056 D += -myCC*SN + myDD*CN;
0057 return Standard_True;
0058 }
0059
0060 Standard_Boolean Values(const Standard_Real X, Standard_Real& F, Standard_Real& D) {
0061 Standard_Real CN = Cos(X), SN = Sin(X);
0062
0063
0064 Standard_Real AACN = myAA*CN;
0065 Standard_Real BBSN = myBB*SN;
0066
0067 F = AACN*CN + BBSN*(CN + CN) + myCC*CN + myDD*SN + myEE;
0068 D = -AACN*SN + myBB*(CN*CN - SN*SN);
0069 D += D;
0070 D += -myCC*SN + myDD*CN;
0071 return Standard_True;
0072 }
0073 };
0074
0075 #endif