1 #ifndef SimTK_DIFFERENTIATOR_H_ 2 #define SimTK_DIFFERENTIATOR_H_ 86 class OpNotAllowedForFunctionOfThisShape;
87 class UserFunctionThrewAnException;
88 class UserFunctionReturnedNonzeroStatus;
89 class UnknownMethodSpecified;
97 static bool isValidMethod(
Method);
98 static const char* getMethodName(
Method);
99 static int getMethodOrder(
Method);
103 Method defaultMethod=UnspecifiedMethod);
108 Method getDefaultMethod()
const;
113 Method=UnspecifiedMethod)
const;
115 Method=UnspecifiedMethod)
const;
117 Method=UnspecifiedMethod)
const;
127 void resetAllStatistics();
128 int getNumDifferentiations()
const;
129 int getNumDifferentiationFailures()
const;
130 int getNumCallsToUserFunction()
const;
133 class DifferentiatorRep;
136 DifferentiatorRep* rep;
159 int getNumFunctions()
const;
160 int getNumParameters()
const;
161 Real getEstimatedAccuracy()
const;
164 void resetAllStatistics();
165 int getNumCalls()
const;
166 int getNumFailures()
const;
182 #if defined(_MSC_VER) && (_MSC_VER >= 1900) 199 virtual int f(
Real x,
Real& fx)
const=0;
218 virtual int f(
const Vector& y,
Real& fy)
const=0;
251 #endif // SimTK_DIFFERENTIATOR_H_ FunctionRep * rep
Definition: Differentiator.h:175
Given a function f(y), where f, y or both can be vectors, calculate the derivative (gradient...
Definition: Differentiator.h:77
Derive a concrete class from this one if you have a scalar function of a single scalar variable that ...
Definition: Differentiator.h:197
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:593
Includes internal headers providing declarations for the basic SimTK Core classes, including Simmatrix.
This abstract class defines a function to be differentiated (repeatedly) by a Differentiator object...
Definition: Differentiator.h:152
Method
Definition: Differentiator.h:92
virtual ~GradientFunction()
Definition: Differentiator.h:222
This is the header file that every Simmath compilation unit should include first. ...
virtual ~ScalarFunction()
Definition: Differentiator.h:203
Derive a concrete class from this one if you have a scalar function of multiple variables that you wa...
Definition: Differentiator.h:216
Function_< Real > Function
This typedef is used for the very common case that the return type of the Function object is Real...
Definition: Function.h:106
#define SimTK_SIMMATH_EXPORT
Definition: SimTKmath/include/simmath/internal/common.h:64
Derive a concrete class from this one if you have a set of functions (i.e., a vector-valued function)...
Definition: Differentiator.h:235
virtual ~JacobianFunction()
Definition: Differentiator.h:241