Name space for solvers.
More...
|
concept | method |
| Solver method concept.
|
|
|
template<jit::float_scalar T, bool SAFE_MATH = false> |
void | newton (workflow::manager< T, SAFE_MATH > &work, graph::output_nodes< T, SAFE_MATH > vars, graph::input_nodes< T, SAFE_MATH > inputs, graph::shared_leaf< T, SAFE_MATH > func, graph::shared_random_state< T, SAFE_MATH > state, const T tolarance=1.0E-30, const size_t max_iterations=1000, const T step=1.0) |
| Determine the value of vars to minimze the loss function.
|
|
◆ newton()
void solver::newton |
( |
workflow::manager< T, SAFE_MATH > & |
work, |
|
|
graph::output_nodes< T, SAFE_MATH > |
vars, |
|
|
graph::input_nodes< T, SAFE_MATH > |
inputs, |
|
|
graph::shared_leaf< T, SAFE_MATH > |
func, |
|
|
graph::shared_random_state< T, SAFE_MATH > |
state, |
|
|
const T |
tolarance = 1.0E-30 , |
|
|
const size_t |
max_iterations = 1000 , |
|
|
const T |
step = 1.0 |
|
) |
| |
Determine the value of vars to minimze the loss function.
This uses newtons methods to solver for D(x) = 0.
- Template Parameters
-
T | Base type of the calculation. |
SAFE_MATH | Use Safe Math operations. |
- Parameters
-
[in,out] | work | Workflow manager. |
[in] | vars | The unknowns to solver for. |
[in] | inputs | Inputs for jit compile. |
[in] | func | Function to find the root of. |
[in] | state | Random state node. |
[in] | tolarance | Tolarance to solve the dispersion function to. |
[in] | max_iterations | Maximum number of iterations before giving up. |
[in] | step | Newton step size. |