Permalink
Browse files

clean up INC once Test::Matrices loaded

  • Loading branch information...
kiwiroy committed Jan 11, 2018
1 parent 58273f4 commit 04d8a300c72ba955356116cd795facee8582f473
Showing with 63 additions and 2 deletions.
  1. +2 −1 t/00-load.t
  2. +1 −0 t/adjoint.t
  3. +1 −0 t/arith.t
  4. +1 −0 t/assign.t
  5. +1 −0 t/basic.t
  6. +1 −0 t/bench_eigen.t
  7. +1 −0 t/bench_eigen2.t
  8. +1 −0 t/binary.t
  9. +1 −0 t/bool.t
  10. +1 −0 t/cofactor.t
  11. +1 −0 t/concat.t
  12. +2 −0 t/condition.t
  13. +1 −0 t/decompose_LR.t
  14. +1 −0 t/det.t
  15. +2 −0 t/diag.t
  16. +1 −0 t/display_precision.t
  17. +1 −0 t/div.t
  18. +1 −0 t/each.t
  19. +1 −0 t/eigen_3x3.t
  20. +1 −0 t/eigen_7x7.t
  21. +1 −0 t/eigen_NxN.t
  22. +1 −0 t/equality.t
  23. +1 −0 t/exponent.t
  24. +1 −0 t/ext1.t
  25. +1 −0 t/gramian.t
  26. +2 −1 t/gsm.t
  27. +1 −0 t/inequality.t
  28. +1 −0 t/inverse.t
  29. +1 −0 t/is_LR.t
  30. +1 −0 t/isrowcol.t
  31. +1 −0 t/latex.t
  32. +1 −0 t/length.t
  33. +1 −0 t/list.t
  34. +1 −0 t/matlab.t
  35. +1 −0 t/max_min.t
  36. +1 −0 t/minimax.t
  37. +1 −0 t/minor.t
  38. +1 −0 t/norm.t
  39. +1 −0 t/normality.t
  40. +1 −0 t/orthogonal.t
  41. +1 −0 t/periodic.t
  42. +1 −0 t/positive.t
  43. +1 −0 t/product.t
  44. +1 −0 t/quadratic.t
  45. +1 −0 t/rand.t
  46. +1 −0 t/rank.t
  47. +1 −0 t/scinotation.t
  48. +1 −0 t/similar.t
  49. +1 −0 t/spectral.t
  50. +1 −0 t/stringify.t
  51. +1 −0 t/submatrix.t
  52. +1 −0 t/swap.t
  53. +1 −0 t/symmetric.t
  54. +1 −0 t/trace.t
  55. +1 −0 t/transpose.t
  56. +1 −0 t/triang.t
  57. +1 −0 t/tridiag.t
  58. +1 −0 t/vecnorm.t
  59. +1 −0 t/yacas.t
View
@@ -1,5 +1,6 @@
use strict;
use warnings;
use Test::More tests => 1;
use File::Spec::Functions;
BEGIN { use_ok('Math::MatrixReal') }
View
@@ -2,6 +2,7 @@ use Test::More tests => 2;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
my $matrix = Math::MatrixReal->new_diag( [ 1, 2, 3 ] );
my $cofactor = Math::MatrixReal->new_from_string(<<MATRIX);
View
@@ -2,6 +2,7 @@ use Test::More tests => 4;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
my $matrix = Math::MatrixReal->new_random(20);
my $matrix2 = $matrix->shadow();
View
@@ -2,6 +2,7 @@ use Test::Simple tests => 5;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{assert_dies};
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<MATRIX);
[ 1 0 -1 0 3 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 7;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
my $BENCH = 0; # Some basic benchmarks on operations
my $DEBUG2 = 0;
View
@@ -2,6 +2,7 @@ use Test::More tests => 3;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_eigenvectors ok_matrix};
no lib 't/lib';
### First, some preparation
my $DEBUG = $Test::Matrices::DEBUG = 0;
View
@@ -2,6 +2,7 @@ use Test::More tests => 3;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_eigenvectors ok_matrix};
no lib 't/lib';
my $DEBUG = 0;
# Set this one if you want the REAL benchmarking to be done!
View
@@ -2,6 +2,7 @@ use Test::More tests => 4;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
[ 1 0 0 0 1 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 12;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
[ 1 0 0 0 1 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 2;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
my $matrix = Math::MatrixReal->new_diag( [ 1, 2, 3 ] );
my $cofactor = Math::MatrixReal->new_from_string(<<MATRIX);
View
@@ -2,6 +2,7 @@ use Test::Simple tests =>7;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $eye = Math::MatrixReal->new_diag([ 1,1,1] );
my $full = Math::MatrixReal->new_from_string(<<MATRIX);
View
@@ -2,6 +2,8 @@ use Test::More tests => 1;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = new Math::MatrixReal (10,10);
$matrix->one();
ok( $matrix->condition($matrix->inverse) - 1 < 1e-6, 'identity has condition number = 1' );
View
@@ -5,6 +5,7 @@ use Data::Dumper;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
{
my $a = Math::MatrixReal->new_from_rows([ [ 2 ] ] );
View
@@ -2,6 +2,7 @@ use Test::More tests => 13;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{similar};
no lib 't/lib';
my $eps ||= 1e-8;
View
@@ -2,6 +2,8 @@ use Test::More tests => 8;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
##########################
## test to see if is_diagonal works
my $matrix = Math::MatrixReal->new_from_string(<<'MATRIX');
View
@@ -2,6 +2,7 @@ use Test::More tests => 3;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{assert_dies};
no lib 't/lib';
my $matrix = Math::MatrixReal->new_diag([1,2,3,4]);
$matrix->display_precision(5);
View
@@ -2,6 +2,7 @@ use Test::Simple tests => 7;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $div_mat_by_scalar=Math::MatrixReal->new_from_string(<<EOF);
[ 1.500000000000E+00 2.420000000000E+00 5.000000000000E-01 ]
[ 2.000000000000E+00 1.500000000000E+00 2.500000000000E+00 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 2;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
###############################
my $matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
View
@@ -2,6 +2,7 @@ use Test::More tests => 13;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix ok_matrix_orthogonal ok_eigenvectors};
no lib 't/lib';
my $DEBUG = $Test::Matrices::DEBUG = 0;
my $DEBUG2 = 0;
View
@@ -2,6 +2,7 @@ use Test::More tests => 10;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_eigenvectors ok_matrix ok_matrix_orthogonal};
no lib 't/lib';
my $DEBUG = $Test::Matrices::DEBUG = 0;
my $DEBUG2 = 0;
View
@@ -3,6 +3,7 @@ use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_eigenvectors ok_matrix ok_matrix_orthogonal};
no lib 't/lib';
my $DEBUG = $Test::Matrices::DEBUG = 0;
my $DEBUG2 = 0;
View
@@ -2,6 +2,7 @@ use Test::More tests => 12;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<'MATRIX');
[ 1 7 2 6 9 0 1 1 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 6;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
###############################
## compute A^2 , compare to A*A
View
@@ -2,6 +2,7 @@ use Test::More;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{similar};
no lib 't/lib';
print "1..21\n";
print "ok 1\n";
View
@@ -2,6 +2,7 @@ use Test::More tests => 6;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
[ 1 0 0 0 0 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 1;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $eps = 1e-6;
my $A = Math::MatrixReal->new_from_string(<<"MATRIX");
@@ -18,7 +19,7 @@ SKIP : {
skip 'solve_GSM ? ', 1;
if ( my $xn = $A->solve_GSM($x0,$b,$eps) ) {
print $xn;
print $xn;
ok( ($xn - $sol) < $eps, 'solve_GSM seems to work');
} else {
ok( 0, 'solve_GSM' );
View
@@ -2,6 +2,7 @@ use Test::More tests => 10;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<'MATRIX');
[ 1 7 2 6 9 0 1 1 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 6;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
{
## compute a 2x2 inverse
View
@@ -2,6 +2,7 @@ use Test::More tests => 9;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<MATRIX);
[ 1 2 3 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 7;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix1 = Math::MatrixReal->new_from_string(<<"MATRIX");
[ 1 0 0 0 ]
View
@@ -2,6 +2,7 @@ use Test::Most tests => 2;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
{
my $latex1=<<'LATEX';
$\left( \begin{array}{cc}
View
@@ -3,6 +3,7 @@ use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{similar};
no lib 't/lib';
my $vec = Math::MatrixReal->new_from_rows([ [ 1, 2, 3 ] ]);
my $len = (~$vec)->length;
View
@@ -2,6 +2,7 @@ use Test::More;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_rows([ [1, 2], [3, 4] ]);
my @list = $matrix->as_list;
View
@@ -2,6 +2,7 @@ use Test::More tests => 2;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my ($a,$b);
$a = Math::MatrixReal->new_from_cols([[ 1.41E-05, 6.82E-06, 3.18E-06 ],[1,3,4]]);
like( $a->as_matlab,qr/\[.*;.*;.*\]/s, 'matlab output looks right');
View
@@ -2,6 +2,7 @@ use Test::More tests => 16;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<MATRIX);
[ 1 4 7 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 6;
use Math::MatrixReal qw/:all/;
use lib 't/lib';
use Test::Matrices qw{similar};
no lib 't/lib';
my ($x,$y) = (7,42);
View
@@ -2,6 +2,7 @@ use Test::More tests => 3;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{ok_matrix};
no lib 't/lib';
my $matrix = Math::MatrixReal->new_diag( [ 1, 2, 3 ] );
my $minor11 = Math::MatrixReal->new_from_rows ( [ [2,0],[0,3] ] );
View
@@ -2,6 +2,7 @@ use Test::More tests => 3;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{similar};
no lib 't/lib';
my $eps ||= 1e-8;
View
@@ -2,6 +2,7 @@ use Test::More tests => 2;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $a = Math::MatrixReal->new_from_rows([ [1, 2], [-2, 1] ] );
my $b = Math::MatrixReal->new_from_rows([ [1, 2], [3, 1] ] );
View
@@ -2,6 +2,7 @@ use Test::More tests => 5;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $eps ||= 1e-8;
my $matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
View
@@ -2,6 +2,7 @@ use Test::More tests => 7;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = new Math::MatrixReal (10,10);
$matrix->one;
View
@@ -2,6 +2,7 @@ use Test::More tests => 8;
use Math::MatrixReal qw/:all/;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $a = Math::MatrixReal->new_diag( [ 1, 2, -3 ] );
ok( ! $a->is_positive_definite, 'positive_definite' );
View
@@ -2,6 +2,7 @@ use Test::More tests => 2;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $eps = 1e-8;
my $vec1 = Math::MatrixReal->new_from_string(<<MAT);
View
@@ -2,6 +2,7 @@ use Test::More tests => 3;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
[ 1 0 0 0 1 ]
[ 0 2 0 0 0 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 16;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{assert_dies};
no lib 't/lib';
my ($e,$res) = (0,0);
my $eps = 1e-8;
View
@@ -2,6 +2,7 @@ use Test::More tests => 5;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices;
no lib 't/lib';
my $matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
[ 1 0 0 0 1 ]
View
@@ -2,6 +2,7 @@ use Test::More tests => 3;
use Math::MatrixReal;
use lib 't/lib';
use Test::Matrices qw{similar};
no lib 't/lib';
my ($a, $b);
eval { $a = Math::MatrixReal->new_from_cols([[ 1.41e-05, 6.82E-06, 3.18e-06 ]]) };
View
@@ -2,6 +2,7 @@ use Test::More tests => 6;
use Math::MatrixReal qw/:all/;
use lib 't/lib';
use Test::Matrices qw{similar};
no lib 't/lib';
my ($x,$y,$z) = (42, 42.0001,42.0000001);
Oops, something went wrong.

0 comments on commit 04d8a30

Please sign in to comment.