[ADMB Users] how to calculate the hessian matrix by autodif library

wenjian sgwj1 at 163.com
Mon Oct 11 00:59:38 PDT 2010


hi fournier,
   this is  my code :
int main()
{
    int nvar=60;
    independent_variables x(1,nvar);
    x.initialize();
    double f;
    dvector g(1,nvar);
    dmatrix dHessian(1,nvar,1,nvar);
    fmm fmc(nvar); // creates the function minimizing control structure
    fmc.crit=0.000001;
  /////////////////////////////////////////////////////
  gradient_structure gs;
   while(fmc.ireturn>=0)// 
  {//
   fmc.fmin(f,x,g);
   if(fmc.ireturn>0)
   {
           f=func2(x);
     gradcalc(nvar,g);
       }
  }
  //dHessian=fmc.hessian();
  cout << "The minimum value = "  << "at x =\n"
    << x <<"\n"<<"G"<<g<<f<< "\n";
  return 0;
}
I delete dHessian=fmc.hessian(), the program run ok,but when i add dHessian=fmc.hessian(), the following error happened : error LNK2001: unresolved external symbol "public: class dmatrix & __thiscall fmm::hessian(void)" (?hessian at fmm@@QAEAAVdmatrix@@XZ).
    thank you for your help.
sgwj

 

At 2010-10-11 12:28:44,"dave fournier" <davef at otter-rsch.com> wrote:

>This sounds totally destined to fail. I think you should tell us what 
>you want
>to accomplish.
>_______________________________________________
>Users mailing list
>Users at admb-project.org
>http://lists.admb-project.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20101011/11f29ebc/attachment.html>


More information about the Users mailing list