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 MT,
bool SO >
170 template<
typename MT,
bool SO >
173 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
192 template<
typename MT
196 return (~matrix).begin(i);
214 template<
typename MT
218 return (~matrix).begin(i);
236 template<
typename MT
240 return (~matrix).cbegin(i);
258 template<
typename MT
262 return (~matrix).end(i);
280 template<
typename MT
284 return (~matrix).end(i);
302 template<
typename MT
306 return (~matrix).cend(i);
318 template<
typename MT
322 return (~matrix).rows();
334 template<
typename MT
338 return (~matrix).columns();
350 template<
typename MT
354 return (~matrix).capacity();
372 template<
typename MT
376 return (~matrix).capacity( i );
388 template<
typename MT
392 return (~matrix).nonZeros();
410 template<
typename MT
414 return (~matrix).nonZeros( i );
436 template<
typename MT
439 resize_backend(
Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
443 if( (~matrix).
rows() != m || (~matrix).
columns() != n ) {
464 template<
typename MT
467 resize_backend(
Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
469 (~matrix).
resize( m, n, preserve );
489 template<
typename MT
492 resize_backend(
Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
498 (~matrix).
resize( m, preserve );
542 template<
typename MT
546 resize_backend( matrix, m, n, preserve );
568 template<
typename MT
594 template<
typename MT
655 template<
typename MT
675 template<
typename MT
717 template<
typename MT1
724 reinterpret_cast<const void*>( &a ) == reinterpret_cast<const void*>( &b ) );
738 template<
typename MT1
745 (~lhs).assign( ~rhs );
760 template<
typename MT1
770 (~lhs).assign( ~rhs );
786 template<
typename MT1
798 (~lhs).assign(
trans( ~rhs ) );
819 template<
typename MT1
830 assign_backend( ~lhs, ~rhs );
846 template<
typename MT1
853 (~lhs).addAssign( ~rhs );
869 template<
typename MT1
879 (~lhs).addAssign( ~rhs );
895 template<
typename MT1
907 (~lhs).addAssign(
trans( ~rhs ) );
928 template<
typename MT1
939 addAssign_backend( ~lhs, ~rhs );
955 template<
typename MT1
962 (~lhs).subAssign( ~rhs );
978 template<
typename MT1
988 (~lhs).subAssign( ~rhs );
1004 template<
typename MT1
1016 (~lhs).subAssign(
trans( ~rhs ) );
1037 template<
typename MT1
1048 subAssign_backend( ~lhs, ~rhs );
1069 template<
typename MT1
1079 (~lhs).multAssign( ~rhs );
1101 template<
typename MT
1137 template<
typename MT1
1142 size_t row,
size_t column )
1173 template<
typename MT
1178 size_t row,
size_t column )
1209 template<
typename MT1
1214 size_t row,
size_t column )
1245 template<
typename MT
1250 size_t row,
size_t column )
1281 template<
typename MT1
1286 size_t row,
size_t column )
1317 template<
typename MT
1322 size_t row,
size_t column )
1353 template<
typename MT
1358 size_t row,
size_t column )
1388 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:352
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:721
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:261
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:194
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
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:596
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:390
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
const MT::ResultType evaluate(const Matrix< MT, SO > &matrix)
Evaluates the given matrix expression.
Definition: Matrix.h:657
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:304
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:238
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:2939
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:336
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< 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:128
Header file for the exception macros of the math module.
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:544
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:260
Header file for all forward declarations for expression class templates.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< 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:128
Header file for the EnableIf class template.
#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.
BLAZE_ALWAYS_INLINE const MatrixType & operator~() const noexcept
Conversion operator for constant matrices.
Definition: Matrix.h:103
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:93
Compile time type negation.The Not class template negates the given compile time condition. In case the given condition would evaluate to true, the nested member enumeration is set to false and vice versa:
Definition: Not.h:70
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2938
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.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:320
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:164
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:733
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2930
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:677
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 function trace functionality.
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:570