Scythe-1.0.3
template<matrix_order ORDER, matrix_style STYLE, typename T_type , matrix_order L_ORDER, matrix_style L_STYLE, matrix_order R_ORDER, matrix_style R_STYLE>
scythe::operator| ( const Matrix< T_type, L_ORDER, L_STYLE > &  lhs,
const Matrix< T_type, R_ORDER, R_STYLE > &  rhs 
) [inline]

Logically OR two matrices.

This operator logically ORs the elements of lhs and rhs and returns a boolean Matrix of true and false values, with true values in each position where either Matrix's elements evaluate to true (or the type specific analog to true, typically any non-zero value). This operator is overloaded to provide both Matrix by Matrix OR and Matrix by scalar OR. In the former case, the dimensions of the two matrices must be the same. The boolean Matrix returned has the same dimensions as lhs and rhs, or matches the dimensionality of the larger Matrix object when one of the two parameters is a scalar or a 1x1 Matrix.

In addition, we define multiple templates of the overloaded operator to provide maximal flexibility when working with matrices with differing matrix_order and/or matrix_style. Each version of the overloaded operator (Matrix by Matrix, scalar by Matrix, and Matrix by scalar) provides both a default and general behavior, using templates. By default, the returned Matrix is concrete and has the same matrix_order as the left-hand (or only) Matrix argument. Alternatively, one may coerce the matrix_order and matrix_style of the returned Matrix to preferred values by using the full template declaration of the operator.

Parameters:
lhsThe left-hand-side Matrix or scalar.
rhsThe right-hand-side Matrix or scalar.
Exceptions:
scythe_conformation_error(Level 1)
scythe_alloc_error(Level 1)