Revision 692 branches/merge-trunk-davef/src/linad99/fmmt1.cpp

fmmt1.cpp (revision 692)
8 8
 * \file
9 9
 * Description not yet available.
10 10
 */
11
#define HOME_VERSION
11 12
#include <fvar.hpp>
12 13

  
13 14
/**
......
32 33
 * Description not yet available.
33 34
 * \param
34 35
 */
36
void fmmt1::allocate(int nvar,int _xm)
37
{
38
  w.allocate(1,4*nvar); funval.allocate(1,10);
39
  xx.allocate(0,nvar); gbest.allocate(0,nvar); xsave.allocate(0,nvar);
40
  gsave.allocate(0,nvar);xstep.allocate(0,_xm+1,1,nvar);
41
  xy.allocate(0,_xm+1,1,nvar); xrho.allocate(0,_xm+1); 
42
  xold.allocate(1,nvar); gold.allocate(1,nvar); rrr.allocate(1,nvar);
43
  ctlc_flag = 0;
44
  n = nvar;
45
  xm=_xm;
46
  xrho.initialize();
47
}
35 48
fmmt1::fmmt1(int nvar,int _xm)
36
: w(1,4*nvar),
37
  funval(1,10),
38
  xstep(0,_xm+1,1,nvar),
39
  xrho(0,_xm+1), 
40
  rrr(1,nvar),
41
  xy(0,_xm+1,1,nvar),
42
  xold(1,nvar),
43
  gold(1,nvar),
44
  xx(0,nvar),
45
  gbest(0,nvar),
46
  xsave(0,nvar),
47
  gsave(0,nvar)
49
: w(1,4*nvar), funval(1,10),
50
  xx(0,nvar), gbest(0,nvar), xsave(0,nvar), gsave(0,nvar) ,
51
  xstep(0,_xm+1,1,nvar), xy(0,_xm+1,1,nvar), xrho(0,_xm+1), 
52
  xold(1,nvar), gold(1,nvar), rrr(1,nvar) 
48 53
{
49 54
  ctlc_flag = 0;
50 55
  n = nvar;
......
53 58
//  cout << " In fmm::fmm(int nvar) nvar = " << nvar 
54 59
//       << " and n = " << n << "\n";
55 60
}
61
fmmt1::fmmt1(void)
62
{
63
  ctlc_flag = 0;
64
  n = 0;
65
  xm=0;
66
}
67
#undef HOME_VERSION

Also available in: Unified diff