Revision 1935 trunk/src/nh99/newmodm2.cpp

newmodm2.cpp (revision 1935)
5 5
 * Copyright (c) 2008-2012 Regents of the University of California
6 6
 */
7 7
#include <admodel.h>
8
#if defined(USE_LAPLACE)
9 8
#  include <df1b2fun.h>
10 9
#  include <adrndeff.h>
11
#endif
12 10

  
13 11
double function_minimizer::projected_hess_determinant(const dvector& g,
14 12
  const int underflow_flag)
......
176 174
    dvariable vf=0.0;
177 175
    gradient_structure::set_YES_DERIVATIVES();
178 176
    vf=initial_params::reset(dvar_vector(x));
179
    #if defined(USE_LAPLACE)
180 177
      if (lapprox)
181 178
      {
182 179
        if (lapprox->hesstype==2)
......
184 181
          lapprox->separable_calls_counter=0;
185 182
        }
186 183
      }
187
    #endif
188 184
    userfunction();
189 185
    vf=likeprof_params::likeprofptr[iprof]->variable();
190 186
    gradcalc(nvar, g, vf);
......
192 188
    vf=0.0;
193 189
    vf=initial_params::reset(dvar_vector(x));
194 190
    *objective_function_value::pobjfun=0.0;
195
    #if defined(USE_LAPLACE)
196 191
      if (lapprox)
197 192
      {
198 193
        if (lapprox->hesstype==2)
......
200 195
          lapprox->separable_calls_counter=0;
201 196
        }
202 197
      }
203
    #endif
204 198
    userfunction();
205 199
    vf+=*objective_function_value::pobjfun;
206 200
    gradcalc(nvar, fg, vf);

Also available in: Unified diff