12 #ifndef BOGUS_NS_NETWON_HPP
13 #define BOGUS_NS_NETWON_HPP
24 template <
typename NSFunction >
28 typedef typename NSFunction::Traits Traits ;
29 typedef typename Traits::Scalar Scalar ;
30 typedef typename Traits::Vector Vector ;
31 typedef typename Traits::Matrix Matrix ;
34 : m_func( func ), m_tol( tol ), m_maxIters( 20 )
42 Scalar
solve ( Vector &x )
const ;
45 void setMaxIters(
unsigned maxIters ) { m_maxIters = maxIters ; }
48 void setTol( Scalar tol ) { m_tol = tol ; }
51 const NSFunction& m_func ;
void setMaxIters(unsigned maxIters)
Sets the maximum number of iterations.
Definition: NonSmoothNewton.hpp:45
void setTol(Scalar tol)
Sets the solver tolerance.
Definition: NonSmoothNewton.hpp:48
Dense, naive Newton implementation.
Definition: NonSmoothNewton.hpp:25
Scalar solve(Vector &x) const
Tries to find x such that m_func( x ) = 0.