[ADMB Users] What is the 3D version of save_dvar_matrix_position() and relatives?

Martin Wæver Pedersen wpsgodd at gmail.com
Thu Aug 8 14:16:52 PDT 2013


Hello,

I'm working with a model, which requires a spatial grid. In each grid point
I need to evaluate the likelihood of a vector of observations by comparing
with predicted vector for that grid point. I do that using a multivariate
normal distribution. Since both the predicted observation vector and the
covariance matrix of the MV normal distribution depend on model parameters
I need adjoint code to avoid excessive memory use. However, I wasn't able
to use 3D alternatives to save_dvar_matrix_position() (and similar calls)
that work for matrices. I tried save_dvar3_array_position() with the result
pasted below. Am I overlooking the correct class/command to use? if not,
can anyone suggest a possible solution to this (keeping my limited cpp
skills in mind).

Thanks!
Martin

*** adcomp sphmmallswitch3
g++ -c -O3 -Wno-deprecated -D__GNUDOS__ -Dlinux -DOPT_LIB -DUSE_LAPLACE
-fpermissive -I.
-I"/home/mwp/Downloads/admb-11/build/admb-11-linux-gcc4.6-64bit"/include
-I"/home/mwp/Downloads/admb-11/build/admb-11-linux-gcc4.6-64bit"/contrib
sphmmallswitch3.cpp
sphmmallswitch3.cpp: In function ‘dvar3_array fun2ad(const dvar3_array&,
dvar_matrix)’:
sphmmallswitch3.cpp:663:13: error: ‘const class dvar3_array’ has no member
named ‘save_dvar3_array_value’
sphmmallswitch3.cpp:664:13: error: ‘const class dvar3_array’ has no member
named ‘save_dvar3_array_position’
sphmmallswitch3.cpp:667:9: error: ‘class dvar3_array’ has no member named
‘save_dvar3_array_position’
sphmmallswitch3.cpp: In function ‘void dfun2ad()’:
sphmmallswitch3.cpp:674:5: error: ‘dvar3_array_position’ was not declared
in this scope
sphmmallswitch3.cpp:675:60: error: ‘restore_dvar3_array_derivatives’ was
not declared in this scope
sphmmallswitch3.cpp:679:61: error: ‘restore_dvar3_array_value’ was not
declared in this scope
sphmmallswitch3.cpp:709:14: error: ‘class d3_array’ has no member named
‘save_d3_array_derivatives’

Error: could not create sphmmallswitch3.o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20130808/c099aeb9/attachment.html>


More information about the Users mailing list