This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to create a 3D matrix?


Brian Gough wrote:
> 
> Anders Wallander writes:
>  > Hi!  I've installed GSL v. 1.3 and read through the manual about
>  > matrix and vectors.  So far I've found alot of useful information
>  > about 2D-Matrix routines.  But what I need to create and handle is
>  > a 3D density map. Have anyone implemented something like this
>  > before with GSL?  I would really like some advises on this area.
> 
> There is no standard way to handle higher dimensional objects in GSL
> at the moment.  Use a normal C-array instead.
> 
> regards,
> --
> Brian Gough
I *think* the book numerical recipes in C by Press et all (the full
book is available online) has a method for 3D arrays. Their method for
2D matrices never seems that efficient to me and I'm tempted to user
pointer arithmetic, although it is more messy. The method used in that
book means the array is not one continuous area or memory, so I
suspect it does not make good use of the cache a CPU will have. 
-- 
Dr. David Kirkby,
Senior Research Fellow,
Department of Medical Physics,
University College London,
11-20 Capper St, London, WC1E 6JA.
Tel: 020 7679 6408 Fax: 020 7679 6269
Internal telephone: ext 46408
e-mail davek@medphys.ucl.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]