6 #ifndef realroot_SOLVE_SBDSLV_STRGY_NEWTON_HPP
7 #define realroot_SOLVE_SBDSLV_STRGY_NEWTON_HPP
19 template<
class system,
class _previous_ = empty<system> >
29 if ( !_previous_::process(slv) )
return false;
33 sz_t nvars = slv->
nvr();
34 sz_t neqs = slv->
neqs();
37 slv->restrict(selected,neqs);
39 creal_t jac[nvars*neqs];
43 for ( sz_t v = 0; v < nvars; v ++ )
44 add += (szs[v]-1)/2*str[v];
45 for ( sz_t s = 0; s < nvars; s ++ )
48 creal_t * src = slv->
elldata(e);
50 for ( sz_t v = 0; v < nvars; v ++ )
51 jac[s*nvars+v] = (src[add+str[v]]-src[add])/(slv->
top()[v].size()*szs[v]);
61 creal_t ijac[nvars*nvars];
67 for ( sz_t e = 0; e < nvars; e ++ )
83 sz_t sv = selected[0];
84 for ( sz_t e = 0; e< neqs-1; e ++ )
85 selected[e] = selected[e+1];
86 selected[neqs-1] = sv;
eenv_t m_elenv
Definition: system_system.h:264
dstack_t::interval_t interval_t
Definition: system_system.h:31
int * szs()
Definition: tensor_eenv_fcts.hpp:12
sz_t nvr() const
Definition: system_system.h:84
T * top()
Definition: system_nstack.h:34
int sz_t
Definition: system_system.h:35
void elevate(sz_t e, const texp::false_t &)
Definition: system_system.h:433
int * str()
Definition: tensor_eenv_fcts.hpp:21
bool project(sz_t *eqs=0, sz_t ne=0)
Definition: system_system.h:548
void transform(creal_t *mat, sz_t *eqs, sz_t n)
Definition: system_system.h:530
real_t creal_t
Definition: system_system.h:28
system::interval_t interval_t
Definition: strgy_newton.h:24
bool process(system *slv)
Definition: strgy_newton.h:26
Definition: system_system.h:25
system::creal_t creal_t
Definition: strgy_newton.h:22
Definition: strgy_newton.h:20
sz_t * m_eqssel
Definition: system_system.h:46
const C & c
Definition: Interval_glue.hpp:45
system::sz_t sz_t
Definition: strgy_newton.h:23
sz_t neqs() const
Definition: system_system.h:85
bool LUinverse(real_t *iM, real_t const *const M, unsigned n)
Definition: linear_doolittle.hpp:74
creal_t * elldata(sz_t e)
Definition: system_system.h:405
void add(dynamic_exp< E > &r, const dynamic_exp< E > &A, const dynamic_exp< E > &B)
Definition: dynamicexp.hpp:295
#define assert(expr, msg)
Definition: shared_object.hpp:57