1 package Math
::GSL
::Linalg
::Test
;
2 use base
q{Test::Class};
4 use Math
::GSL
::Linalg qw
/:all/;
5 use Math
::GSL
::Matrix qw
/:all/;
6 use Math
::GSL
::Permutation qw
/:all/;
7 use Math
::GSL qw
/:all/;
9 use Math
::GSL
::Errno qw
/:all/;
12 sub make_fixture
: Test
(setup
) {
14 $self->{matrix
} = gsl_matrix_alloc
(5, 5);
17 sub teardown
: Test
(teardown
) {
18 unlink 'linalg' if -f
'linalg';
21 sub GSL_LINALG_LU_DECOMP
: Tests
{
25 map { gsl_matrix_set
($self->{matrix
}, $row, $_, $_) } (0..4);
28 my $permutation = gsl_permutation_alloc
(5);
29 gsl_permutation_init
($permutation);
30 my ($result, $signum) = gsl_linalg_LU_decomp
($self->{matrix
}, $permutation);
31 is_deeply
( [ $result, $signum ], [ 0, 1] );