35 #ifndef _BLAZE_MATH_EXPRESSIONS_VECTOR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_VECTOR_H_ 94 return *static_cast<VectorType*>(
this );
104 return *static_cast<const VectorType*>(
this );
122 template<
typename VT,
bool TF >
123 typename VT::Iterator
begin( Vector<VT,TF>& vector );
125 template<
typename VT,
bool TF >
126 typename VT::ConstIterator
begin(
const Vector<VT,TF>& vector );
128 template<
typename VT,
bool TF >
129 typename VT::ConstIterator
cbegin(
const Vector<VT,TF>& vector );
131 template<
typename VT,
bool TF >
132 typename VT::Iterator
end( Vector<VT,TF>& vector );
134 template<
typename VT,
bool TF >
135 typename VT::ConstIterator
end(
const Vector<VT,TF>& vector );
137 template<
typename VT,
bool TF >
138 typename VT::ConstIterator
cend(
const Vector<VT,TF>& vector );
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 >
156 const typename VT::ResultType
evaluate(
const Vector<VT,TF>& vector );
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
517 const typename VT::ResultType tmp( ~vector );
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
780 template<
typename VT
784 trySet(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
812 template<
typename VT
843 template<
typename VT
847 tryAdd(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
875 template<
typename VT
906 template<
typename VT
910 trySub(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
938 template<
typename VT
941 BLAZE_ALWAYS_INLINE bool tryMult(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
969 template<
typename VT
973 tryMult(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1001 template<
typename VT
1004 BLAZE_ALWAYS_INLINE bool tryDiv(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
1032 template<
typename VT
1036 tryDiv(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1064 template<
typename VT
1094 template<
typename VT
1097 tryShift(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
int count )
1125 template<
typename VT
1128 BLAZE_ALWAYS_INLINE bool tryBitand(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
1156 template<
typename VT
1160 tryBitand(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1188 template<
typename VT
1191 BLAZE_ALWAYS_INLINE bool tryBitor(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
1219 template<
typename VT
1223 tryBitor(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1251 template<
typename VT
1254 BLAZE_ALWAYS_INLINE bool tryBitxor(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
1282 template<
typename VT
1286 tryBitxor(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1314 template<
typename VT1
1318 BLAZE_ALWAYS_INLINE bool tryAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1346 template<
typename VT1
1350 BLAZE_ALWAYS_INLINE bool tryAddAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1378 template<
typename VT1
1382 BLAZE_ALWAYS_INLINE bool trySubAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1410 template<
typename VT1
1414 BLAZE_ALWAYS_INLINE bool tryMultAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1442 template<
typename VT1
1446 BLAZE_ALWAYS_INLINE bool tryDivAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1474 template<
typename VT1
1478 BLAZE_ALWAYS_INLINE bool tryShiftAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1506 template<
typename VT1
1510 BLAZE_ALWAYS_INLINE bool tryBitandAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1538 template<
typename VT1
1542 BLAZE_ALWAYS_INLINE bool tryBitorAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1570 template<
typename VT1
1574 BLAZE_ALWAYS_INLINE bool tryBitxorAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1602 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
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.
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
Header file for the MAYBE_UNUSED function template.
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
const MT::ResultType evaluate(const Matrix< MT, SO > &matrix)
Evaluates the given matrix expression.
Definition: Matrix.h:912
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:187
Header file for the IsShrinkable type trait.
BLAZE_ALWAYS_INLINE constexpr const VectorType & operator~() const noexcept
Conversion operator for constant vectors.
Definition: Vector.h:103
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
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:198
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,...
Definition: Assert.h:101
Header file for the function trace functionality.