Felipe da Veiga Leprevost > Math-SparseMatrix-Operations-0.04 > Math::SparseMatrix::Operations
Module Version: 0.04   Source   Latest Release: Math-SparseMatrix-Operations-0.06

# NAME

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

Version 0.04

# 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.

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

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

```        # Input: \$matrix_a, \$matrix_b.
# Output: \$matrix_c.

## 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: