23 #ifndef O2SCL_ODE_FUNCT_H 24 #define O2SCL_ODE_FUNCT_H 33 #include <boost/numeric/ublas/vector.hpp> 35 #include <o2scl/shunting_yard.h> 37 #ifndef DOXYGEN_NO_O2NS 43 typedef std::function<int(
double,
size_t,
57 template<
class vec_
string_t=std::vector<std::
string> >
59 vec_string_t &funcs, std::string var) {
64 for(
size_t i=0;i<nv;i++) {
66 calc[i].compile(exprs[i].c_str(),&
vars);
78 template<
class vec_
string_t=std::vector<std::
string> >
80 vec_string_t &funcs, std::string var) {
84 for(
size_t i=0;i<nv;i++) {
101 template <
class vec_y_t=boost::numeric::ublas::vector<
double>,
102 class vec_dydx_t=vec_y_t>
103 int operator()(
double x,
size_t nv,
const vec_y_t &y,
106 for(
size_t i=0;i<
st_nv;i++) {
110 for(
size_t i=0;i<
st_nv;i++) {
116 #ifndef DOXYGEN_INTERNAL 124 std::map<std::string,double>
vars;
146 #ifndef DOXYGEN_NO_O2NS int set_parm(std::string name, double val)
Set the values of the auxilliary parameters that were specified in 'parms' in the constructor...
size_t st_nv
The number of variables.
The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
std::vector< calculator > calc
The function parser.
void set_function(size_t nv, vec_string_t &exprs, vec_string_t &funcs, std::string var)
Specify the string and the parameters.
std::map< std::string, double > vars
Desc.
One-dimensional function from strings.
std::vector< std::string > st_funcs
The function names.
std::vector< std::string > st_forms
The expressions.
ode_funct11_strings(size_t nv, vec_string_t &exprs, vec_string_t &funcs, std::string var)
Specify the string and the parameters.
std::function< int(double, size_t, const boost::numeric::ublas::vector< double > &, boost::numeric::ublas::vector< double > &)> ode_funct11
Ordinary differential equation function.
std::string st_var
The variables.