35 #ifndef _BLAZE_MATH_EXPRESSIONS_VECTOR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_VECTOR_H_ 104 return *
static_cast<const VectorType*
>( this );
122 template<
typename VT,
bool TF >
125 template<
typename VT,
bool TF >
128 template<
typename VT,
bool TF >
131 template<
typename VT,
bool TF >
134 template<
typename VT,
bool TF >
137 template<
typename VT,
bool TF >
140 template<
typename VT,
bool TF >
141 constexpr
size_t size(
const Vector<VT,TF>& vector ) noexcept;
143 template<
typename VT,
bool TF >
144 size_t capacity(
const Vector<VT,TF>& vector ) noexcept;
146 template<
typename VT,
bool TF >
147 size_t nonZeros(
const Vector<VT,TF>& vector );
149 template<
typename VT,
bool TF >
150 void resize( Vector<VT,TF>& vector,
size_t n,
bool preserve=
true );
152 template<
typename VT,
bool TF >
155 template<
typename VT,
bool TF >
158 template<
typename VT,
bool TF >
159 constexpr
bool isEmpty(
const Vector<VT,TF>& vector ) noexcept;
161 template<
typename VT1,
bool TF1,
typename VT2,
bool TF2 >
162 bool isSame(
const Vector<VT1,TF1>& a,
const Vector<VT2,TF2>& b ) noexcept;
174 template<
typename VT
178 return (~vector).begin();
190 template<
typename VT
194 return (~vector).begin();
206 template<
typename VT
210 return (~vector).begin();
222 template<
typename VT
226 return (~vector).end();
238 template<
typename VT
242 return (~vector).end();
254 template<
typename VT
258 return (~vector).end();
270 template<
typename VT
274 return (~vector).size();
286 template<
typename VT
290 return (~vector).capacity();
305 template<
typename VT
309 return (~vector).nonZeros();
328 template<
typename VT
331 -> DisableIf_t< IsResizable_v<VT> >
335 if( (~vector).
size() != n ) {
355 template<
typename VT
358 -> EnableIf_t< IsResizable_v<VT> >
360 (~vector).
resize( n, preserve );
394 template<
typename VT
398 resize_backend( vector, n, preserve );
411 template<
typename VT
414 -> DisableIf_t< IsShrinkable_v<VT> >
430 template<
typename VT
433 -> EnableIf_t< IsShrinkable_v<VT> >
454 template<
typename VT
458 shrinkToFit_backend( vector );
513 template<
typename VT
533 template<
typename VT
537 return size( ~vector ) == 0UL;
572 template<
typename VT1
578 return ( IsSame_v<VT1,VT2> &&
579 reinterpret_cast<const void*>( &a ) == reinterpret_cast<const void*>( &b ) );
599 template<
typename VT1
608 (~lhs).assign( ~rhs );
629 template<
typename VT1
638 (~lhs).addAssign( ~rhs );
659 template<
typename VT1
668 (~lhs).subAssign( ~rhs );
689 template<
typename VT1
698 (~lhs).multAssign( ~rhs );
719 template<
typename VT1
728 (~lhs).divAssign( ~rhs );
749 template<
typename VT
779 template<
typename VT
809 template<
typename VT
839 template<
typename VT
842 BLAZE_ALWAYS_INLINE bool tryMult(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
870 template<
typename VT
874 tryMult(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
902 template<
typename VT
933 template<
typename VT
937 tryDiv(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
965 template<
typename VT1
969 BLAZE_ALWAYS_INLINE bool tryAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
997 template<
typename VT1
1001 BLAZE_ALWAYS_INLINE bool tryAddAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1029 template<
typename VT1
1033 BLAZE_ALWAYS_INLINE bool trySubAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1061 template<
typename VT1
1065 BLAZE_ALWAYS_INLINE bool tryMultAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1093 template<
typename VT1
1097 BLAZE_ALWAYS_INLINE bool tryDivAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1125 template<
typename VT
#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.
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
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:992
Header file for basic type definitions.
static constexpr bool transposeFlag
Transpose flag of the vector.
Definition: Vector.h:85
Header file for the IsSame and IsStrictlySame type traits.
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3077
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:799
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3085
const MT::ResultType evaluate(const Matrix< MT, SO > &matrix)
Evaluates the given matrix expression.
Definition: Matrix.h:912
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
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:482
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:416
Header file for the DisableIf class template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Expression object for sparse matrix-sparse vector multiplications.The TSMatSVecMultExpr class represe...
Definition: Forward.h:176
Header file for the IsShrinkable type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
BLAZE_ALWAYS_INLINE constexpr const VectorType & operator~() const noexcept
Conversion operator for constant vectors.
Definition: Vector.h:103
Header file for the exception macros of the math module.
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:738
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:438
Header file for the EnableIf class template.
BLAZE_ALWAYS_INLINE constexpr VectorType & operator~() noexcept
Conversion operator for non-constant vectors.
Definition: Vector.h:93
Header file for run time assertion macros.
constexpr bool isEmpty(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is empty.
Definition: Matrix.h:932
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:186
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 function trace functionality.