| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions
matrix.h File Reference

Header file for matrix functions. More...

Go to the source code of this file.

## Functions
int | show_matrix (int m, int n, float *mat)
| Print out a matrix. More...
int | show_matrix (int m, int n, double *mat)
| Print out a matrix. More...
double * | matrix_vector_multiply (int m, int n, double *mat, double *vec)
| Multiplies a square matrix by a vector. More...
int | matrix_vector_multiply_in_place (int n, double *mat, double *vec)
| Multiplies a square matrix by a vector. More...

## Detailed Description

Header file for matrix functions.

Author
  Bernard Heymann

Date
  Created: 20000501 Modified: 20071207

Definition in file matrix.h.

## Function Documentation

double* matrix_vector_multiply | ( | int | m,
|  | int | n,
|  | double * | mat,
|  | double * | vec
| ) |  |

Multiplies a square matrix by a vector.

new_vector[i] = sum_j(mat[i][j]*vector[j]).

Parameters

  int | m number of rows in matrix.
  int | n size of vector and number of columns in matrix.
  double* | mat m x n matrix.
  double* | vec n-value vector.

Returns
  float* resultant m-value vector.

Definition at line 86 of file matrix.cpp.

int matrix_vector_multiply_in_place | ( | int | n,
|  | double * | mat,
|  | double * | vec
| ) |  |

Multiplies a square matrix by a vector.

new_vector[i] = sum_j(mat[i][j]*vector[j]).

Parameters

  int | n size of vector and number of columns in matrix.
  double* | mat n x n matrix.
  double* | vec n-value vector.

Returns
  int 0.

Definition at line 110 of file matrix.cpp.

int show_matrix | ( | int | m,
|  | int | n,
|  | float * | mat
| ) |  |

Print out a matrix.

Matrix elements less than 1e-6 are set to zero for display.

Parameters

  int | m rows in matrix.
  int | n columns matrix.
  float* | mat matrix.

Returns
  int 0.

Definition at line 29 of file matrix.cpp.

int show_matrix | ( | int | m,
|  | int | n,
|  | double * | mat
| ) |  |

Print out a matrix.

Matrix elements less than 1e-6 are set to zero for display.

Parameters

  int | m rows in matrix.
  int | n columns matrix.
  double* | mat matrix.

Returns
  int 0.

Definition at line 57 of file matrix.cpp.