NAME

Math::SparseMatrix::Operations - Mathematical operations with matrices

VERSION

Version 0.05

SYNOPSIS

This module introduces new utilities and mathematical functions for matrices from the module Math::SparseMatrix. This is not a class module, it contains only the subroutines for the operations. All the subroutines described below will only function with Math::SparseMatrix objects.

Please consider the subroutines names before using the module, the module usage will bring to your namespace all the subroutines described below.

SUBROUTINES

Print

This subroutines prints the value of each cell.

# Input: $matrix_a.
# Output: matrix content.
&op_print_matrix($matrix_a);

Fill Matrix

This subroutines puts a number 1 inside each matrix cell.

# Input: $matrix_a.
# Output: none.
&op_fill_matrix($matrix_a);

Get Column

Returns a new Math::SparseMatrix object with the selected column. (Not tested yet!)

# Input: $matrix_a, $column_number.
# Output: $matrix_b.
my $matrix_b = &get_col($matrix_a, $column_number);

Get Row

Returns a new Math::SparseMatrix object with the selected row. (Not Tested Yest!)

# Input: $matrix_a, $row_number.
# Output: $matrix_b.
my $matrix_b = &get_col($matrix_a, $column_number);

Addition

Basic matrix addition, returns a new Math::SparseMatrix object.

# Input: $matrix_a, $matrix_b.
# Output: $matrix_c.
my $matrix_c = &op_addition($matrix_a, $matrix_b);

Subtraction

Basic matrix subtraction, returns a new Math::SparseMatrix object.

# Input: $matrix_a, $matrix_b.
# Output: $matrix_c.
my $matrix_c = &op_subtraction($matrix_a, $matrix_b);

Multiplication

Basic matrix multiplication, returns a new Math::SparseMatrix object.

# Input: $matrix_a, $matrix_b.
# Output: $matrix_c.
my $matrix_c = &op_multiply($matrix_a, $matrix_b);

Identity

Returns the identity matrix for the given input matrix. Returns a new Math::SparseMatrix object.

# Input: $size.
# Output: $matrix_a.
my $matrix_a = &op_identity($size);

Transposition

Returns the transposed matrix for the given input matrix. Returns a new Math::SparseMatrix object.

# Input: $matrix_a.
# Output: $matrix_b.
my $matrix_b = &op_transpose($matrix_a);

Dot Product

Returns the dot product for the given input matrix.

# Input: $matrix_a.
# Output: $dot_product.
my $dot_product = &op_dot_product($matrix_a);

AUTHOR

Felipe da V. Leprevost, <leprevost at cpan.org>

BUGS

Please report any bugs or feature requests to bug-math-sparsematrix-operations at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Math-SparseMatrix-Operations. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Math::SparseMatrix::Operations

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2013 Felipe da V. Leprevost.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.