NAME

max_rel_matrix_difference - Returns the max relative difference between two matrices

SYNOPSIS

#include "m/m_mat_metric.h"

Example compile flags (system dependent):
  -DLINUX_386 -DLINUX_386_P4  
   -I/home/kobus/include
   -L/home/kobus/load/linux_386_p4 -L/usr/local/lib -L/usr/lib
  -lKJB         -llapack -lblas -lg2c          -lXext -lX11 


double max_rel_matrix_difference
(
	const Matrix *first_mp,
	const Matrix *second_mp
);

DESCRIPTION

This routine calculates the maximum of 2 * | M(i,j) - N(i,j) | / |M(i,j)| + |N(i,j)| for two dimension compatable matrices. If 2 elements are zero, their relative difference is considered 0. To support test program, if both matrices are NULL, the different is zero.

RETURNS

The distance between the two matrices, or a negative number if there is an error (not very likely--currently impossible). Note that sending in matrices with incompatable dimensions is regarded as a bug. (See set_bug(3)).

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTOR

Kobus Barnard

SEE ALSO

max_abs_matrix_difference , rms_matrix_row_difference , rms_matrix_difference , frobenius_matrix_difference