26 #ifndef CASADI_NEWTON_HPP
27 #define CASADI_NEWTON_HPP
29 #include "casadi/core/rootfinder_impl.hpp"
30 #include <casadi/solvers/casadi_rootfinder_newton_export.h>
83 std::string
class_name()
const override {
return "Newton";}
87 return new Newton(name, f);
97 void init(
const Dict& opts)
override;
103 int init_mem(
void* mem)
const override;
109 void set_work(
void* mem,
const double**& arg,
double**& res,
110 casadi_int*& iw,
double*& w)
const override;
113 int solve(
void* mem)
const override;
119 Dict get_stats(
void* mem)
const override;
149 void printIteration(std::ostream &stream)
const;
152 void printIteration(std::ostream &stream, casadi_int iter,
153 double abstol,
double abstolStep,
double alpha)
const;
Helper class for Serialization.
'newton' plugin for Rootfinder
const char * plugin_name() const override
static const std::string meta_doc
A documentation string.
casadi_int print_iteration_interval_
If true, each iteration will be printed.
static const Options options_
Options.
const Options & get_options() const override
Options.
bool print_iteration_
If true, each iteration will be printed.
std::string class_name() const override
Readable name of the internal class.
void free_mem(void *mem) const override
Free memory block.
double abstolStep_
Absolute tolerance that should be met on step.
void * alloc_mem() const override
Create memory block.
static Rootfinder * creator(const std::string &name, const Function &f)
Create a new Rootfinder.
static ProtoFunction * deserialize(DeserializingStream &s)
Deserialize into MX.
casadi_int max_iter_
Maximum number of Newton iterations.
double abstol_
Absolute tolerance that should be met on residual.
Base class for FunctionInternal and LinsolInternal.
Helper class for Serialization.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
const char * return_status
Options metadata for a class.