NAME
log_sum_log_matrix_elements - Adds the elements of a matrix in log space
SYNOPSIS
#include "m/m_mat_arith.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
double log_sum_log_matrix_elements(Matrix *log_mp);
DESCRIPTION
This routine returns the log of the sum of the anti-log (exp()) of the
elements of the matrix pointed to by mp. This is done is a way which reduces
problems due the possibility that the numbers are not well represented in
non-log space. Think of the matrix being a log representation of some
quantities. We want the sum of the non-log quantities, but we want the log
representation of it.
If needed, LOG_ZERO is used to represent log(0). LOG_ZERO is suffiently
negative number that exp(LOG_ZERO) is zero.
RETURNS
log(sum(ew_exp(mp)) [ "ew" means element-wise ].
RELATED
sum_matrix_elements, average_matrix_elements)
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
get_vector_outer_product
,
add_matrices
,
ow_add_matrices
,
ow_add_matrices_2
,
subtract_matrices
,
ow_subtract_matrices
,
multiply_matrices_ew
,
ow_multiply_matrices_ew
,
ow_multiply_matrices_ew_2
,
divide_matrices_ew
,
ow_divide_matrices_ew
,
ow_add_matrix_times_scalar
,
ow_add_matrix_times_scalar_2
,
ow_add_int_matrix_to_matrix
,
multiply_matrices
,
multiply_by_transpose
,
multiply_with_transpose
,
multiply_by_own_transpose
,
get_dot_product_of_matrix_rows
,
get_dot_product_of_matrix_rows_2
,
invert_matrix_elements
,
square_matrix_elements
,
exp_matrix_elements
,
log_matrix_elements
,
log_matrix_elements_2
,
sqrt_matrix_elements
,
add_scalar_to_matrix
,
subtract_scalar_from_matrix
,
multiply_matrix_by_scalar
,
divide_matrix_by_scalar
,
ow_invert_matrix_elements
,
ow_square_matrix_elements
,
ow_exp_matrix_elements
,
ow_log_matrix_elements
,
ow_log_matrix_elements_2
,
ow_add_scalar_to_matrix
,
ow_subtract_scalar_from_matrix
,
ow_multiply_matrix_by_scalar
,
ow_divide_matrix_by_scalar
,
multiply_vector_and_matrix
,
multiply_matrix_and_vector
,
multiply_matrix_rows
,
add_row_vector_to_matrix
,
subtract_row_vector_from_matrix
,
multiply_matrix_by_row_vector_ew
,
divide_matrix_by_row_vector
,
ow_add_row_vector_to_matrix
,
ow_subtract_row_vector_from_matrix
,
ow_multiply_matrix_by_row_vector_ew
,
ow_divide_matrix_by_row_vector
,
ow_add_vector_to_matrix_row
,
ow_add_vector_to_matrix_col
,
ow_add_scalar_times_vector_to_matrix_row
,
ow_subtract_vector_from_matrix_row
,
ow_multiply_matrix_row_by_vector
,
ow_divide_matrix_row_by_vector
,
ow_multiply_matrix_col_by_vector
,
ow_add_scalar_to_matrix_row
,
ow_subtract_scalar_from_matrix_row
,
ow_multiply_matrix_row_by_scalar
,
ow_divide_matrix_row_by_scalar
,
add_col_vector_to_matrix
,
ow_add_col_vector_to_matrix
,
subtract_col_vector_from_matrix
,
ow_subtract_col_vector_from_matrix
,
multiply_matrix_by_col_vector_ew
,
ow_multiply_matrix_by_col_vector_ew
,
divide_matrix_by_col_vector
,
ow_divide_matrix_by_col_vector
,
ow_add_matrix_row_times_scalar
,
ow_add_matrix_rows_ew
,
ow_multiply_matrix_rows_ew
,
sum_matrix_elements
,
sum_matrix_row_elements
,
sum_matrix_col_elements
,
average_matrix_elements
,
ow_subtract_identity_matrix
,
do_matrix_recomposition
,
do_matrix_recomposition_2
,
ow_exp_scale_by_sum_log_matrix_row
,
ow_add_matrix_row_to_vector
,
ow_get_abs_of_matrix
,
get_abs_of_matrix
,
get_euler_rotation_matrix
,
get_euler_homo_rotation_matrix
,
get_3d_rotation_matrix_1
,
get_3d_rotation_matrix_2
,
get_2d_rotation_matrix
,
get_3d_homo_rotation_matrix_1
,
get_3d_homo_rotation_matrix_2
,
get_2d_homo_rotation_matrix
,
get_3d_scaling_matrix_1
,
get_3d_scaling_matrix_2
,
get_3d_homo_scaling_matrix_1
,
get_3d_homo_scaling_matrix_2
,
get_3d_homo_translation_matrix_1
,
get_3d_homo_translation_matrix_2