On 8 August 2011 17:04, Владимир Дрынкин <vladimir.dryn...@gmail.com> wrote:

> Can you help me, what's wrong with my code?
[snip]
> matrix matrix::inverse()
> {
>    int *signum;
>    gsl_permutation *p;
>    p = gsl_permutation_alloc(rows);
>    matrix temp = *this;
>    matrix temp_inv(rows, cols);
>    gsl_linalg_complex_LU_decomp(temp.mtrx, p, signum);
>    temp.print();
>    gsl_linalg_complex_LU_invert(temp.mtrx, p, temp_inv.mtrx);
>    return temp_inv;
> }

You need to allocate signum here. Change the first line to

     int *signum = new int;

and at the end of this function put

     delete signum

There may be other errors, but I didn't try to find more.

HTH,
- Jordi G. H.

_______________________________________________
Help-gsl mailing list
Help-gsl@gnu.org
https://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to