[Top][All Lists]

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

Re: [Help-gsl] GSL Matrix from preexisting data

From: Joakim Hove
Subject: Re: [Help-gsl] GSL Matrix from preexisting data
Date: Fri, 13 Aug 2004 08:43:07 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux)

Mathias Wagner <address@hidden> writes:

> Hi,
> I would like to use GSL's LU Decomposition. The data are storred in A Blitz++ 
> (  Array. I can get access the data in a 
> one-dimensional C-Array (via the .data() function)
> Is there a way to create a GSL Matrix from a one-dimensional C-Array ?

At least with the help of matrix views it is simple:

| gsl_matrix_view A_view;
| gsl_matrix *A;
| A_view = gsl_matrix_view_array(double * data, size_t N1, size_t N2);
| A = &A_view.matrix;

Observe that the construction above does *not* allocate any new data.

HTH - Joakim

Joakim Hove
hove AT ift uib no
+47 (55 5)8 27 90

reply via email to

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