Yeah, really, it works!! I forgot to initialise signum pointer :( That's why there was segmentation fault error, as Greg Lyukshin posted.
Thank you and thanks to all gsl community! Best regards, Vladimir. 2011/8/9 Jordi Gutiérrez Hermoso <jord...@octave.org>: > 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