Commit 71f0660cb1151e7cdcd146d6956b23c2e4a12683
1 parent
def4fa70
add GOptimizer test
Showing
4 changed files
with
449 additions
and
119 deletions
test/Makefile.am
| @@ -15,7 +15,8 @@ check_PROGRAMS = test_GVector \ | @@ -15,7 +15,8 @@ check_PROGRAMS = test_GVector \ | ||
| 15 | test_GFits \ | 15 | test_GFits \ |
| 16 | test_GResponse \ | 16 | test_GResponse \ |
| 17 | test_GModel \ | 17 | test_GModel \ |
| 18 | - test_GData | 18 | + test_GData \ |
| 19 | + test_GOptimizer | ||
| 19 | 20 | ||
| 20 | TESTS = test_GVector \ | 21 | TESTS = test_GVector \ |
| 21 | test_GMatrix \ | 22 | test_GMatrix \ |
| @@ -24,7 +25,8 @@ TESTS = test_GVector \ | @@ -24,7 +25,8 @@ TESTS = test_GVector \ | ||
| 24 | test_GFits \ | 25 | test_GFits \ |
| 25 | test_GResponse \ | 26 | test_GResponse \ |
| 26 | test_GModel \ | 27 | test_GModel \ |
| 27 | - test_GData | 28 | + test_GData \ |
| 29 | + test_GOptimizer | ||
| 28 | 30 | ||
| 29 | test_GVector_SOURCES = test_GVector.cpp | 31 | test_GVector_SOURCES = test_GVector.cpp |
| 30 | test_GVector_LDADD = ../src/libgamma.la | 32 | test_GVector_LDADD = ../src/libgamma.la |
| @@ -42,3 +44,5 @@ test_GModel_SOURCES = test_GModel.cpp | @@ -42,3 +44,5 @@ test_GModel_SOURCES = test_GModel.cpp | ||
| 42 | test_GModel_LDADD = ../src/libgamma.la | 44 | test_GModel_LDADD = ../src/libgamma.la |
| 43 | test_GData_SOURCES = test_GData.cpp | 45 | test_GData_SOURCES = test_GData.cpp |
| 44 | test_GData_LDADD = ../src/libgamma.la | 46 | test_GData_LDADD = ../src/libgamma.la |
| 47 | +test_GOptimizer_SOURCES = test_GOptimizer.cpp | ||
| 48 | +test_GOptimizer_LDADD = ../src/libgamma.la |
test/Makefile.in
| 1 | -# Makefile.in generated by automake 1.9.6 from Makefile.am. | 1 | +# Makefile.in generated by automake 1.11 from Makefile.am. |
| 2 | # @configure_input@ | 2 | # @configure_input@ |
| 3 | 3 | ||
| 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
| 5 | -# 2003, 2004, 2005 Free Software Foundation, Inc. | 5 | +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, |
| 6 | +# Inc. | ||
| 6 | # This Makefile.in is free software; the Free Software Foundation | 7 | # This Makefile.in is free software; the Free Software Foundation |
| 7 | # gives unlimited permission to copy and/or distribute it, | 8 | # gives unlimited permission to copy and/or distribute it, |
| 8 | # with or without modifications, as long as this notice is preserved. | 9 | # with or without modifications, as long as this notice is preserved. |
| @@ -17,15 +18,12 @@ | @@ -17,15 +18,12 @@ | ||
| 17 | # we use srcdir/src for "private" includes | 18 | # we use srcdir/src for "private" includes |
| 18 | # we use srcdir/include for the static global include files | 19 | # we use srcdir/include for the static global include files |
| 19 | # we use builddir/src for the generated include files to get found | 20 | # we use builddir/src for the generated include files to get found |
| 20 | -srcdir = @srcdir@ | ||
| 21 | -top_srcdir = @top_srcdir@ | ||
| 22 | VPATH = @srcdir@ | 21 | VPATH = @srcdir@ |
| 23 | pkgdatadir = $(datadir)/@PACKAGE@ | 22 | pkgdatadir = $(datadir)/@PACKAGE@ |
| 24 | -pkglibdir = $(libdir)/@PACKAGE@ | ||
| 25 | pkgincludedir = $(includedir)/@PACKAGE@ | 23 | pkgincludedir = $(includedir)/@PACKAGE@ |
| 26 | -top_builddir = .. | 24 | +pkglibdir = $(libdir)/@PACKAGE@ |
| 25 | +pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
| 27 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | 26 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd |
| 28 | -INSTALL = @INSTALL@ | ||
| 29 | install_sh_DATA = $(install_sh) -c -m 644 | 27 | install_sh_DATA = $(install_sh) -c -m 644 |
| 30 | install_sh_PROGRAM = $(install_sh) -c | 28 | install_sh_PROGRAM = $(install_sh) -c |
| 31 | install_sh_SCRIPT = $(install_sh) -c | 29 | install_sh_SCRIPT = $(install_sh) -c |
| @@ -42,16 +40,26 @@ host_triplet = @host@ | @@ -42,16 +40,26 @@ host_triplet = @host@ | ||
| 42 | check_PROGRAMS = test_GVector$(EXEEXT) test_GMatrix$(EXEEXT) \ | 40 | check_PROGRAMS = test_GVector$(EXEEXT) test_GMatrix$(EXEEXT) \ |
| 43 | test_GSymMatrix$(EXEEXT) test_GSparseMatrix$(EXEEXT) \ | 41 | test_GSymMatrix$(EXEEXT) test_GSparseMatrix$(EXEEXT) \ |
| 44 | test_GFits$(EXEEXT) test_GResponse$(EXEEXT) \ | 42 | test_GFits$(EXEEXT) test_GResponse$(EXEEXT) \ |
| 45 | - test_GModel$(EXEEXT) test_GData$(EXEEXT) | 43 | + test_GModel$(EXEEXT) test_GData$(EXEEXT) \ |
| 44 | + test_GOptimizer$(EXEEXT) | ||
| 45 | +TESTS = test_GVector$(EXEEXT) test_GMatrix$(EXEEXT) \ | ||
| 46 | + test_GSymMatrix$(EXEEXT) test_GSparseMatrix$(EXEEXT) \ | ||
| 47 | + test_GFits$(EXEEXT) test_GResponse$(EXEEXT) \ | ||
| 48 | + test_GModel$(EXEEXT) test_GData$(EXEEXT) \ | ||
| 49 | + test_GOptimizer$(EXEEXT) | ||
| 46 | subdir = test | 50 | subdir = test |
| 47 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | 51 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in |
| 48 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | 52 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
| 49 | -am__aclocal_m4_deps = $(top_srcdir)/configure.ac | 53 | +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ |
| 54 | + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ | ||
| 55 | + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ | ||
| 56 | + $(top_srcdir)/configure.ac | ||
| 50 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | 57 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
| 51 | $(ACLOCAL_M4) | 58 | $(ACLOCAL_M4) |
| 52 | -mkinstalldirs = $(install_sh) -d | 59 | +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |
| 53 | CONFIG_HEADER = $(top_builddir)/config.h | 60 | CONFIG_HEADER = $(top_builddir)/config.h |
| 54 | CONFIG_CLEAN_FILES = | 61 | CONFIG_CLEAN_FILES = |
| 62 | +CONFIG_CLEAN_VPATH_FILES = | ||
| 55 | am_test_GData_OBJECTS = test_GData.$(OBJEXT) | 63 | am_test_GData_OBJECTS = test_GData.$(OBJEXT) |
| 56 | test_GData_OBJECTS = $(am_test_GData_OBJECTS) | 64 | test_GData_OBJECTS = $(am_test_GData_OBJECTS) |
| 57 | test_GData_DEPENDENCIES = ../src/libgamma.la | 65 | test_GData_DEPENDENCIES = ../src/libgamma.la |
| @@ -64,6 +72,9 @@ test_GMatrix_DEPENDENCIES = ../src/libgamma.la | @@ -64,6 +72,9 @@ test_GMatrix_DEPENDENCIES = ../src/libgamma.la | ||
| 64 | am_test_GModel_OBJECTS = test_GModel.$(OBJEXT) | 72 | am_test_GModel_OBJECTS = test_GModel.$(OBJEXT) |
| 65 | test_GModel_OBJECTS = $(am_test_GModel_OBJECTS) | 73 | test_GModel_OBJECTS = $(am_test_GModel_OBJECTS) |
| 66 | test_GModel_DEPENDENCIES = ../src/libgamma.la | 74 | test_GModel_DEPENDENCIES = ../src/libgamma.la |
| 75 | +am_test_GOptimizer_OBJECTS = test_GOptimizer.$(OBJEXT) | ||
| 76 | +test_GOptimizer_OBJECTS = $(am_test_GOptimizer_OBJECTS) | ||
| 77 | +test_GOptimizer_DEPENDENCIES = ../src/libgamma.la | ||
| 67 | am_test_GResponse_OBJECTS = test_GResponse.$(OBJEXT) | 78 | am_test_GResponse_OBJECTS = test_GResponse.$(OBJEXT) |
| 68 | test_GResponse_OBJECTS = $(am_test_GResponse_OBJECTS) | 79 | test_GResponse_OBJECTS = $(am_test_GResponse_OBJECTS) |
| 69 | test_GResponse_DEPENDENCIES = ../src/libgamma.la | 80 | test_GResponse_DEPENDENCIES = ../src/libgamma.la |
| @@ -76,27 +87,32 @@ test_GSymMatrix_DEPENDENCIES = ../src/libgamma.la | @@ -76,27 +87,32 @@ test_GSymMatrix_DEPENDENCIES = ../src/libgamma.la | ||
| 76 | am_test_GVector_OBJECTS = test_GVector.$(OBJEXT) | 87 | am_test_GVector_OBJECTS = test_GVector.$(OBJEXT) |
| 77 | test_GVector_OBJECTS = $(am_test_GVector_OBJECTS) | 88 | test_GVector_OBJECTS = $(am_test_GVector_OBJECTS) |
| 78 | test_GVector_DEPENDENCIES = ../src/libgamma.la | 89 | test_GVector_DEPENDENCIES = ../src/libgamma.la |
| 79 | -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) | 90 | +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) |
| 80 | depcomp = | 91 | depcomp = |
| 81 | am__depfiles_maybe = | 92 | am__depfiles_maybe = |
| 82 | CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | 93 | CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ |
| 83 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) | 94 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) |
| 84 | -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ | ||
| 85 | - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
| 86 | - $(AM_CXXFLAGS) $(CXXFLAGS) | 95 | +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
| 96 | + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
| 97 | + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) | ||
| 87 | CXXLD = $(CXX) | 98 | CXXLD = $(CXX) |
| 88 | -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ | ||
| 89 | - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | 99 | +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ |
| 100 | + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ | ||
| 101 | + $(LDFLAGS) -o $@ | ||
| 90 | SOURCES = $(test_GData_SOURCES) $(test_GFits_SOURCES) \ | 102 | SOURCES = $(test_GData_SOURCES) $(test_GFits_SOURCES) \ |
| 91 | $(test_GMatrix_SOURCES) $(test_GModel_SOURCES) \ | 103 | $(test_GMatrix_SOURCES) $(test_GModel_SOURCES) \ |
| 92 | - $(test_GResponse_SOURCES) $(test_GSparseMatrix_SOURCES) \ | ||
| 93 | - $(test_GSymMatrix_SOURCES) $(test_GVector_SOURCES) | 104 | + $(test_GOptimizer_SOURCES) $(test_GResponse_SOURCES) \ |
| 105 | + $(test_GSparseMatrix_SOURCES) $(test_GSymMatrix_SOURCES) \ | ||
| 106 | + $(test_GVector_SOURCES) | ||
| 94 | DIST_SOURCES = $(test_GData_SOURCES) $(test_GFits_SOURCES) \ | 107 | DIST_SOURCES = $(test_GData_SOURCES) $(test_GFits_SOURCES) \ |
| 95 | $(test_GMatrix_SOURCES) $(test_GModel_SOURCES) \ | 108 | $(test_GMatrix_SOURCES) $(test_GModel_SOURCES) \ |
| 96 | - $(test_GResponse_SOURCES) $(test_GSparseMatrix_SOURCES) \ | ||
| 97 | - $(test_GSymMatrix_SOURCES) $(test_GVector_SOURCES) | 109 | + $(test_GOptimizer_SOURCES) $(test_GResponse_SOURCES) \ |
| 110 | + $(test_GSparseMatrix_SOURCES) $(test_GSymMatrix_SOURCES) \ | ||
| 111 | + $(test_GVector_SOURCES) | ||
| 98 | ETAGS = etags | 112 | ETAGS = etags |
| 99 | CTAGS = ctags | 113 | CTAGS = ctags |
| 114 | +am__tty_colors = \ | ||
| 115 | +red=; grn=; lgn=; blu=; std= | ||
| 100 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | 116 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
| 101 | ACLOCAL = @ACLOCAL@ | 117 | ACLOCAL = @ACLOCAL@ |
| 102 | AMTAR = @AMTAR@ | 118 | AMTAR = @AMTAR@ |
| @@ -114,42 +130,44 @@ CXXCPP = @CXXCPP@ | @@ -114,42 +130,44 @@ CXXCPP = @CXXCPP@ | ||
| 114 | CXXFLAGS = @CXXFLAGS@ | 130 | CXXFLAGS = @CXXFLAGS@ |
| 115 | CYGPATH_W = @CYGPATH_W@ | 131 | CYGPATH_W = @CYGPATH_W@ |
| 116 | DEFS = @DEFS@ | 132 | DEFS = @DEFS@ |
| 117 | -ECHO = @ECHO@ | 133 | +DSYMUTIL = @DSYMUTIL@ |
| 134 | +DUMPBIN = @DUMPBIN@ | ||
| 118 | ECHO_C = @ECHO_C@ | 135 | ECHO_C = @ECHO_C@ |
| 119 | ECHO_N = @ECHO_N@ | 136 | ECHO_N = @ECHO_N@ |
| 120 | ECHO_T = @ECHO_T@ | 137 | ECHO_T = @ECHO_T@ |
| 121 | EGREP = @EGREP@ | 138 | EGREP = @EGREP@ |
| 122 | -ENABLE_PYTHON_BINDING_FALSE = @ENABLE_PYTHON_BINDING_FALSE@ | ||
| 123 | -ENABLE_PYTHON_BINDING_TRUE = @ENABLE_PYTHON_BINDING_TRUE@ | ||
| 124 | EXEEXT = @EXEEXT@ | 139 | EXEEXT = @EXEEXT@ |
| 125 | -F77 = @F77@ | ||
| 126 | -FFLAGS = @FFLAGS@ | 140 | +FGREP = @FGREP@ |
| 127 | GAMMALIB_LT_VERSION = @GAMMALIB_LT_VERSION@ | 141 | GAMMALIB_LT_VERSION = @GAMMALIB_LT_VERSION@ |
| 128 | GREP = @GREP@ | 142 | GREP = @GREP@ |
| 129 | -HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ | ||
| 130 | -HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ | ||
| 131 | -HAVE_SWIG_FALSE = @HAVE_SWIG_FALSE@ | ||
| 132 | -HAVE_SWIG_TRUE = @HAVE_SWIG_TRUE@ | 143 | +INSTALL = @INSTALL@ |
| 133 | INSTALL_DATA = @INSTALL_DATA@ | 144 | INSTALL_DATA = @INSTALL_DATA@ |
| 134 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | 145 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 135 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | 146 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
| 136 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | 147 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
| 148 | +LD = @LD@ | ||
| 137 | LDFLAGS = @LDFLAGS@ | 149 | LDFLAGS = @LDFLAGS@ |
| 138 | LIBOBJS = @LIBOBJS@ | 150 | LIBOBJS = @LIBOBJS@ |
| 139 | LIBS = @LIBS@ | 151 | LIBS = @LIBS@ |
| 140 | LIBTOOL = @LIBTOOL@ | 152 | LIBTOOL = @LIBTOOL@ |
| 153 | +LIPO = @LIPO@ | ||
| 141 | LN_S = @LN_S@ | 154 | LN_S = @LN_S@ |
| 142 | LTLIBOBJS = @LTLIBOBJS@ | 155 | LTLIBOBJS = @LTLIBOBJS@ |
| 143 | MAINT = @MAINT@ | 156 | MAINT = @MAINT@ |
| 144 | -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ | ||
| 145 | -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ | ||
| 146 | MAKEINFO = @MAKEINFO@ | 157 | MAKEINFO = @MAKEINFO@ |
| 158 | +MKDIR_P = @MKDIR_P@ | ||
| 159 | +NM = @NM@ | ||
| 160 | +NMEDIT = @NMEDIT@ | ||
| 161 | +OBJDUMP = @OBJDUMP@ | ||
| 147 | OBJEXT = @OBJEXT@ | 162 | OBJEXT = @OBJEXT@ |
| 163 | +OTOOL = @OTOOL@ | ||
| 164 | +OTOOL64 = @OTOOL64@ | ||
| 148 | PACKAGE = @PACKAGE@ | 165 | PACKAGE = @PACKAGE@ |
| 149 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | 166 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
| 150 | PACKAGE_NAME = @PACKAGE_NAME@ | 167 | PACKAGE_NAME = @PACKAGE_NAME@ |
| 151 | PACKAGE_STRING = @PACKAGE_STRING@ | 168 | PACKAGE_STRING = @PACKAGE_STRING@ |
| 152 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | 169 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ |
| 170 | +PACKAGE_URL = @PACKAGE_URL@ | ||
| 153 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 171 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
| 154 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 172 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
| 155 | PYTHON = @PYTHON@ | 173 | PYTHON = @PYTHON@ |
| @@ -164,9 +182,13 @@ SHELL = @SHELL@ | @@ -164,9 +182,13 @@ SHELL = @SHELL@ | ||
| 164 | STRIP = @STRIP@ | 182 | STRIP = @STRIP@ |
| 165 | SWIG = @SWIG@ | 183 | SWIG = @SWIG@ |
| 166 | VERSION = @VERSION@ | 184 | VERSION = @VERSION@ |
| 185 | +abs_builddir = @abs_builddir@ | ||
| 186 | +abs_srcdir = @abs_srcdir@ | ||
| 187 | +abs_top_builddir = @abs_top_builddir@ | ||
| 188 | +abs_top_srcdir = @abs_top_srcdir@ | ||
| 167 | ac_ct_CC = @ac_ct_CC@ | 189 | ac_ct_CC = @ac_ct_CC@ |
| 168 | ac_ct_CXX = @ac_ct_CXX@ | 190 | ac_ct_CXX = @ac_ct_CXX@ |
| 169 | -ac_ct_F77 = @ac_ct_F77@ | 191 | +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ |
| 170 | am__leading_dot = @am__leading_dot@ | 192 | am__leading_dot = @am__leading_dot@ |
| 171 | am__tar = @am__tar@ | 193 | am__tar = @am__tar@ |
| 172 | am__untar = @am__untar@ | 194 | am__untar = @am__untar@ |
| @@ -176,6 +198,7 @@ build_alias = @build_alias@ | @@ -176,6 +198,7 @@ build_alias = @build_alias@ | ||
| 176 | build_cpu = @build_cpu@ | 198 | build_cpu = @build_cpu@ |
| 177 | build_os = @build_os@ | 199 | build_os = @build_os@ |
| 178 | build_vendor = @build_vendor@ | 200 | build_vendor = @build_vendor@ |
| 201 | +builddir = @builddir@ | ||
| 179 | datadir = @datadir@ | 202 | datadir = @datadir@ |
| 180 | datarootdir = @datarootdir@ | 203 | datarootdir = @datarootdir@ |
| 181 | docdir = @docdir@ | 204 | docdir = @docdir@ |
| @@ -194,6 +217,7 @@ libdir = @libdir@ | @@ -194,6 +217,7 @@ libdir = @libdir@ | ||
| 194 | libexecdir = @libexecdir@ | 217 | libexecdir = @libexecdir@ |
| 195 | localedir = @localedir@ | 218 | localedir = @localedir@ |
| 196 | localstatedir = @localstatedir@ | 219 | localstatedir = @localstatedir@ |
| 220 | +lt_ECHO = @lt_ECHO@ | ||
| 197 | mandir = @mandir@ | 221 | mandir = @mandir@ |
| 198 | mkdir_p = @mkdir_p@ | 222 | mkdir_p = @mkdir_p@ |
| 199 | oldincludedir = @oldincludedir@ | 223 | oldincludedir = @oldincludedir@ |
| @@ -207,21 +231,16 @@ pyexecdir = @pyexecdir@ | @@ -207,21 +231,16 @@ pyexecdir = @pyexecdir@ | ||
| 207 | pythondir = @pythondir@ | 231 | pythondir = @pythondir@ |
| 208 | sbindir = @sbindir@ | 232 | sbindir = @sbindir@ |
| 209 | sharedstatedir = @sharedstatedir@ | 233 | sharedstatedir = @sharedstatedir@ |
| 234 | +srcdir = @srcdir@ | ||
| 210 | sysconfdir = @sysconfdir@ | 235 | sysconfdir = @sysconfdir@ |
| 211 | target_alias = @target_alias@ | 236 | target_alias = @target_alias@ |
| 237 | +top_build_prefix = @top_build_prefix@ | ||
| 238 | +top_builddir = @top_builddir@ | ||
| 239 | +top_srcdir = @top_srcdir@ | ||
| 212 | INCLUDES = -I$(top_srcdir)/include \ | 240 | INCLUDES = -I$(top_srcdir)/include \ |
| 213 | -I$(top_builddir)/src \ | 241 | -I$(top_builddir)/src \ |
| 214 | -I$(top_srcdir)/src | 242 | -I$(top_srcdir)/src |
| 215 | 243 | ||
| 216 | -TESTS = test_GVector \ | ||
| 217 | - test_GMatrix \ | ||
| 218 | - test_GSymMatrix \ | ||
| 219 | - test_GSparseMatrix \ | ||
| 220 | - test_GFits \ | ||
| 221 | - test_GResponse \ | ||
| 222 | - test_GModel \ | ||
| 223 | - test_GData | ||
| 224 | - | ||
| 225 | test_GVector_SOURCES = test_GVector.cpp | 244 | test_GVector_SOURCES = test_GVector.cpp |
| 226 | test_GVector_LDADD = ../src/libgamma.la | 245 | test_GVector_LDADD = ../src/libgamma.la |
| 227 | test_GMatrix_SOURCES = test_GMatrix.cpp | 246 | test_GMatrix_SOURCES = test_GMatrix.cpp |
| @@ -238,6 +257,8 @@ test_GModel_SOURCES = test_GModel.cpp | @@ -238,6 +257,8 @@ test_GModel_SOURCES = test_GModel.cpp | ||
| 238 | test_GModel_LDADD = ../src/libgamma.la | 257 | test_GModel_LDADD = ../src/libgamma.la |
| 239 | test_GData_SOURCES = test_GData.cpp | 258 | test_GData_SOURCES = test_GData.cpp |
| 240 | test_GData_LDADD = ../src/libgamma.la | 259 | test_GData_LDADD = ../src/libgamma.la |
| 260 | +test_GOptimizer_SOURCES = test_GOptimizer.cpp | ||
| 261 | +test_GOptimizer_LDADD = ../src/libgamma.la | ||
| 241 | all: all-am | 262 | all: all-am |
| 242 | 263 | ||
| 243 | .SUFFIXES: | 264 | .SUFFIXES: |
| @@ -246,14 +267,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi | @@ -246,14 +267,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi | ||
| 246 | @for dep in $?; do \ | 267 | @for dep in $?; do \ |
| 247 | case '$(am__configure_deps)' in \ | 268 | case '$(am__configure_deps)' in \ |
| 248 | *$$dep*) \ | 269 | *$$dep*) \ |
| 249 | - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
| 250 | - && exit 0; \ | 270 | + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ |
| 271 | + && { if test -f $@; then exit 0; else break; fi; }; \ | ||
| 251 | exit 1;; \ | 272 | exit 1;; \ |
| 252 | esac; \ | 273 | esac; \ |
| 253 | done; \ | 274 | done; \ |
| 254 | - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps test/Makefile'; \ | ||
| 255 | - cd $(top_srcdir) && \ | ||
| 256 | - $(AUTOMAKE) --gnu --ignore-deps test/Makefile | 275 | + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps test/Makefile'; \ |
| 276 | + $(am__cd) $(top_srcdir) && \ | ||
| 277 | + $(AUTOMAKE) --gnu --ignore-deps test/Makefile | ||
| 257 | .PRECIOUS: Makefile | 278 | .PRECIOUS: Makefile |
| 258 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | 279 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
| 259 | @case '$?' in \ | 280 | @case '$?' in \ |
| @@ -271,37 +292,43 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) | @@ -271,37 +292,43 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) | ||
| 271 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | 292 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
| 272 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) | 293 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) |
| 273 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | 294 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
| 295 | +$(am__aclocal_m4_deps): | ||
| 274 | 296 | ||
| 275 | clean-checkPROGRAMS: | 297 | clean-checkPROGRAMS: |
| 276 | - @list='$(check_PROGRAMS)'; for p in $$list; do \ | ||
| 277 | - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ | ||
| 278 | - echo " rm -f $$p $$f"; \ | ||
| 279 | - rm -f $$p $$f ; \ | ||
| 280 | - done | 298 | + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ |
| 299 | + echo " rm -f" $$list; \ | ||
| 300 | + rm -f $$list || exit $$?; \ | ||
| 301 | + test -n "$(EXEEXT)" || exit 0; \ | ||
| 302 | + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ | ||
| 303 | + echo " rm -f" $$list; \ | ||
| 304 | + rm -f $$list | ||
| 281 | test_GData$(EXEEXT): $(test_GData_OBJECTS) $(test_GData_DEPENDENCIES) | 305 | test_GData$(EXEEXT): $(test_GData_OBJECTS) $(test_GData_DEPENDENCIES) |
| 282 | @rm -f test_GData$(EXEEXT) | 306 | @rm -f test_GData$(EXEEXT) |
| 283 | - $(CXXLINK) $(test_GData_LDFLAGS) $(test_GData_OBJECTS) $(test_GData_LDADD) $(LIBS) | 307 | + $(CXXLINK) $(test_GData_OBJECTS) $(test_GData_LDADD) $(LIBS) |
| 284 | test_GFits$(EXEEXT): $(test_GFits_OBJECTS) $(test_GFits_DEPENDENCIES) | 308 | test_GFits$(EXEEXT): $(test_GFits_OBJECTS) $(test_GFits_DEPENDENCIES) |
| 285 | @rm -f test_GFits$(EXEEXT) | 309 | @rm -f test_GFits$(EXEEXT) |
| 286 | - $(CXXLINK) $(test_GFits_LDFLAGS) $(test_GFits_OBJECTS) $(test_GFits_LDADD) $(LIBS) | 310 | + $(CXXLINK) $(test_GFits_OBJECTS) $(test_GFits_LDADD) $(LIBS) |
| 287 | test_GMatrix$(EXEEXT): $(test_GMatrix_OBJECTS) $(test_GMatrix_DEPENDENCIES) | 311 | test_GMatrix$(EXEEXT): $(test_GMatrix_OBJECTS) $(test_GMatrix_DEPENDENCIES) |
| 288 | @rm -f test_GMatrix$(EXEEXT) | 312 | @rm -f test_GMatrix$(EXEEXT) |
| 289 | - $(CXXLINK) $(test_GMatrix_LDFLAGS) $(test_GMatrix_OBJECTS) $(test_GMatrix_LDADD) $(LIBS) | 313 | + $(CXXLINK) $(test_GMatrix_OBJECTS) $(test_GMatrix_LDADD) $(LIBS) |
| 290 | test_GModel$(EXEEXT): $(test_GModel_OBJECTS) $(test_GModel_DEPENDENCIES) | 314 | test_GModel$(EXEEXT): $(test_GModel_OBJECTS) $(test_GModel_DEPENDENCIES) |
| 291 | @rm -f test_GModel$(EXEEXT) | 315 | @rm -f test_GModel$(EXEEXT) |
| 292 | - $(CXXLINK) $(test_GModel_LDFLAGS) $(test_GModel_OBJECTS) $(test_GModel_LDADD) $(LIBS) | 316 | + $(CXXLINK) $(test_GModel_OBJECTS) $(test_GModel_LDADD) $(LIBS) |
| 317 | +test_GOptimizer$(EXEEXT): $(test_GOptimizer_OBJECTS) $(test_GOptimizer_DEPENDENCIES) | ||
| 318 | + @rm -f test_GOptimizer$(EXEEXT) | ||
| 319 | + $(CXXLINK) $(test_GOptimizer_OBJECTS) $(test_GOptimizer_LDADD) $(LIBS) | ||
| 293 | test_GResponse$(EXEEXT): $(test_GResponse_OBJECTS) $(test_GResponse_DEPENDENCIES) | 320 | test_GResponse$(EXEEXT): $(test_GResponse_OBJECTS) $(test_GResponse_DEPENDENCIES) |
| 294 | @rm -f test_GResponse$(EXEEXT) | 321 | @rm -f test_GResponse$(EXEEXT) |
| 295 | - $(CXXLINK) $(test_GResponse_LDFLAGS) $(test_GResponse_OBJECTS) $(test_GResponse_LDADD) $(LIBS) | 322 | + $(CXXLINK) $(test_GResponse_OBJECTS) $(test_GResponse_LDADD) $(LIBS) |
| 296 | test_GSparseMatrix$(EXEEXT): $(test_GSparseMatrix_OBJECTS) $(test_GSparseMatrix_DEPENDENCIES) | 323 | test_GSparseMatrix$(EXEEXT): $(test_GSparseMatrix_OBJECTS) $(test_GSparseMatrix_DEPENDENCIES) |
| 297 | @rm -f test_GSparseMatrix$(EXEEXT) | 324 | @rm -f test_GSparseMatrix$(EXEEXT) |
| 298 | - $(CXXLINK) $(test_GSparseMatrix_LDFLAGS) $(test_GSparseMatrix_OBJECTS) $(test_GSparseMatrix_LDADD) $(LIBS) | 325 | + $(CXXLINK) $(test_GSparseMatrix_OBJECTS) $(test_GSparseMatrix_LDADD) $(LIBS) |
| 299 | test_GSymMatrix$(EXEEXT): $(test_GSymMatrix_OBJECTS) $(test_GSymMatrix_DEPENDENCIES) | 326 | test_GSymMatrix$(EXEEXT): $(test_GSymMatrix_OBJECTS) $(test_GSymMatrix_DEPENDENCIES) |
| 300 | @rm -f test_GSymMatrix$(EXEEXT) | 327 | @rm -f test_GSymMatrix$(EXEEXT) |
| 301 | - $(CXXLINK) $(test_GSymMatrix_LDFLAGS) $(test_GSymMatrix_OBJECTS) $(test_GSymMatrix_LDADD) $(LIBS) | 328 | + $(CXXLINK) $(test_GSymMatrix_OBJECTS) $(test_GSymMatrix_LDADD) $(LIBS) |
| 302 | test_GVector$(EXEEXT): $(test_GVector_OBJECTS) $(test_GVector_DEPENDENCIES) | 329 | test_GVector$(EXEEXT): $(test_GVector_OBJECTS) $(test_GVector_DEPENDENCIES) |
| 303 | @rm -f test_GVector$(EXEEXT) | 330 | @rm -f test_GVector$(EXEEXT) |
| 304 | - $(CXXLINK) $(test_GVector_LDFLAGS) $(test_GVector_OBJECTS) $(test_GVector_LDADD) $(LIBS) | 331 | + $(CXXLINK) $(test_GVector_OBJECTS) $(test_GVector_LDADD) $(LIBS) |
| 305 | 332 | ||
| 306 | mostlyclean-compile: | 333 | mostlyclean-compile: |
| 307 | -rm -f *.$(OBJEXT) | 334 | -rm -f *.$(OBJEXT) |
| @@ -324,54 +351,54 @@ mostlyclean-libtool: | @@ -324,54 +351,54 @@ mostlyclean-libtool: | ||
| 324 | clean-libtool: | 351 | clean-libtool: |
| 325 | -rm -rf .libs _libs | 352 | -rm -rf .libs _libs |
| 326 | 353 | ||
| 327 | -distclean-libtool: | ||
| 328 | - -rm -f libtool | ||
| 329 | -uninstall-info-am: | ||
| 330 | - | ||
| 331 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | 354 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
| 332 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | 355 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
| 333 | unique=`for i in $$list; do \ | 356 | unique=`for i in $$list; do \ |
| 334 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | 357 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
| 335 | done | \ | 358 | done | \ |
| 336 | - $(AWK) ' { files[$$0] = 1; } \ | ||
| 337 | - END { for (i in files) print i; }'`; \ | 359 | + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
| 360 | + END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
| 338 | mkid -fID $$unique | 361 | mkid -fID $$unique |
| 339 | tags: TAGS | 362 | tags: TAGS |
| 340 | 363 | ||
| 341 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | 364 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ |
| 342 | $(TAGS_FILES) $(LISP) | 365 | $(TAGS_FILES) $(LISP) |
| 343 | - tags=; \ | 366 | + set x; \ |
| 344 | here=`pwd`; \ | 367 | here=`pwd`; \ |
| 345 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | 368 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
| 346 | unique=`for i in $$list; do \ | 369 | unique=`for i in $$list; do \ |
| 347 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | 370 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
| 348 | done | \ | 371 | done | \ |
| 349 | - $(AWK) ' { files[$$0] = 1; } \ | ||
| 350 | - END { for (i in files) print i; }'`; \ | ||
| 351 | - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | 372 | + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
| 373 | + END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
| 374 | + shift; \ | ||
| 375 | + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
| 352 | test -n "$$unique" || unique=$$empty_fix; \ | 376 | test -n "$$unique" || unique=$$empty_fix; \ |
| 353 | - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
| 354 | - $$tags $$unique; \ | 377 | + if test $$# -gt 0; then \ |
| 378 | + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
| 379 | + "$$@" $$unique; \ | ||
| 380 | + else \ | ||
| 381 | + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
| 382 | + $$unique; \ | ||
| 383 | + fi; \ | ||
| 355 | fi | 384 | fi |
| 356 | ctags: CTAGS | 385 | ctags: CTAGS |
| 357 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | 386 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ |
| 358 | $(TAGS_FILES) $(LISP) | 387 | $(TAGS_FILES) $(LISP) |
| 359 | - tags=; \ | ||
| 360 | - here=`pwd`; \ | ||
| 361 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | 388 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
| 362 | unique=`for i in $$list; do \ | 389 | unique=`for i in $$list; do \ |
| 363 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | 390 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
| 364 | done | \ | 391 | done | \ |
| 365 | - $(AWK) ' { files[$$0] = 1; } \ | ||
| 366 | - END { for (i in files) print i; }'`; \ | ||
| 367 | - test -z "$(CTAGS_ARGS)$$tags$$unique" \ | 392 | + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ |
| 393 | + END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
| 394 | + test -z "$(CTAGS_ARGS)$$unique" \ | ||
| 368 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | 395 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ |
| 369 | - $$tags $$unique | 396 | + $$unique |
| 370 | 397 | ||
| 371 | GTAGS: | 398 | GTAGS: |
| 372 | here=`$(am__cd) $(top_builddir) && pwd` \ | 399 | here=`$(am__cd) $(top_builddir) && pwd` \ |
| 373 | - && cd $(top_srcdir) \ | ||
| 374 | - && gtags -i $(GTAGS_ARGS) $$here | 400 | + && $(am__cd) $(top_srcdir) \ |
| 401 | + && gtags -i $(GTAGS_ARGS) "$$here" | ||
| 375 | 402 | ||
| 376 | distclean-tags: | 403 | distclean-tags: |
| 377 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | 404 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
| @@ -379,7 +406,8 @@ distclean-tags: | @@ -379,7 +406,8 @@ distclean-tags: | ||
| 379 | check-TESTS: $(TESTS) | 406 | check-TESTS: $(TESTS) |
| 380 | @failed=0; all=0; xfail=0; xpass=0; skip=0; \ | 407 | @failed=0; all=0; xfail=0; xpass=0; skip=0; \ |
| 381 | srcdir=$(srcdir); export srcdir; \ | 408 | srcdir=$(srcdir); export srcdir; \ |
| 382 | - list='$(TESTS)'; \ | 409 | + list=' $(TESTS) '; \ |
| 410 | + $(am__tty_colors); \ | ||
| 383 | if test -n "$$list"; then \ | 411 | if test -n "$$list"; then \ |
| 384 | for tst in $$list; do \ | 412 | for tst in $$list; do \ |
| 385 | if test -f ./$$tst; then dir=./; \ | 413 | if test -f ./$$tst; then dir=./; \ |
| @@ -388,49 +416,63 @@ check-TESTS: $(TESTS) | @@ -388,49 +416,63 @@ check-TESTS: $(TESTS) | ||
| 388 | if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ | 416 | if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ |
| 389 | all=`expr $$all + 1`; \ | 417 | all=`expr $$all + 1`; \ |
| 390 | case " $(XFAIL_TESTS) " in \ | 418 | case " $(XFAIL_TESTS) " in \ |
| 391 | - *" $$tst "*) \ | 419 | + *[\ \ ]$$tst[\ \ ]*) \ |
| 392 | xpass=`expr $$xpass + 1`; \ | 420 | xpass=`expr $$xpass + 1`; \ |
| 393 | failed=`expr $$failed + 1`; \ | 421 | failed=`expr $$failed + 1`; \ |
| 394 | - echo "XPASS: $$tst"; \ | 422 | + col=$$red; res=XPASS; \ |
| 395 | ;; \ | 423 | ;; \ |
| 396 | *) \ | 424 | *) \ |
| 397 | - echo "PASS: $$tst"; \ | 425 | + col=$$grn; res=PASS; \ |
| 398 | ;; \ | 426 | ;; \ |
| 399 | esac; \ | 427 | esac; \ |
| 400 | elif test $$? -ne 77; then \ | 428 | elif test $$? -ne 77; then \ |
| 401 | all=`expr $$all + 1`; \ | 429 | all=`expr $$all + 1`; \ |
| 402 | case " $(XFAIL_TESTS) " in \ | 430 | case " $(XFAIL_TESTS) " in \ |
| 403 | - *" $$tst "*) \ | 431 | + *[\ \ ]$$tst[\ \ ]*) \ |
| 404 | xfail=`expr $$xfail + 1`; \ | 432 | xfail=`expr $$xfail + 1`; \ |
| 405 | - echo "XFAIL: $$tst"; \ | 433 | + col=$$lgn; res=XFAIL; \ |
| 406 | ;; \ | 434 | ;; \ |
| 407 | *) \ | 435 | *) \ |
| 408 | failed=`expr $$failed + 1`; \ | 436 | failed=`expr $$failed + 1`; \ |
| 409 | - echo "FAIL: $$tst"; \ | 437 | + col=$$red; res=FAIL; \ |
| 410 | ;; \ | 438 | ;; \ |
| 411 | esac; \ | 439 | esac; \ |
| 412 | else \ | 440 | else \ |
| 413 | skip=`expr $$skip + 1`; \ | 441 | skip=`expr $$skip + 1`; \ |
| 414 | - echo "SKIP: $$tst"; \ | 442 | + col=$$blu; res=SKIP; \ |
| 415 | fi; \ | 443 | fi; \ |
| 444 | + echo "$${col}$$res$${std}: $$tst"; \ | ||
| 416 | done; \ | 445 | done; \ |
| 446 | + if test "$$all" -eq 1; then \ | ||
| 447 | + tests="test"; \ | ||
| 448 | + All=""; \ | ||
| 449 | + else \ | ||
| 450 | + tests="tests"; \ | ||
| 451 | + All="All "; \ | ||
| 452 | + fi; \ | ||
| 417 | if test "$$failed" -eq 0; then \ | 453 | if test "$$failed" -eq 0; then \ |
| 418 | if test "$$xfail" -eq 0; then \ | 454 | if test "$$xfail" -eq 0; then \ |
| 419 | - banner="All $$all tests passed"; \ | 455 | + banner="$$All$$all $$tests passed"; \ |
| 420 | else \ | 456 | else \ |
| 421 | - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ | 457 | + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ |
| 458 | + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ | ||
| 422 | fi; \ | 459 | fi; \ |
| 423 | else \ | 460 | else \ |
| 424 | if test "$$xpass" -eq 0; then \ | 461 | if test "$$xpass" -eq 0; then \ |
| 425 | - banner="$$failed of $$all tests failed"; \ | 462 | + banner="$$failed of $$all $$tests failed"; \ |
| 426 | else \ | 463 | else \ |
| 427 | - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ | 464 | + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ |
| 465 | + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ | ||
| 428 | fi; \ | 466 | fi; \ |
| 429 | fi; \ | 467 | fi; \ |
| 430 | dashes="$$banner"; \ | 468 | dashes="$$banner"; \ |
| 431 | skipped=""; \ | 469 | skipped=""; \ |
| 432 | if test "$$skip" -ne 0; then \ | 470 | if test "$$skip" -ne 0; then \ |
| 433 | - skipped="($$skip tests were not run)"; \ | 471 | + if test "$$skip" -eq 1; then \ |
| 472 | + skipped="($$skip test was not run)"; \ | ||
| 473 | + else \ | ||
| 474 | + skipped="($$skip tests were not run)"; \ | ||
| 475 | + fi; \ | ||
| 434 | test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ | 476 | test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ |
| 435 | dashes="$$skipped"; \ | 477 | dashes="$$skipped"; \ |
| 436 | fi; \ | 478 | fi; \ |
| @@ -441,38 +483,45 @@ check-TESTS: $(TESTS) | @@ -441,38 +483,45 @@ check-TESTS: $(TESTS) | ||
| 441 | dashes="$$report"; \ | 483 | dashes="$$report"; \ |
| 442 | fi; \ | 484 | fi; \ |
| 443 | dashes=`echo "$$dashes" | sed s/./=/g`; \ | 485 | dashes=`echo "$$dashes" | sed s/./=/g`; \ |
| 444 | - echo "$$dashes"; \ | 486 | + if test "$$failed" -eq 0; then \ |
| 487 | + echo "$$grn$$dashes"; \ | ||
| 488 | + else \ | ||
| 489 | + echo "$$red$$dashes"; \ | ||
| 490 | + fi; \ | ||
| 445 | echo "$$banner"; \ | 491 | echo "$$banner"; \ |
| 446 | test -z "$$skipped" || echo "$$skipped"; \ | 492 | test -z "$$skipped" || echo "$$skipped"; \ |
| 447 | test -z "$$report" || echo "$$report"; \ | 493 | test -z "$$report" || echo "$$report"; \ |
| 448 | - echo "$$dashes"; \ | 494 | + echo "$$dashes$$std"; \ |
| 449 | test "$$failed" -eq 0; \ | 495 | test "$$failed" -eq 0; \ |
| 450 | else :; fi | 496 | else :; fi |
| 451 | 497 | ||
| 452 | distdir: $(DISTFILES) | 498 | distdir: $(DISTFILES) |
| 453 | - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ | ||
| 454 | - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ | ||
| 455 | - list='$(DISTFILES)'; for file in $$list; do \ | ||
| 456 | - case $$file in \ | ||
| 457 | - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ | ||
| 458 | - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ | ||
| 459 | - esac; \ | 499 | + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
| 500 | + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
| 501 | + list='$(DISTFILES)'; \ | ||
| 502 | + dist_files=`for file in $$list; do echo $$file; done | \ | ||
| 503 | + sed -e "s|^$$srcdirstrip/||;t" \ | ||
| 504 | + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
| 505 | + case $$dist_files in \ | ||
| 506 | + */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
| 507 | + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
| 508 | + sort -u` ;; \ | ||
| 509 | + esac; \ | ||
| 510 | + for file in $$dist_files; do \ | ||
| 460 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | 511 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ |
| 461 | - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
| 462 | - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ | ||
| 463 | - dir="/$$dir"; \ | ||
| 464 | - $(mkdir_p) "$(distdir)$$dir"; \ | ||
| 465 | - else \ | ||
| 466 | - dir=''; \ | ||
| 467 | - fi; \ | ||
| 468 | if test -d $$d/$$file; then \ | 512 | if test -d $$d/$$file; then \ |
| 513 | + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
| 514 | + if test -d "$(distdir)/$$file"; then \ | ||
| 515 | + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
| 516 | + fi; \ | ||
| 469 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | 517 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ |
| 470 | - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | 518 | + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ |
| 519 | + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
| 471 | fi; \ | 520 | fi; \ |
| 472 | - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | 521 | + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ |
| 473 | else \ | 522 | else \ |
| 474 | - test -f $(distdir)/$$file \ | ||
| 475 | - || cp -p $$d/$$file $(distdir)/$$file \ | 523 | + test -f "$(distdir)/$$file" \ |
| 524 | + || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
| 476 | || exit 1; \ | 525 | || exit 1; \ |
| 477 | fi; \ | 526 | fi; \ |
| 478 | done | 527 | done |
| @@ -502,6 +551,7 @@ clean-generic: | @@ -502,6 +551,7 @@ clean-generic: | ||
| 502 | 551 | ||
| 503 | distclean-generic: | 552 | distclean-generic: |
| 504 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | 553 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) |
| 554 | + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
| 505 | 555 | ||
| 506 | maintainer-clean-generic: | 556 | maintainer-clean-generic: |
| 507 | @echo "This command is intended for maintainers to use" | 557 | @echo "This command is intended for maintainers to use" |
| @@ -514,7 +564,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ | @@ -514,7 +564,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ | ||
| 514 | distclean: distclean-am | 564 | distclean: distclean-am |
| 515 | -rm -f Makefile | 565 | -rm -f Makefile |
| 516 | distclean-am: clean-am distclean-compile distclean-generic \ | 566 | distclean-am: clean-am distclean-compile distclean-generic \ |
| 517 | - distclean-libtool distclean-tags | 567 | + distclean-tags |
| 518 | 568 | ||
| 519 | dvi: dvi-am | 569 | dvi: dvi-am |
| 520 | 570 | ||
| @@ -522,18 +572,38 @@ dvi-am: | @@ -522,18 +572,38 @@ dvi-am: | ||
| 522 | 572 | ||
| 523 | html: html-am | 573 | html: html-am |
| 524 | 574 | ||
| 575 | +html-am: | ||
| 576 | + | ||
| 525 | info: info-am | 577 | info: info-am |
| 526 | 578 | ||
| 527 | info-am: | 579 | info-am: |
| 528 | 580 | ||
| 529 | install-data-am: | 581 | install-data-am: |
| 530 | 582 | ||
| 583 | +install-dvi: install-dvi-am | ||
| 584 | + | ||
| 585 | +install-dvi-am: | ||
| 586 | + | ||
| 531 | install-exec-am: | 587 | install-exec-am: |
| 532 | 588 | ||
| 589 | +install-html: install-html-am | ||
| 590 | + | ||
| 591 | +install-html-am: | ||
| 592 | + | ||
| 533 | install-info: install-info-am | 593 | install-info: install-info-am |
| 534 | 594 | ||
| 595 | +install-info-am: | ||
| 596 | + | ||
| 535 | install-man: | 597 | install-man: |
| 536 | 598 | ||
| 599 | +install-pdf: install-pdf-am | ||
| 600 | + | ||
| 601 | +install-pdf-am: | ||
| 602 | + | ||
| 603 | +install-ps: install-ps-am | ||
| 604 | + | ||
| 605 | +install-ps-am: | ||
| 606 | + | ||
| 537 | installcheck-am: | 607 | installcheck-am: |
| 538 | 608 | ||
| 539 | maintainer-clean: maintainer-clean-am | 609 | maintainer-clean: maintainer-clean-am |
| @@ -553,19 +623,24 @@ ps: ps-am | @@ -553,19 +623,24 @@ ps: ps-am | ||
| 553 | 623 | ||
| 554 | ps-am: | 624 | ps-am: |
| 555 | 625 | ||
| 556 | -uninstall-am: uninstall-info-am | 626 | +uninstall-am: |
| 627 | + | ||
| 628 | +.MAKE: check-am install-am install-strip | ||
| 557 | 629 | ||
| 558 | .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ | 630 | .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ |
| 559 | clean-checkPROGRAMS clean-generic clean-libtool ctags \ | 631 | clean-checkPROGRAMS clean-generic clean-libtool ctags \ |
| 560 | distclean distclean-compile distclean-generic \ | 632 | distclean distclean-compile distclean-generic \ |
| 561 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | 633 | distclean-libtool distclean-tags distdir dvi dvi-am html \ |
| 562 | html-am info info-am install install-am install-data \ | 634 | html-am info info-am install install-am install-data \ |
| 563 | - install-data-am install-exec install-exec-am install-info \ | ||
| 564 | - install-info-am install-man install-strip installcheck \ | 635 | + install-data-am install-dvi install-dvi-am install-exec \ |
| 636 | + install-exec-am install-html install-html-am install-info \ | ||
| 637 | + install-info-am install-man install-pdf install-pdf-am \ | ||
| 638 | + install-ps install-ps-am install-strip installcheck \ | ||
| 565 | installcheck-am installdirs maintainer-clean \ | 639 | installcheck-am installdirs maintainer-clean \ |
| 566 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | 640 | maintainer-clean-generic mostlyclean mostlyclean-compile \ |
| 567 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | 641 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ |
| 568 | - tags uninstall uninstall-am uninstall-info-am | 642 | + tags uninstall uninstall-am |
| 643 | + | ||
| 569 | 644 | ||
| 570 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | 645 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
| 571 | # Otherwise a system limit (for SysV at least) may be exceeded. | 646 | # Otherwise a system limit (for SysV at least) may be exceeded. |
test/test_GOptimizer.cpp
0 → 100644
| 1 | +/*************************************************************************** | ||
| 2 | + * test_GOptimizer.cpp - test GOptimizer class * | ||
| 3 | + * ----------------------------------------------------------------------- * | ||
| 4 | + * copyright (C) 2009 by Jurgen Knodlseder * | ||
| 5 | + * ----------------------------------------------------------------------- * | ||
| 6 | + * * | ||
| 7 | + * This program is free software; you can redistribute it and/or modify * | ||
| 8 | + * it under the terms of the GNU General Public License as published by * | ||
| 9 | + * the Free Software Foundation; either version 2 of the License, or * | ||
| 10 | + * (at your option) any later version. * | ||
| 11 | + * * | ||
| 12 | + ***************************************************************************/ | ||
| 13 | + | ||
| 14 | +/* __ Includes ___________________________________________________________ */ | ||
| 15 | +#include <stdlib.h> | ||
| 16 | +#include "test_GOptimizer.hpp" | ||
| 17 | + | ||
| 18 | +/* __ Namespaces _________________________________________________________ */ | ||
| 19 | + | ||
| 20 | +/* __ Globals ____________________________________________________________ */ | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +/*************************************************************************** | ||
| 24 | + * Test: Model parameter handling * | ||
| 25 | + ***************************************************************************/ | ||
| 26 | +void MyOptFct::init_members(void) | ||
| 27 | +{ | ||
| 28 | + m_event = GData::iterator(); | ||
| 29 | + m_end = GData::iterator(); | ||
| 30 | + return; | ||
| 31 | +} | ||
| 32 | +void MyOptFct::copy_members(const MyOptFct& fct) | ||
| 33 | +{ | ||
| 34 | + m_data = fct.m_data; | ||
| 35 | + m_event = fct.m_event; | ||
| 36 | + m_end = fct.m_end; | ||
| 37 | + return; | ||
| 38 | +} | ||
| 39 | +MyOptFct& MyOptFct::operator= (const MyOptFct& fct) | ||
| 40 | +{ | ||
| 41 | + if (this != &fct) { | ||
| 42 | + free_members(); | ||
| 43 | + init_members(); | ||
| 44 | + copy_members(fct); | ||
| 45 | + } | ||
| 46 | + return *this; | ||
| 47 | +} | ||
| 48 | +void MyOptFct::first_item(void) | ||
| 49 | +{ | ||
| 50 | + m_event = m_data.begin(); | ||
| 51 | + m_end = m_data.end(); | ||
| 52 | + return; | ||
| 53 | +} | ||
| 54 | +bool MyOptFct::next_item(void) | ||
| 55 | +{ | ||
| 56 | + m_event++; | ||
| 57 | + return (m_event == m_end); | ||
| 58 | +} | ||
| 59 | +GVector MyOptFct::get_gradient(void) | ||
| 60 | +{ | ||
| 61 | + GVector gradient = GVector(10); | ||
| 62 | + return (gradient); | ||
| 63 | +} | ||
| 64 | +void MyOptFct::set_data(const GData& data) | ||
| 65 | +{ | ||
| 66 | + m_data = data; | ||
| 67 | + m_event = m_data.begin(); | ||
| 68 | + m_end = m_data.end(); | ||
| 69 | + return; | ||
| 70 | +} | ||
| 71 | + | ||
| 72 | + | ||
| 73 | +/*************************************************************************** | ||
| 74 | + * Test: Optimizer * | ||
| 75 | + ***************************************************************************/ | ||
| 76 | +void test_optimizer(void) | ||
| 77 | +{ | ||
| 78 | + // Write header | ||
| 79 | + std::cout << "Test GOptimizer: "; | ||
| 80 | + | ||
| 81 | + // Number of observations in data | ||
| 82 | + int nobs = 50; | ||
| 83 | + | ||
| 84 | + // Setup GData for optimizing | ||
| 85 | + GData data; | ||
| 86 | + GLATObservation obs; | ||
| 87 | + try { | ||
| 88 | + obs.load_binned("data/lat/cntmap.fits.gz", "", ""); | ||
| 89 | + for (int i = 0; i < nobs; ++i) | ||
| 90 | + data.add(obs); | ||
| 91 | + } | ||
| 92 | + catch (std::exception &e) { | ||
| 93 | + std::cout << std::endl << "TEST ERROR: Unable setup GData for optimizing." | ||
| 94 | + << std::endl; | ||
| 95 | + std::cout << e.what() << std::endl; | ||
| 96 | + throw; | ||
| 97 | + } | ||
| 98 | + std::cout << "."; | ||
| 99 | +//std::cout << data << std::endl; | ||
| 100 | + | ||
| 101 | + | ||
| 102 | + // Setup optimizer | ||
| 103 | + MyOptFct opt; | ||
| 104 | + try { | ||
| 105 | + opt.set_data(data); | ||
| 106 | + } | ||
| 107 | + catch (std::exception &e) { | ||
| 108 | + std::cout << std::endl << "TEST ERROR: Unable setup optimizer." | ||
| 109 | + << std::endl; | ||
| 110 | + std::cout << e.what() << std::endl; | ||
| 111 | + throw; | ||
| 112 | + } | ||
| 113 | + std::cout << "."; | ||
| 114 | + | ||
| 115 | + // Time simple GData iterator | ||
| 116 | + double t_elapse; | ||
| 117 | + try { | ||
| 118 | + clock_t t_start = clock(); | ||
| 119 | + int num = 0; | ||
| 120 | + int sum = 0; | ||
| 121 | + for (GData::iterator event = data.begin(); event != data.end(); ++event) { | ||
| 122 | + num++; | ||
| 123 | + sum += (int)event->counts(); | ||
| 124 | + } | ||
| 125 | + t_elapse = double(clock() - t_start)/double(CLOCKS_PER_SEC); | ||
| 126 | + } | ||
| 127 | + catch (std::exception &e) { | ||
| 128 | + std::cout << std::endl << "TEST ERROR: Unable to iterate GData." << std::endl; | ||
| 129 | + std::cout << e.what() << std::endl; | ||
| 130 | + throw; | ||
| 131 | + } | ||
| 132 | + std::cout << "." << std::endl; | ||
| 133 | + std::cout << " - Reference time for GData::iterator: " << t_elapse << std::endl; | ||
| 134 | + | ||
| 135 | + // Iterate over optimizer | ||
| 136 | + try { | ||
| 137 | + clock_t t_start = clock(); | ||
| 138 | + int num = 0; | ||
| 139 | + int sum = 0; | ||
| 140 | + int sum_m = 0; | ||
| 141 | + for (MyOptFct::iterator item = opt.begin(); item != opt.end(); ++item) { | ||
| 142 | + num++; | ||
| 143 | + sum += (int)item.data(); | ||
| 144 | +// double model = item.model(); | ||
| 145 | +// GVector gradient = item.gradient(); | ||
| 146 | + } | ||
| 147 | + t_elapse = double(clock() - t_start)/double(CLOCKS_PER_SEC); | ||
| 148 | + if (sum != 1359*nobs || num != 200000*nobs) { | ||
| 149 | + std::cout << std::endl << | ||
| 150 | + "TEST ERROR: Wrong number of iterations in MyOptFct::iterator." | ||
| 151 | + << std::endl; | ||
| 152 | + throw; | ||
| 153 | + } | ||
| 154 | + } | ||
| 155 | + catch (std::exception &e) { | ||
| 156 | + std::cout << std::endl << "TEST ERROR: Unable to iterate." | ||
| 157 | + << std::endl; | ||
| 158 | + std::cout << e.what() << std::endl; | ||
| 159 | + throw; | ||
| 160 | + } | ||
| 161 | + std::cout << " - Time for MyOptFct::iterator doing same operations: " << t_elapse | ||
| 162 | + << std::endl; | ||
| 163 | + std::cout << "."; | ||
| 164 | + | ||
| 165 | + // Plot final test success | ||
| 166 | + std::cout << " ok." << std::endl; | ||
| 167 | + | ||
| 168 | + // Exit test | ||
| 169 | + return; | ||
| 170 | + | ||
| 171 | +} | ||
| 172 | + | ||
| 173 | + | ||
| 174 | +/*************************************************************************** | ||
| 175 | + * Main test function * | ||
| 176 | + ***************************************************************************/ | ||
| 177 | +int main(void) | ||
| 178 | +{ | ||
| 179 | + // Dump header | ||
| 180 | + std::cout << std::endl; | ||
| 181 | + std::cout << "****************************" << std::endl; | ||
| 182 | + std::cout << "* GOptimizer class testing *" << std::endl; | ||
| 183 | + std::cout << "****************************" << std::endl; | ||
| 184 | + | ||
| 185 | + // Execute the tests | ||
| 186 | + test_optimizer(); | ||
| 187 | + | ||
| 188 | + // Return | ||
| 189 | + return 0; | ||
| 190 | +} |
test/test_GOptimizer.hpp
0 → 100644
| 1 | +/*************************************************************************** | ||
| 2 | + * test_GOptimizer.hpp - test GOptimizer class * | ||
| 3 | + * ----------------------------------------------------------------------- * | ||
| 4 | + * copyright (C) 2009 by Jurgen Knodlseder * | ||
| 5 | + * ----------------------------------------------------------------------- * | ||
| 6 | + * * | ||
| 7 | + * This program is free software; you can redistribute it and/or modify * | ||
| 8 | + * it under the terms of the GNU General Public License as published by * | ||
| 9 | + * the Free Software Foundation; either version 2 of the License, or * | ||
| 10 | + * (at your option) any later version. * | ||
| 11 | + * * | ||
| 12 | + ***************************************************************************/ | ||
| 13 | + | ||
| 14 | +#ifndef TEST_GOPTIMIZER_HPP | ||
| 15 | +#define TEST_GOPTIMIZER_HPP | ||
| 16 | + | ||
| 17 | +/* __ Includes ___________________________________________________________ */ | ||
| 18 | +#include "GammaLib.hpp" | ||
| 19 | +#include <iostream> // cout, cerr | ||
| 20 | +#include <stdexcept> // std::exception | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +/***********************************************************************//** | ||
| 24 | + * @class MyOptFct | ||
| 25 | + * | ||
| 26 | + * @brief MyOptFct class interface defintion. | ||
| 27 | + ***************************************************************************/ | ||
| 28 | +class MyOptFct : public GOptimizerFunction { | ||
| 29 | + | ||
| 30 | +public: | ||
| 31 | + | ||
| 32 | + // Constructors and destructors | ||
| 33 | + MyOptFct() { init_members(); return; } | ||
| 34 | + MyOptFct(const MyOptFct& fct) { init_members(); copy_members(fct); return; } | ||
| 35 | + virtual ~MyOptFct() { free_members(); return; } | ||
| 36 | + | ||
| 37 | + // Operators | ||
| 38 | + MyOptFct& operator= (const MyOptFct& fct); | ||
| 39 | + | ||
| 40 | + // Methods | ||
| 41 | + void first_item(void); //!< Move to first item | ||
| 42 | + bool next_item(void); //!< Move to next element (true if end) | ||
| 43 | + double get_data(void) { return m_event->counts(); } | ||
| 44 | + double get_model(void) { return m_event->counts(); } | ||
| 45 | + GVector get_gradient(void) ; //!< Get gradient reference | ||
| 46 | + void set_data(const GData& data); | ||
| 47 | + | ||
| 48 | +protected: | ||
| 49 | + // Protected methods | ||
| 50 | + void init_members(void); | ||
| 51 | + void copy_members(const MyOptFct& fct); | ||
| 52 | + void free_members(void) { return; } | ||
| 53 | + | ||
| 54 | + // Protected data area | ||
| 55 | + GData m_data; | ||
| 56 | + GData::iterator m_event; //!< Iterator on actual event | ||
| 57 | + GData::iterator m_end; //!< Iterator on end (speeds up iterating) | ||
| 58 | + | ||
| 59 | +}; | ||
| 60 | + | ||
| 61 | +#endif /* TEST_GOPTIMIZER_HPP */ |