1 #include <../../nrnconf.h>
43 #if defined(__cplusplus)
53 double (*f)(
double*,
long int),
59 #if defined(__cplusplus)
64 extern double chkarg(
int,
double,
double);
76 static double efun(
double*,
long int);
117 double minerrsav, *minargsav, maxstepsizesav, tolerancesav;
118 long int printmodesav, nvarsav;
120 Object *efun_py_save, *efun_py_arg_save;
121 void* vec_py_save_save;
125 double minerr_, *minarg_;
128 Object *efun_py_, *efun_py_arg_;
151 nvar_ = (int)
chkarg(1, 0., 1e6);
153 if (!efun_sym_ || (efun_sym_->
type !=
FUNCTION && efun_sym_->
type != FUN_BLTIN)) {
167 minarg_ = (
double*)
ecalloc(nvar_,
sizeof(
double));
170 hoc_execerror(
"call attr_praxis first to set attributes", 0);
177 after_quad = (
char*) 0;
226 for (
i = 0;
i < nvar_; ++
i) {
280 static double efun(
double*
v,
long int n) {
285 for (
i = 0;
i <
n; ++
i) {
289 for (
i = 0;
i <
n; ++
i) {
300 for (
i = 0;
i <
n; ++
i) {
void hoc_execerror(const char *, const char *)
int hoc_is_object_arg(int narg)
double hoc_call_func(Symbol *s, int narg)
void hoc_pushpx(double *d)
void hoc_retpushx(double x)
void hoc_obj_ref(Object *obj)
Symbol * hoc_lookup(const char *)
int hoc_is_pdouble_arg(int narg)
double * hoc_pgetarg(int narg)
void hoc_obj_unref(Object *obj)
void * ecalloc(size_t n, size_t size)
int vector_capacity(IvocVect *)
double(* nrnpy_praxis_efun)(Object *pycallable, Object *hvec)
Object ** hoc_objgetarg(int)
static long int printmode
void vector_resize(IvocVect *, int)
double chkarg(int, double, double)
double * praxis_paxis(int)
static Object * efun_py_arg
void hoc_after_prax_quad(char *s)
double * vector_vec(IvocVect *)
void vector_delete(IvocVect *vec)
static double efun(double *, long int)
IvocVect * vector_arg(int)
IvocVect * vector_new2(IvocVect *vec)
static double maxstepsize
Object ** vector_pobj(IvocVect *v)
static Symbol * hoc_efun_sym
static void * vec_py_save
double praxis(double *t0, double *machep, double *h0, long int nval, long int *prin, double *x, double(*f)(double *, long int), double *fmin, char *after_quad)
int hoc_obj_run(const char *, Object *)
int const size_t const size_t n