[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Fwd: Re: strange 'data' pointers using more than one subm
From: |
Patrick Alken |
Subject: |
Re: [Help-gsl] Fwd: Re: strange 'data' pointers using more than one submatrix simultaneously |
Date: |
Sat, 06 Dec 2014 08:25:19 -0500 |
Many of the linear algebra decompositions need to operate on submatrices of the
original matrix so it wouldn't make sense to allocate a new matrix.
To do what you want, you can allocate a new matrix and call gsl_matrix_memcpy
On Dec 5, 2014 11:26 PM, Matthias Sitte <address@hidden> wrote:
>
> Forgot to CC the list...
>
> An implementation-related questions: Why does gsl_matrix_submatrix()
> return a view of a matrix on the stack (which just wraps the underlying
> gsl_matrix struct) and not a pointer to a newly created gsl_matrix
> struct (which I would have to free manually, but I have to free most of
> GSL's structs by hand anyway)???
>
> If there is no quick answer, that's fine, I was just wondering...
>
> Matthias
>
>
> -------- Forwarded Message --------
> Subject: Re: [Help-gsl] strange 'data' pointers using more than one
> submatrix simultaneously
> Date: Sat, 6 Dec 2014 00:28:28 +0100
> From: Frank Reininghaus <address@hidden>
> To: Matthias Sitte <address@hidden>
>
> Hi,
>
> 2014-12-05 17:38 GMT+01:00 Matthias Sitte <address@hidden>:
> > Oh my ... I totally missed that. Corrected that and it works! :D
> >
> > An implementation-related questions: Why does gsl_matrix_submatrix() return
> > a view of a matrix on the stack (which just wraps the underlying gsl_matrix
> > struct) and not a pointer to a newly created gsl_matrix struct (which I
> > would have to free manually, but I have to free most of GSL's structs by
> > hand anyway)??? Just wondering ...
>
> I have no time to look into that right now. Please always include the
> mailing list in your replies - that makes it much more likely that
> anyone will answer your question soon.
>
> Regards,
> Frank
>
>