help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] accessing matrix dimensions?


From: Waclaw Kusnierczyk
Subject: [Help-gsl] accessing matrix dimensions?
Date: Thu, 16 Jun 2011 13:07:07 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10

Hello,

I need to write a generic function to perform operations on matrices. The matrices passed as arguments may be of arbitrary dimensions, so I need my procedure to get the dimensions somehow, best directly from the matrix object (as the information is stored there already).

I can't find appropriate routines in the interface -- I'm thinking about something like

    int nrows = gsl_matrix_size1(const gsl_matrix *m);

It's possible to write code like

    int nrows = m->size1;

but I'd prefer to avoid breaking the abstraction barrier.

Regards,
vQ

--
Waclaw Kusnierczyk

Bioinformatics and Gene Regulation Group
Department of Computer and Information Science
Norwegian University of Science and Technology
Sem Saelands vei 7, 7491 Trondheim, Norway

Theoretical Plant Modeling Lab, iPlant G2P Modeling Tools WG
Department of Agronomy
Kansas State University
Throckmorton Plant Sciences Center, Manhattan, KS 66506, USA




reply via email to

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