提交 5da7affa 编写于 作者: S stevenj

dynamic allocation in praxis, pass stop parameter (not used yet)

darcs-hash:20070902001903-c8de0-4e82ae47b3eaf665dc3185dc38ff75c6d323a74b.gz
上级 52c4c7c8
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <float.h>
#include "nlopt.h"
#include "nlopt-util.h"
......@@ -287,8 +288,8 @@ static nlopt_result nlopt_minimize_(
case NLOPT_LN_PRAXIS: {
double t0 = xtol_rel, macheps = 1e-14;
double h0 = 0.1;
*fmin = praxis_(&t0, &macheps, &h0, &n, x, f_subplex, &d);
break;
return praxis_(&t0, DBL_EPSILON, &h0, n, x, f_subplex, &d,
&stop, &fmin);
}
case NLOPT_LD_LBFGS: {
......
AM_CPPFLAGS = -I$(top_srcdir)/util
AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api
noinst_LTLIBRARIES = libpraxis.la
libpraxis_la_SOURCES = praxis.c praxis.h
......
此差异已折叠。
#ifndef PRAXIS_H
#define PRAXIS_H
#include "nlopt-util.h"
#include "nlopt.h"
#ifdef __cplusplus
extern "C"
{
......@@ -8,8 +11,9 @@ extern "C"
typedef double (*praxis_func)(int n, const double *x, void *f_data);
double praxis_(double *t0, double *machep, double *h0,
int *n, double *x, praxis_func f, void *f_data);
nlopt_result praxis_(double *t0, double machep, double *h0,
int n, double *x, praxis_func f, void *f_data,
nlopt_stopping *stop, double *minf);
#ifdef __cplusplus
} /* extern "C" */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册