help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pbs with arrays and mkoctfiles


From: Jaroslav Hajek
Subject: Re: Pbs with arrays and mkoctfiles
Date: Thu, 23 Apr 2009 12:57:48 +0200

On Thu, Apr 23, 2009 at 12:34 PM, Diana Rivas <address@hidden> wrote:
> Hello,
>
> I have a problem with multidimensional arrays and mkoctfiles.My Octave
> code has operations in four dimension arrays and matrices, and I perform
> one tensor product using DEFUN_DLD. But when I compile it as /mkoctfile
> program.cc/, appears a error, I can't use four dimension arrays, only
> three  dimension. The compiler calls the header Array.h, which uses  at
> most three dimension arrays, I think  I would need to call ArrayN.h
> which works with multidimensional arrays, but I don't know how to do it .
>
> Someone knows what I can do?
>
> Thanks,
>
> Diana.

Since C++ does not support type-safe functions with arbitrary argument
numbers, the () operator on Array can only take up to 3 indices. To
use 4 indices, you can either fill them into Array<octave_idx_type>
and use that as an index,
or inherit Array and write the indexing method yourself.


-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]