Revision 1110 trunk/src/df1b2-separable/df1b2lp8.cpp

df1b2lp8.cpp (revision 1110)
2 2
 * $Id$
3 3
 *
4 4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
5
 * Copyright (c) 2008-2012 Regents of the University of California
6 6
 */
7 7
/**
8 8
 * \file
......
54 54
    }
55 55
  }
56 56
  //cout << nz2-nz << endl;
57
 
57

  
58 58
  if (sparse_triplet)
59 59
  {
60 60
    delete sparse_triplet;
......
121 121
    }
122 122
  }
123 123
  */
124
        
125
  //sparse_symbolic = new hs_symbolic(*sparse_triplet,1); 
126
  sparse_symbolic2 = new hs_symbolic(*sparse_triplet2,1); 
127

  
124
  //sparse_symbolic = new hs_symbolic(*sparse_triplet,1);
125
  sparse_symbolic2 = new hs_symbolic(*sparse_triplet2,1);
128 126
}
129 127

  
130 128
/**
......
148 146
  }
149 147
  int n=itmp(1);
150 148
  double samplesize=num_importance_samples;
151
  
149

  
152 150
  // mesh size
153 151
  double delta=0.01;
154 152
  // maximum of distribution is near here
......
188 186
    cerr << "This can't happen" << endl;
189 187
    exit(1);
190 188
  }
191
      
192
  // get random numbers    
193
    
189

  
190
  // get random numbers
191

  
194 192
  random_number_generator rng(rseed);
195 193
  if (antiepsilon)
196 194
  {
......
203 201
  antiepsilon=new dmatrix(1,samplesize,1,n);
204 202
  dmatrix & M=*antiepsilon;
205 203
  M.fill_randn(rng);
206
  
204

  
207 205
  for (i=1;i<=samplesize;i++)
208 206
  {
209 207
    M(i)=M(i)/norm(M(i));
......
339 337
    //VM(i)=VM0(i)*(d(i)/N(i));
340 338
    dfVM0(i)=dfVM(i)*d(i)/N(i);
341 339
    dfN(i)-=(dfVM(i)*VM0(i))*d(i)/square(N(i));
342
    
340

  
343 341
    //N(i)=norm(VM0(i));
344 342
    dfVM0(i)+=dfN(i)/N(i)*VM0(i);
345 343
  }
......
361 359
 */
362 360
void laplace_approximation_calculator::check_hessian_type(const dvector& _x,
363 361
  function_minimizer * pfmin)
364
{  
362
{
365 363
  pfmin->pre_user_function();
366 364
}
367 365

  
......
370 368
 * \param
371 369
 */
372 370
void function_minimizer::pre_user_function(void)
373
{  
371
{
374 372
  if (lapprox)
375 373
  {
376
    if (lapprox->hesstype==2) 
374
    if (lapprox->hesstype==2)
377 375
    {
378 376
      lapprox->separable_calls_counter=0;
379 377
    }
380 378
  }
381 379
  user_function();
382
 /* 
380
 /*
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff