Import upstream version 2.13+git20200522.1.f42a4de
Debian Janitor
2 years ago
9 | 9 |
funcs.pl
|
10 | 10 |
GOALS
|
11 | 11 |
Kleene.pod
|
12 | |
lib/Math/.MatrixReal.pm.swo
|
13 | 12 |
lib/Math/MatrixReal.pm
|
|
13 |
Makefile.PL
|
14 | 14 |
MANIFEST This list of files
|
|
15 |
META.json
|
|
16 |
META.yml
|
15 | 17 |
OLD_README
|
16 | 18 |
README.mkd
|
17 | |
t/.list.t.swo
|
18 | 19 |
t/00-load.t
|
19 | 20 |
t/adjoint.t
|
20 | 21 |
t/arith.t
|
|
75 | 76 |
t/vecnorm.t
|
76 | 77 |
t/yacas.t
|
77 | 78 |
TODO
|
78 | |
Makefile.PL
|
79 | |
META.yml
|
80 | |
META.json
|
3 | 3 |
"Jonathan Leto <jonathan@leto.net>"
|
4 | 4 |
],
|
5 | 5 |
"dynamic_config" : 1,
|
6 | |
"generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter version 2.133380",
|
|
6 |
"generated_by" : "Module::Build version 0.4231",
|
7 | 7 |
"license" : [
|
8 | 8 |
"perl_5"
|
9 | 9 |
],
|
10 | 10 |
"meta-spec" : {
|
11 | 11 |
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
|
12 | |
"version" : "2"
|
|
12 |
"version" : 2
|
13 | 13 |
},
|
14 | 14 |
"name" : "Math-MatrixReal",
|
15 | 15 |
"prereqs" : {
|
|
40 | 40 |
"url" : "http://github.com/leto/math--matrixreal/tree/master"
|
41 | 41 |
}
|
42 | 42 |
},
|
43 | |
"version" : "2.13"
|
|
43 |
"version" : "2.13",
|
|
44 |
"x_serialization_backend" : "JSON::PP version 4.04"
|
44 | 45 |
}
|
2 | 2 |
author:
|
3 | 3 |
- 'Jonathan Leto <jonathan@leto.net>'
|
4 | 4 |
build_requires:
|
5 | |
File::Spec: 0
|
6 | |
Test::Most: 0
|
|
5 |
File::Spec: '0'
|
|
6 |
Test::Most: '0'
|
7 | 7 |
configure_requires:
|
8 | |
Module::Build: 0.38
|
|
8 |
Module::Build: '0.38'
|
9 | 9 |
dynamic_config: 1
|
10 | |
generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 2.133380'
|
|
10 |
generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 2.150010'
|
11 | 11 |
license: perl
|
12 | 12 |
meta-spec:
|
13 | 13 |
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
14 | |
version: 1.4
|
|
14 |
version: '1.4'
|
15 | 15 |
name: Math-MatrixReal
|
16 | 16 |
provides:
|
17 | 17 |
Math::MatrixReal:
|
18 | 18 |
file: lib/Math/MatrixReal.pm
|
19 | |
version: 2.13
|
|
19 |
version: '2.13'
|
20 | 20 |
resources:
|
21 | 21 |
license: http://dev.perl.org/licenses/
|
22 | 22 |
repository: http://github.com/leto/math--matrixreal/tree/master
|
23 | |
version: 2.13
|
|
23 |
version: '2.13'
|
|
24 |
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
|
0 | |
# Note: this file was auto-generated by Module::Build::Compat version 0.4003
|
|
0 |
# Note: this file was auto-generated by Module::Build::Compat version 0.4231
|
1 | 1 |
use ExtUtils::MakeMaker;
|
2 | 2 |
WriteMakefile
|
3 | 3 |
(
|
4 | |
'NAME' => 'Math::MatrixReal',
|
5 | |
'VERSION_FROM' => 'lib/Math/MatrixReal.pm',
|
6 | 4 |
'PREREQ_PM' => {
|
7 | 5 |
'File::Spec' => 0,
|
8 | 6 |
'Test::Most' => 0
|
9 | 7 |
},
|
10 | |
'INSTALLDIRS' => 'site',
|
|
8 |
'PL_FILES' => {},
|
11 | 9 |
'EXE_FILES' => [],
|
12 | |
'PL_FILES' => {}
|
|
10 |
'VERSION_FROM' => 'lib/Math/MatrixReal.pm',
|
|
11 |
'NAME' => 'Math::MatrixReal',
|
|
12 |
'INSTALLDIRS' => 'site'
|
13 | 13 |
)
|
14 | 14 |
;
|
4026 | 4026 |
The adjoint is just the transpose of the cofactor matrix. This method is
|
4027 | 4027 |
just an alias for C< ~($matrix-E<gt>cofactor)>.
|
4028 | 4028 |
|
4029 | |
=back
|
4030 | |
|
4031 | 4029 |
=item *
|
4032 | 4030 |
|
4033 | 4031 |
C<$part_of_matrix = $matrix-E<gt>submatrix(x1,y1,x2,Y2);>
|
4034 | 4032 |
|
4035 | |
Submatrix permit to select only part of existing matrix in order to produce a new one.
|
|
4033 |
Submatrix permits one to select only part of existing matrix in order to produce a new one.
|
4036 | 4034 |
This method take four arguments to define a selection area:
|
4037 | 4035 |
|
4038 | 4036 |
=over 6
|
|
4343 | 4341 |
B<x> is of course that: B<M> * B<x> = I<l> * B<x>.
|
4344 | 4342 |
|
4345 | 4343 |
The method uses a Householder reduction to tridiagonal form
|
4346 | |
followed by a QL algoritm with implicit shifts on this
|
|
4344 |
followed by a QL algorithm with implicit shifts on this
|
4347 | 4345 |
tridiagonal. (The tridiagonal matrix is kept internally
|
4348 | 4346 |
in a compact form in this routine to save memory.)
|
4349 | 4347 |
In fact, this routine wraps the householder() and
|
|
4363 | 4361 |
in $matrix to tridiagonal form.
|
4364 | 4362 |
On output, B<T> is a symmetric tridiagonal matrix (only
|
4365 | 4363 |
diagonal and off-diagonal elements are non-zero) and B<Q>
|
4366 | |
is an I<orthogonal> matrix performing the tranformation
|
|
4364 |
is an I<orthogonal> matrix performing the transformation
|
4367 | 4365 |
between B<M> and B<T> (C<$M == $Q * $T * ~$Q>).
|
4368 | 4366 |
|
4369 | 4367 |
=item *
|
|
5349 | 5347 |
|
5350 | 5348 |
Boolean test
|
5351 | 5349 |
|
5352 | |
Tests wether there is at least one non-zero element in the matrix.
|
|
5350 |
Tests whether there is at least one non-zero element in the matrix.
|
5353 | 5351 |
|
5354 | 5352 |
Example:
|
5355 | 5353 |
|
|
5359 | 5357 |
|
5360 | 5358 |
Negated boolean test
|
5361 | 5359 |
|
5362 | |
Tests wether the matrix contains only zero's.
|
|
5360 |
Tests whether the matrix contains only zero's.
|
5363 | 5361 |
|
5364 | 5362 |
Examples:
|
5365 | 5363 |
|
4 | 4 |
|
5 | 5 |
my $DEBUG = 0;
|
6 | 6 |
|
7 | |
do 'funcs.pl';
|
|
7 |
do './funcs.pl';
|
8 | 8 |
|
9 | 9 |
$matrix = Math::MatrixReal->new_diag( [ 1, 2, 3 ] );
|
10 | 10 |
$cofactor = Math::MatrixReal->new_from_string(<<MATRIX);
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_random(20);
|
8 | 8 |
$matrix2 = $matrix->shadow();
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<MATRIX);
|
8 | 8 |
[ 1 0 -1 0 3 ]
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $BENCH = 0; # Some basic benchmarks on operations
|
8 | 8 |
my $DEBUG2 = 0;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
### First, some preparation
|
8 | 8 |
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
my $DEBUG2 = 0;
|
7 | 7 |
# Set this one if you want the REAL benchmarking to be done!
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
8 | 8 |
[ 1 0 0 0 1 ]
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
8 | 8 |
[ 1 0 0 0 1 ]
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
$matrix = Math::MatrixReal->new_diag( [ 1, 2, 3 ] );
|
7 | 7 |
$cofactor = Math::MatrixReal->new_from_string(<<MATRIX);
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = new Math::MatrixReal (10,10);
|
8 | 8 |
$matrix->one();
|
4 | 4 |
use Math::MatrixReal;
|
5 | 5 |
use Data::Dumper;
|
6 | 6 |
|
7 | |
do 'funcs.pl';
|
|
7 |
do './funcs.pl';
|
8 | 8 |
|
9 | 9 |
{
|
10 | 10 |
my $a = Math::MatrixReal->new_from_rows([ [ 2 ] ] );
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
my $eps ||= 1e-8;
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
2 | 2 |
use File::Spec;
|
3 | 3 |
use lib File::Spec->catfile("..","lib");
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
##########################
|
8 | 8 |
## test to see if is_diagonal works
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
my $matrix = Math::MatrixReal->new_diag([1,2,3,4]);
|
7 | 7 |
$matrix->display_precision(5);
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
###############################
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $DEBUG2 = 0;
|
8 | 8 |
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
my $DEBUG2 = 0;
|
7 | 7 |
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $DEBUG2 = 0;
|
8 | 8 |
my $bigsize = 30; # Size of big matrix tests (be careful: n^3!)
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | 5 |
|
6 | |
do 'funcs.pl';
|
|
6 |
do './funcs.pl';
|
7 | 7 |
|
8 | 8 |
my $matrix = Math::MatrixReal->new_from_string(<<'MATRIX');
|
9 | 9 |
[ 1 7 2 6 9 0 1 1 ]
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
###############################
|
7 | 7 |
## compute A^2 , compare to A*A
|
0 | 0 |
use File::Spec;
|
1 | 1 |
use lib File::Spec->catfile("..","lib");
|
2 | 2 |
use Math::MatrixReal;
|
3 | |
do 'funcs.pl';
|
|
3 |
do './funcs.pl';
|
4 | 4 |
|
5 | 5 |
print "1..21\n";
|
6 | 6 |
print "ok 1\n";
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
7 | 7 |
[ 1 0 0 0 0 ]
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
$eps = 1e-6;
|
7 | 7 |
my $A = Math::MatrixReal->new_from_string(<<"MATRIX");
|
8 | 8 |
[ 1 2 3 ]
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $matrix = Math::MatrixReal->new_from_string(<<'MATRIX');
|
8 | 8 |
[ 1 7 2 6 9 0 1 1 ]
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
{
|
7 | 7 |
## compute a 2x2 inverse
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $matrix = Math::MatrixReal->new_from_string(<<MATRIX);
|
8 | 8 |
[ 1 2 3 ]
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
$matrix1 = Math::MatrixReal->new_from_string(<<"MATRIX");
|
7 | 7 |
[ 1 0 0 0 ]
|
3 | 3 |
use File::Spec;
|
4 | 4 |
use lib File::Spec->catfile("..","lib");
|
5 | 5 |
use Math::MatrixReal;
|
6 | |
do 'funcs.pl';
|
|
6 |
do './funcs.pl';
|
7 | 7 |
|
8 | 8 |
{
|
9 | 9 |
my $latex1=<<'LATEX';
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $vec = Math::MatrixReal->new_from_rows([ [ 1, 2, 3 ] ]);
|
8 | 8 |
my $len = (~$vec)->length;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $matrix = Math::MatrixReal->new_from_rows([ [1, 2], [3, 4] ]);
|
8 | 8 |
my @list = $matrix->as_list;
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
my ($a,$b);
|
7 | 7 |
$a = Math::MatrixReal->new_from_cols([[ 1.41E-05, 6.82E-06, 3.18E-06 ],[1,3,4]]);
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<MATRIX);
|
8 | 8 |
|
4 | 4 |
use strict;
|
5 | 5 |
use warnings;
|
6 | 6 |
|
7 | |
do 'funcs.pl';
|
|
7 |
do './funcs.pl';
|
8 | 8 |
|
9 | 9 |
my ($x,$y) = (7,42);
|
10 | 10 |
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
$matrix = Math::MatrixReal->new_diag( [ 1, 2, 3 ] );
|
7 | 7 |
$minor11 = Math::MatrixReal->new_from_rows ( [ [2,0],[0,3] ] );
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
my $eps ||= 1e-8;
|
7 | 7 |
|
8 | 8 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $a = Math::MatrixReal->new_from_rows([ [1, 2], [-2, 1] ] );
|
8 | 8 |
my $b = Math::MatrixReal->new_from_rows([ [1, 2], [3, 1] ] );
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
$eps ||= 1e-8;
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
my $matrix = new Math::MatrixReal (10,10);
|
7 | 7 |
$matrix->one;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal qw/:all/;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $a = Math::MatrixReal->new_diag( [ 1, 2, -3 ] );
|
8 | 8 |
ok( ! $a->is_positive_definite, 'positive_definite' );
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
my $eps = 1e-8;
|
6 | 6 |
|
7 | 7 |
$vec1 = Math::MatrixReal->new_from_string(<<MAT);
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
7 | 7 |
[ 1 0 0 0 1 ]
|
4 | 4 |
my ($e,$res) = (0,0);
|
5 | 5 |
my $eps = 1e-8;
|
6 | 6 |
|
7 | |
do 'funcs.pl';
|
|
7 |
do './funcs.pl';
|
8 | 8 |
|
9 | 9 |
{
|
10 | 10 |
my $matrix = Math::MatrixReal->new_random( 10,10, { integer => 1 } );
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
8 | 8 |
[ 1 0 0 0 1 ]
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
my ($a,$b);
|
7 | 7 |
eval { $a = Math::MatrixReal->new_from_cols([[ 1.41e-05, 6.82E-06, 3.18e-06 ]]) };
|
4 | 4 |
use strict;
|
5 | 5 |
use warnings;
|
6 | 6 |
|
7 | |
do 'funcs.pl';
|
|
7 |
do './funcs.pl';
|
8 | 8 |
|
9 | 9 |
my ($x,$y,$z) = (42, 42.0001,42.0000001);
|
10 | 10 |
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
8 | 8 |
[ 1 0 0 0 1 ]
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
# Determine number of digits in exponents beyond the libc 'standard' of two
|
7 | 7 |
# and pad out the expected result.
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
use strict;
|
5 | 5 |
|
6 | |
do 'funcs.pl';
|
|
6 |
do './funcs.pl';
|
7 | 7 |
my $eps ||= 1e-8;
|
8 | 8 |
|
9 | 9 |
my $matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
8 | 8 |
[ 1 0 0 0 ]
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
8 | 8 |
[ 1 0 0 0 1 ]
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
###############################
|
8 | 8 |
## 2x2 inverse
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
$matrix = Math::MatrixReal->new_diag( [ 1, 2, 3 ] );
|
8 | 8 |
$matrix2 = Math::MatrixReal->new_random(10);
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
my $DEBUG = 0;
|
5 | 5 |
|
6 | |
do 'funcs.pl';
|
|
6 |
do './funcs.pl';
|
7 | 7 |
|
8 | 8 |
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
|
9 | 9 |
[ 1 0 0 0 1 ]
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
use strict;
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my $zero = sprintf '%E', 0;
|
8 | 8 |
my ($pad) = $zero =~ /E00(\d+)$/;
|
1 | 1 |
use File::Spec;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | |
do 'funcs.pl';
|
|
4 |
do './funcs.pl';
|
5 | 5 |
|
6 | 6 |
my ($a,$b);
|
7 | 7 |
my $eps = 1e-6;
|
2 | 2 |
use lib File::Spec->catfile("..","lib");
|
3 | 3 |
use Math::MatrixReal;
|
4 | 4 |
use strict;
|
5 | |
do 'funcs.pl';
|
|
5 |
do './funcs.pl';
|
6 | 6 |
|
7 | 7 |
my ($a,$b);
|
8 | 8 |
$a = Math::MatrixReal->new_from_cols([[ 1.41E-05, 6.82E-06, 3.18E-06 ],[1,3,4]]);
|