 一、Math::MatrixReal的下载与安装 到CPAN的搜索页 http://search.cpan.org查找MatrixReal并下载源码,解压进入目录: # perl Makefile.PL# make# make test
# make install
二、矩阵的输出 示例程序: #!/usr/bin/perl -w use Math::MatrixReal; $matrix = Math::MatrixReal->new_from_cols( [ [1,2], [3,4] ] ); print $matrix;
输出: [ 1.000000000000E+00 3.000000000000E+00 ] [ 2.000000000000E+00 4.000000000000E+00 ]
三、参考资料: http://search.cpan.org/~leto/Math-MatrixReal-1.9/MatrixReal.pm http://www001.upp.so-net.ne.jp/hata/dowasure_perl.html Mastering Algorithms with Perl Jon Orwant, Jarkko Hietaniemi, John Macdonald.
|
|