![]() |
API
4.3
For C++ developers
|
A class for finding the N roots of N one-dimensional non-linear equations. More...
Public Member Functions | |
RootSolver (VectorFunctionUncoupledNxN *aFunc) | |
virtual | ~RootSolver () |
Array< double > | solve (const SimTK::State &s, const Array< double > &ax, const Array< double > &bx, const Array< double > &tol) |
A class for finding the N roots of N one-dimensional non-linear equations.
The rational for making this class solve for the roots of N equations simultaneously is that, for some problems, it is more computationally efficient to evaluate the N equations at the same time, as opposed to one after the other. That is, the N equations, though decoupled, do share some common terms.
This class can always be used for a system where N=1, although there will be some small amount of overhead for this class to function in this way when compared to a class that is dedicated to an N=1.
To construct an instance of this class, the user must provide an instance of a VectorFunctionUncoupledNxN.
OpenSim::RootSolver::RootSolver | ( | VectorFunctionUncoupledNxN * | aFunc | ) |
|
virtual |
Array<double> OpenSim::RootSolver::solve | ( | const SimTK::State & | s, |
const Array< double > & | ax, | ||
const Array< double > & | bx, | ||
const Array< double > & | tol | ||
) |