35 #ifndef _BLAZE_MATH_VIEWS_SUBMATRIX_H_
36 #define _BLAZE_MATH_VIEWS_SUBMATRIX_H_
84 inline typename EnableIf< IsMatMatAddExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
85 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
89 return submatrix( (~matrix).leftOperand() , row, column, m, n ) +
90 submatrix( (~matrix).rightOperand(), row, column, m, n );
111 template<
typename MT
113 inline typename EnableIf< IsMatMatSubExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
114 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
118 return submatrix( (~matrix).leftOperand() , row, column, m, n ) -
119 submatrix( (~matrix).rightOperand(), row, column, m, n );
140 template<
typename MT
142 inline typename EnableIf< IsMatMatMultExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
143 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
147 typename MT::LeftOperand left ( (~matrix).leftOperand() );
148 typename MT::RightOperand right( (~matrix).rightOperand() );
150 return submatrix( left, row, 0UL, m, left.columns() ) *
submatrix( right, 0UL, column, right.rows(), n );
171 template<
typename MT
173 inline typename EnableIf< IsVecTVecMultExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
174 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
178 return subvector( (~matrix).leftOperand(), row, m ) *
subvector( (~matrix).rightOperand(), column, n );
199 template<
typename MT
201 inline typename EnableIf< IsMatScalarMultExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
202 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
206 return submatrix( (~matrix).leftOperand(), row, column, m, n ) * (~matrix).rightOperand();
227 template<
typename MT
229 inline typename EnableIf< IsMatScalarDivExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
230 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
234 return submatrix( (~matrix).leftOperand(), row, column, m, n ) / (~matrix).rightOperand();
255 template<
typename MT
257 inline typename EnableIf< IsMatAbsExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
258 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
262 return abs(
submatrix( (~matrix).operand(), row, column, m, n ) );
283 template<
typename MT
285 inline typename EnableIf< IsMatEvalExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
286 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
290 return eval(
submatrix( (~matrix).operand(), row, column, m, n ) );
311 template<
typename MT
313 inline typename EnableIf< IsMatTransExpr<MT>,
typename SubmatrixExprTrait<MT>::Type >::Type
314 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
318 return trans(
submatrix( (~matrix).operand(), column, row, n, m ) );
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, DenseColumn< MT > >::Type column(DenseMatrix< MT, SO > &dm, size_t index)
Creating a view on a specific column of the given dense matrix.
Definition: DenseColumn.h:3026
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:446
const DMatAbsExpr< MT, SO > abs(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the absolute values of each single element of dm.
Definition: DMatAbsExpr.h:739
Header file for the IsMatMatAddExpr type trait class.
Header file for the IsMatTransExpr type trait class.
Header file for the IsMatAbsExpr type trait class.
Header file for the IsVecTVecMultExpr type trait class.
Header file for the IsMatMatMultExpr type trait class.
Header file for the IsMatScalarMultExpr type trait class.
Header file for the IsMatEvalExpr type trait class.
Header file for the EnableIf class template.
Header file for the Matrix base class.
Header file for the SubmatrixExprTrait class template.
Header file for the IsMatScalarDivExpr type trait class.
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, DenseRow< MT > >::Type row(DenseMatrix< MT, SO > &dm, size_t index)
Creating a view on a specific row of the given dense matrix.
Definition: DenseRow.h:3025
const DMatEvalExpr< MT, SO > eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:395
Header file for the IsMatMatSubExpr type trait class.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
Header file for basic type definitions.
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, DenseSubmatrix< MT > >::Type submatrix(DenseMatrix< MT, SO > &dm, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given dense matrix.
Definition: DenseSubmatrix.h:4412
DisableIf< Or< IsComputation< VT >, IsTransExpr< VT > >, DenseSubvector< VT > >::Type subvector(DenseVector< VT, TF > &dv, size_t index, size_t size)
Creating a view on a specific subvector of the given dense vector.
Definition: DenseSubvector.h:2616
Header file for the FunctionTrace class.