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 >
186 template<
typename MT
190 return (~matrix).begin(i);
208 template<
typename MT
212 return (~matrix).begin(i);
230 template<
typename MT
234 return (~matrix).cbegin(i);
252 template<
typename MT
256 return (~matrix).end(i);
274 template<
typename MT
278 return (~matrix).end(i);
296 template<
typename MT
300 return (~matrix).cend(i);
312 template<
typename MT
316 return (~matrix).rows();
328 template<
typename MT
332 return (~matrix).columns();
344 template<
typename MT
348 return (~matrix).capacity();
366 template<
typename MT
370 return (~matrix).capacity( i );
382 template<
typename MT
386 return (~matrix).nonZeros();
404 template<
typename MT
408 return (~matrix).nonZeros( i );
430 template<
typename MT
433 resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
437 if( (~matrix).
rows() != m || (~matrix).
columns() != n ) {
458 template<
typename MT
461 resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
463 (~matrix).
resize( m, n, preserve );
483 template<
typename MT
486 resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
492 (~matrix).
resize( m, preserve );
536 template<
typename MT
540 resize_backend( matrix, m, n, preserve );
562 template<
typename MT
588 template<
typename MT
607 template<
typename MT
649 template<
typename MT1
656 reinterpret_cast<const void*>( &a ) == reinterpret_cast<const void*>( &b ) );
670 template<
typename MT1
677 (~lhs).assign( ~rhs );
692 template<
typename MT1
696 assign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
702 (~lhs).assign( ~rhs );
718 template<
typename MT1
722 assign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
730 (~lhs).assign(
trans( ~rhs ) );
751 template<
typename MT1
762 assign_backend( ~lhs, ~rhs );
778 template<
typename MT1
781 BLAZE_ALWAYS_INLINE void addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,SO>& rhs )
785 (~lhs).addAssign( ~rhs );
801 template<
typename MT1
805 addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
811 (~lhs).addAssign( ~rhs );
827 template<
typename MT1
831 addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
839 (~lhs).addAssign(
trans( ~rhs ) );
860 template<
typename MT1
871 addAssign_backend( ~lhs, ~rhs );
887 template<
typename MT1
890 BLAZE_ALWAYS_INLINE void subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,SO>& rhs )
894 (~lhs).subAssign( ~rhs );
910 template<
typename MT1
914 subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
920 (~lhs).subAssign( ~rhs );
936 template<
typename MT1
940 subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
948 (~lhs).subAssign(
trans( ~rhs ) );
969 template<
typename MT1
980 subAssign_backend( ~lhs, ~rhs );
1001 template<
typename MT1
1011 (~lhs).multAssign( ~rhs );
1033 template<
typename MT
1069 template<
typename MT1
1073 BLAZE_ALWAYS_INLINE bool tryAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
1074 size_t row,
size_t column )
1105 template<
typename MT
1109 BLAZE_ALWAYS_INLINE bool tryAddAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
1110 size_t row,
size_t column )
1141 template<
typename MT1
1145 BLAZE_ALWAYS_INLINE bool tryAddAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
1146 size_t row,
size_t column )
1177 template<
typename MT
1181 BLAZE_ALWAYS_INLINE bool trySubAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
1182 size_t row,
size_t column )
1213 template<
typename MT1
1217 BLAZE_ALWAYS_INLINE bool trySubAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
1218 size_t row,
size_t column )
1249 template<
typename MT
1253 BLAZE_ALWAYS_INLINE bool tryMultAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
1254 size_t row,
size_t column )
1285 template<
typename MT
1289 BLAZE_ALWAYS_INLINE bool tryDivAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
1290 size_t row,
size_t column )
1320 template<
typename MT
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for the UNUSED_PARAMETER function template.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:346
BLAZE_ALWAYS_INLINE bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:653
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
MT MatrixType
Type of the matrix.
Definition: Matrix.h:85
Header file for the IsSame and IsStrictlySame type traits.
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:188
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:590
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:384
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 constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:138
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:126
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:298
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:232
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:2647
Header file for the Not class template.
Compile time check for square matrices.This type trait tests whether or not the given template parame...
Definition: IsSquare.h:88
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:330
Header file for the exception macros of the math module.
BLAZE_ALWAYS_INLINE const MatrixType & operator~() const noexcept
Conversion operator for constant matrices.
Definition: Matrix.h:103
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:538
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:254
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:126
#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:79
Header file for run time assertion macros.
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:89
Constraint on the data type.
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:314
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:950
#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
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:609
Header file for the IsResizable type trait.
BLAZE_ALWAYS_INLINE MatrixType & operator~() noexcept
Conversion operator for non-constant matrices.
Definition: Matrix.h:93
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:564