order of dumping parameters of arrays

0 views
Skip to first unread message

Jiqiang Guo

unread,
Jan 2, 2012, 1:29:58 PM1/2/12
to stan development mailing list
In vol 2 example alli, we have arrays of parameters. Currently, the
arrays of parameters were dumped in different order for parameters
from for derived parameters.

--
Jiqiang

Bob Carpenter

unread,
Jan 2, 2012, 3:31:48 PM1/2/12
to stan...@googlegroups.com
I'll look into it.

What should be happening is that both get
dumped out in column-major order (and its
generalization). So if you have an
array x[2,2,2], the order should be

x[1,1,1], x[1,1,2], x[1,2,1], x[1,2,2], ...

- Bob

Bob Carpenter

unread,
Jan 2, 2012, 8:20:10 PM1/2/12
to stan...@googlegroups.com
I patched Stan so that the output order for derived
params matches those for params. The order I gave
last time was right, but it's row-major, not column
major. So if we have a[2,2,2] the output order is

a[1,1,1], a[1,1,2], a[1,2,1], a[1,2,2],
a[2,1,1], a[2,1,2], a[2,2,1], a[2,2,2].

- Bob

On 1/2/12 1:29 PM, Jiqiang Guo wrote:

Reply all
Reply to author
Forward
0 new messages