Scythe-1.0.3
template<matrix_order RO, matrix_style RS, typename T , matrix_order PO1, matrix_style PS1, matrix_order PO2, matrix_style PS2>
Matrix<T,RO,RS> scythe::selif ( const Matrix< T, PO1, PS1 > &  M,
const Matrix< bool, PO2, PS2 > &  e 
)

Locate rows for which a binary column vector equals 1.

This function identifies all the rows of a Matrix M for which the binary column vector e has an element equal to 1, returning a Matrix

Parameters:
MThe Matrix of interest.
eA boolean column vector.
See also:
unique(const Matrix<T>& M)
Exceptions:
scythe_conformation_error(Level 1)
scythe_dimension_error(Level 1)
scythe_alloc_error(Level 1)

References scythe::Matrix< T_type, ORDER, STYLE >::begin_f(), scythe::Matrix_base< ORDER, STYLE >::cols(), copy(), scythe::Matrix< T_type, ORDER, STYLE >::end_f(), scythe::Matrix_base< ORDER, STYLE >::isColVector(), scythe::Matrix_base< ORDER, STYLE >::rows(), SCYTHE_CHECK_10, and scythe::Matrix_base< ORDER, STYLE >::size().