35 #ifndef _BLAZE_MATH_EXPRESSIONS_MATRIX_H_
36 #define _BLAZE_MATH_EXPRESSIONS_MATRIX_H_
94 return *
static_cast<MatrixType*
>( this );
104 return *
static_cast<const MatrixType*
>( this );
122 template<
typename MT,
bool SO >
125 template<
typename MT,
bool SO >
128 template<
typename MT,
bool SO >
131 template<
typename MT,
bool SO >
134 template<
typename MT,
bool SO >
137 template<
typename MT,
bool SO >
140 template<
typename MT,
bool SO >
143 template<
typename MT,
bool SO >
146 template<
typename MT,
bool SO >
149 template<
typename MT,
bool SO >
152 template<
typename MT,
bool SO >
155 template<
typename MT,
bool SO >
158 template<
typename MT,
bool SO >
161 template<
typename MT,
bool SO >
164 template<
typename MT,
bool SO >
167 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
185 template<
typename MT
189 return (~matrix).begin(i);
206 template<
typename MT
210 return (~matrix).begin(i);
227 template<
typename MT
231 return (~matrix).cbegin(i);
248 template<
typename MT
252 return (~matrix).end(i);
269 template<
typename MT
273 return (~matrix).end(i);
290 template<
typename MT
294 return (~matrix).cend(i);
306 template<
typename MT
310 return (~matrix).rows();
322 template<
typename MT
326 return (~matrix).columns();
338 template<
typename MT
342 return (~matrix).capacity();
360 template<
typename MT
364 return (~matrix).capacity( i );
376 template<
typename MT
380 return (~matrix).nonZeros();
398 template<
typename MT
402 return (~matrix).nonZeros( i );
424 template<
typename MT
427 resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
431 if( (~matrix).
rows() != m || (~matrix).
columns() != n ) {
452 template<
typename MT
455 resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
457 (~matrix).
resize( m, n, preserve );
477 template<
typename MT
480 resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
486 (~matrix).
resize( m, preserve );
530 template<
typename MT
534 resize_backend( matrix, m, n, preserve );
556 template<
typename MT
582 template<
typename MT
601 template<
typename MT
643 template<
typename MT1
650 reinterpret_cast<const void*>( &a ) == reinterpret_cast<const void*>( &b ) );
664 template<
typename MT1
671 (~lhs).assign( ~rhs );
686 template<
typename MT1
690 assign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
696 (~lhs).assign( ~rhs );
712 template<
typename MT1
716 assign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
724 (~lhs).assign(
trans( ~rhs ) );
745 template<
typename MT1
756 assign_backend( ~lhs, ~rhs );
772 template<
typename MT1
775 BLAZE_ALWAYS_INLINE void addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,SO>& rhs )
779 (~lhs).addAssign( ~rhs );
795 template<
typename MT1
799 addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
805 (~lhs).addAssign( ~rhs );
821 template<
typename MT1
825 addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
833 (~lhs).addAssign(
trans( ~rhs ) );
854 template<
typename MT1
865 addAssign_backend( ~lhs, ~rhs );
881 template<
typename MT1
884 BLAZE_ALWAYS_INLINE void subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,SO>& rhs )
888 (~lhs).subAssign( ~rhs );
904 template<
typename MT1
908 subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
914 (~lhs).subAssign( ~rhs );
930 template<
typename MT1
934 subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
942 (~lhs).subAssign(
trans( ~rhs ) );
963 template<
typename MT1
974 subAssign_backend( ~lhs, ~rhs );
995 template<
typename MT1
1005 (~lhs).multAssign( ~rhs );
1027 template<
typename MT
1063 template<
typename MT1
1067 BLAZE_ALWAYS_INLINE bool tryAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
1068 size_t row,
size_t column )
1099 template<
typename MT
1103 BLAZE_ALWAYS_INLINE bool tryAddAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
1104 size_t row,
size_t column )
1135 template<
typename MT1
1139 BLAZE_ALWAYS_INLINE bool tryAddAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
1140 size_t row,
size_t column )
1171 template<
typename MT
1175 BLAZE_ALWAYS_INLINE bool trySubAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
1176 size_t row,
size_t column )
1207 template<
typename MT1
1211 BLAZE_ALWAYS_INLINE bool trySubAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
1212 size_t row,
size_t column )
1243 template<
typename MT
1247 BLAZE_ALWAYS_INLINE bool tryMultAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
1248 size_t row,
size_t column )
1278 template<
typename MT
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
Header file for the UNUSED_PARAMETER function template.
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE const MatrixType & operator~() const
Conversion operator for constant matrices.
Definition: Matrix.h:103
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix)
Checks if the given matrix is a square matrix.
Definition: Matrix.h:603
BLAZE_ALWAYS_INLINE MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:229
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
BLAZE_ALWAYS_INLINE MT::ConstIterator cend(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:292
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:250
MT MatrixType
Type of the matrix.
Definition: Matrix.h:85
BLAZE_ALWAYS_INLINE bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b)
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:647
Header file for the IsSame and IsStrictlySame type traits.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix)
Returns the maximum capacity of the matrix.
Definition: Matrix.h:340
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:308
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:107
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the And class template.
BLAZE_ALWAYS_INLINE void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:584
BLAZE_ALWAYS_INLINE size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:378
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:158
Header file for the IsSquare type trait.
Header file for the DisableIf class template.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
Header file for the Not class template.
BLAZE_ALWAYS_INLINE MatrixType & operator~()
Conversion operator for non-constant matrices.
Definition: Matrix.h:93
Compile time check for square matrices.This type trait tests whether or not the given template parame...
Definition: IsSquare.h:87
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:187
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:532
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename RowExprTrait< MT >::Type >::Type row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:107
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:116
Header file for run time assertion macros.
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2591
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:94
Constraint on the data type.
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:944
#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
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:324
Header file for exception macros.
Header file for the IsResizable type trait.
System settings for the inline keywords.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:558