NAME
copy_matrix_with_selection_2 - Copies selected elements of a matrix.
SYNOPSIS
#include "m/m_find.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
int copy_matrix_with_selection_2
(
Matrix **target_mpp,
const Matrix *source_mp,
const Int_vector *rows,
const Int_vector *cols
);
DESCRIPTION
This routine copies the elements (specified in the binary vectors rows and
cols) of matrix source_mp into vector *matrix_mpp. A row (column) is copied
if and only if the corresponding element of rows (cols) is non-zero. This
means that rows->length must be equal to source_mp->num_rows. The analogous
statement must hold for cols->length. If rows (cols) is NULL, then all
the rows (columns) are copied. As a special case of this, if both rows and
cols are NULL, then copy_matrix is invoked.
If *target_vpp is NULL, it is created; if it is the wrong size, it is resized;
finally, if it is the right size, the storage is recycled, as is.
RETURNS
NO_ERROR on success, and ERROR on failure, with an error being set.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Ernesto Brau
DOCUMENTER
Ernesto Brau
SEE ALSO
find_in_vector
,
find_in_matrix_by_rows
,
find_in_matrix_by_cols
,
find_in_matrix
,
find_in_matrix_as_vector
,
copy_vector_with_selection
,
copy_matrix_with_selection
,
get_matrix_as_vector_with_selection
,
is_element_zero
,
is_element_nonzero
,
is_element_nan
,
is_element_nonnan
,
is_element_equal_to
,
is_element_different_from
,
is_element_greater_than
,
is_element_less_than
,
is_row_sum_equal_to
,
is_row_sum_different_from
,
is_column_sum_equal_to
,
is_column_sum_different_from
,
is_row_sum_less_than
,
is_row_sum_greater_than
,
is_column_sum_less_than
,
is_column_sum_greater_than
,
is_matrix_element_zero
,
is_matrix_element_nonzero
,
is_matrix_element_nan
,
is_matrix_element_nonnan
,
is_matrix_element_equal_to
,
is_matrix_element_different_from
,
is_matrix_element_greater_than
,
is_matrix_element_less_than