00001 #ifndef NPS_LSEARCH_H
00002 #define NPS_LSEARCH_H
00003 #if !defined BUILDING_NPS_LSEARCH && !defined NPS_SMALL
00004 # define NPS_LSEARCH_LKG static inline
00005 #else
00006 # define NPS_LSEARCH_LKG
00007 #endif
00008 #include <math.h>
00009 #include <stdint.h>
00010
00011 #ifndef NPS_LSEARCH_C1
00012 #define NPS_LSEARCH_C1 1e-4
00013 #endif
00014
00015
00016 #ifndef NPS_LSEARCH_C2
00017 #define NPS_LSEARCH_C2 (1e-4 + 1.0) / 2.0
00018 #endif
00019
00020
00021
00022 typedef struct {
00023 void *self;
00024 double (*phi) (void *object, double alpha);
00025 double (*phiPrime) (void *object, double alpha);
00026 } *nps_lsearch_phi_t;
00027
00028
00029 #endif