[ADMB Users] init_4darray

dave fournier davef at otter-rsch.com
Sat Apr 13 18:47:19 PDT 2013


On 13-04-13 05:32 PM, Alex Campbell wrote:

I guess it wants a constructor.  In the meantime this might do it.


DATA_SECTION
   init_int d1
   init_ivector d2vec(1,d1)
   init_int d3
   init_int d4
  !! int ld1=d3;
  !! int ld3=d3;
  !! int ld4=d4;
  init_4darray blah(1,ld1,1,d2vec,1,ld3,1,ld4)



> Was passing on an issue from a friend, and lazily didn't try it 
> myself. Of course now I try it it compiles fine, and he now tells me 
> the second dimension is ragged. Trying myself, I'm finding
> init_int d1
> init_ivector d2vec(1,d1)
> init_int d3
> init_3darray blah(1,d1,1,d2vec,1,d3)
>
> compiles fine, but
>
> init_int d1
> init_ivector d2vec(1,d1)
> init_int d3
> init_int d4
> init_4darray blah(1,d1,1,d2vec,1,d3,1,d4)
>
> does not. The first candidate for data_4array:allocate contains int 
> args only, the other candidate has ad_integer args for the first two, 
> and then const index_type& args thereafter. Not sure what an 
> index_type is, but it looks like ragged arrays are not implemented for 
> arrays of dimension higher than 3. It would be very handy but we can 
> workaround without too much ugliness.
>
> Number of people desiring this functionality++;  (Number of people 
> capable of and intending to implement it in the near future+=0.)
>
> Alex
>
>
>
> On Sun, Apr 14, 2013 at 2:56 AM, dave fournier <davef at otter-rsch.com 
> <mailto:davef at otter-rsch.com>> wrote:
>
>     A little example of what you want would help.
>     _______________________________________________
>     Users mailing list
>     Users at admb-project.org <mailto: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/20130413/8293f379/attachment.html>


More information about the Users mailing list