NAME

ow_add_matrix_times_scalar - Performs element-wise addition of a matrix and a matrix times scalar.

SYNOPSIS

#include "m/m_mat_arith.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 


int ow_add_matrix_times_scalar
(
	Matrix *first_mp,
	const Matrix *second_mp,
	double scalar
);

DESCRIPTION

This routine performs element-wise addition of a matrix and a matrix times a scalar. The second matrix must fit into the first an integral number of times. For example, if the first matrix has dimenions 6x3, then the second can have dimensions 6x3 (the common case), 6x1, 3x3, 2x3, 1x6, etc, but NOT 2x2, 5x1, etc. The second matrix is added to each block in the first matrix. The first matrix is thus overwritten.

RETURNS

NO_ERROR on success, and ERROR on failure, with an error message being set.

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

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_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 , log_sum_log_matrix_elements , ow_exp_scale_by_sum_log_matrix_row , ow_add_matrix_row_to_vector