35#ifndef _BLAZE_MATH_EXPRESSIONS_VECTOR_H_
36#define _BLAZE_MATH_EXPRESSIONS_VECTOR_H_
98 constexpr VT& operator*() noexcept;
99 constexpr const VT& operator*() const noexcept;
139 return static_cast<VT&
>( *this );
156 return static_cast<const VT&
>( *this );
173 return static_cast<VT&
>( *this );
190 return static_cast<const VT&
>( *this );
206template<
typename VT,
bool TF >
209template<
typename VT,
bool TF >
212template<
typename VT,
bool TF >
215template<
typename VT,
bool TF >
218template<
typename VT,
bool TF >
221template<
typename VT,
bool TF >
224template<
typename VT,
bool TF >
227template<
typename VT,
bool TF >
230template<
typename VT,
bool TF >
233template<
typename VT,
bool TF >
236template<
typename VT,
bool TF >
239template<
typename VT,
bool TF >
242template<
typename VT,
bool TF >
245template<
typename VT,
bool TF >
248template<
typename VT,
bool TF >
251template<
typename VT,
bool TF >
254template<
typename VT,
bool TF >
257template<
typename VT,
bool TF >
260template<
bool B,
typename VT,
bool TF >
263template<
typename VT,
bool TF >
266template<
typename VT1,
bool TF1,
typename VT2,
bool TF2 >
319 return (*vector).begin();
335 return (*vector).begin();
351 return (*vector).begin();
367 return (*vector).end();
383 return (*vector).end();
399 return (*vector).end();
415 return (*vector).size();
431 return (*vector).capacity();
450 return (*vector).nonZeros();
465constexpr auto reset_backend( Vector<VT,TF>& vector )
466 -> DisableIf_t< IsZero_v<VT> >
484constexpr auto reset_backend( Vector<VT,TF>& vector )
485 -> EnableIf_t< IsZero_v<VT> >
504 reset_backend( *vector );
520 reset_backend( *vector );
535constexpr auto clear_backend( Vector<VT,TF>& vector )
536 -> DisableIf_t< IsClearable_v<VT> >
554constexpr auto clear_backend( Vector<VT,TF>& vector )
555 -> EnableIf_t< IsClearable_v<VT> >
574 clear_backend( *vector );
590 clear_backend( *vector );
612 -> DisableIf_t< IsResizable_v<VT> >
616 if( (*vector).size() != n ) {
639 -> EnableIf_t< IsResizable_v<VT> >
641 (*vector).resize( n, preserve );
679 resize_backend( vector, n, preserve );
695 -> DisableIf_t< IsShrinkable_v<VT> >
714 -> EnableIf_t< IsShrinkable_v<VT> >
716 (*vector).shrinkToFit();
739 shrinkToFit_backend( vector );
798 typename VT::ResultType tmp( *vector );
880 return size( *vector ) == 0UL;
915template<
typename VT1
921 return ( IsSame_v<VT1,VT2> &&
922 reinterpret_cast<const void*
>( &a ) ==
reinterpret_cast<const void*
>( &b ) );
942template<
typename VT1
951 (*lhs).assign( *rhs );
972template<
typename VT1
981 (*lhs).addAssign( *rhs );
1002template<
typename VT1
1011 (*lhs).subAssign( *rhs );
1032template<
typename VT1
1041 (*lhs).multAssign( *rhs );
1062template<
typename VT1
1071 (*lhs).divAssign( *rhs );
1092template<
typename VT
1123template<
typename VT
1127 trySet(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1155template<
typename VT
1186template<
typename VT
1190 tryAdd(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1218template<
typename VT
1249template<
typename VT
1253 trySub(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1281template<
typename VT
1284BLAZE_ALWAYS_INLINE bool tryMult(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
1312template<
typename VT
1316 tryMult(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1344template<
typename VT
1375template<
typename VT
1379 tryDiv(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1407template<
typename VT
1437template<
typename VT
1440 tryShift(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
int count )
1468template<
typename VT
1471BLAZE_ALWAYS_INLINE bool tryBitand(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
1499template<
typename VT
1503 tryBitand(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1531template<
typename VT
1534BLAZE_ALWAYS_INLINE bool tryBitor(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
1562template<
typename VT
1566 tryBitor(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1594template<
typename VT
1597BLAZE_ALWAYS_INLINE bool tryBitxor(
const Vector<VT,TF>& vec,
size_t index,
const ET& value )
1625template<
typename VT
1629 tryBitxor(
const Vector<VT,TF>& vec,
size_t index,
size_t size,
const ET& value )
1657template<
typename VT1
1661BLAZE_ALWAYS_INLINE bool tryAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1689template<
typename VT1
1693BLAZE_ALWAYS_INLINE bool tryAddAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1721template<
typename VT1
1725BLAZE_ALWAYS_INLINE bool trySubAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1753template<
typename VT1
1757BLAZE_ALWAYS_INLINE bool tryMultAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1785template<
typename VT1
1789BLAZE_ALWAYS_INLINE bool tryDivAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1817template<
typename VT1
1821BLAZE_ALWAYS_INLINE bool tryShiftAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1849template<
typename VT1
1853BLAZE_ALWAYS_INLINE bool tryBitandAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1881template<
typename VT1
1885BLAZE_ALWAYS_INLINE bool tryBitorAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1913template<
typename VT1
1917BLAZE_ALWAYS_INLINE bool tryBitxorAssign(
const Vector<VT1,TF1>& lhs,
const Vector<VT2,TF2>& rhs,
size_t index )
1945template<
typename VT
1969template<
typename VT
1993template<
typename VT
Header file for run time assertion macros.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the IntegralConstant class template.
Header file for the IsClearable type trait.
Header file for the IsResizable type trait.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsShrinkable type trait.
Deactivation of problematic macros.
Header file for the MAYBE_UNUSED function template.
Base class for N-dimensional vectors.
Definition: Vector.h:82
static constexpr bool transposeFlag
Transpose flag of the vector.
Definition: Vector.h:89
VT VectorType
Type of the vector.
Definition: Vector.h:85
BLAZE_ALWAYS_INLINE constexpr VT & operator~() noexcept
CRTP-based conversion operation for non-constant vectors.
Definition: Vector.h:137
constexpr VT & operator*() noexcept
CRTP-based conversion operation for non-constant vectors.
Definition: Vector.h:171
MT & crtp_cast(Matrix< MT, SO > &matrix)
CRTP-based conversion operation for non-constant matrices.
Definition: Matrix.h:479
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
BoolConstant< false > FalseType
Type/value traits base class.
Definition: IntegralConstant.h:121
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
BLAZE_ALWAYS_INLINE size_t capacity(const Vector< VT, TF > &vector) noexcept
Returns the maximum capacity of the vector.
Definition: Vector.h:429
decltype(auto) evaluateIf(const Vector< VT, TF > &vector)
Conditional evaluation of the given vector expression.
Definition: Vector.h:859
BLAZE_ALWAYS_INLINE VT::ConstIterator cbegin(const Vector< VT, TF > &vector)
Returns an iterator to the first element of the given vector.
Definition: Vector.h:349
BLAZE_ALWAYS_INLINE VT::ConstIterator begin(const Vector< VT, TF > &vector)
Returns an iterator to the first element of the given vector.
Definition: Vector.h:333
BLAZE_ALWAYS_INLINE constexpr size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:413
BLAZE_ALWAYS_INLINE constexpr bool isEmpty(const Vector< VT, TF > &vector) noexcept
Checks if the given vector is empty.
Definition: Vector.h:878
BLAZE_ALWAYS_INLINE void resize(Vector< VT, TF > &vector, size_t n, bool preserve)
Changing the size of the vector.
Definition: Vector.h:677
BLAZE_ALWAYS_INLINE bool isSame(const Vector< VT1, TF1 > &a, const Vector< VT2, TF2 > &b) noexcept
Returns whether the two given vectors represent the same observable state.
Definition: Vector.h:919
VT::ResultType evaluate(const Vector< VT, TF > &vector)
Evaluates the given vector expression.
Definition: Vector.h:796
constexpr void clear(Vector< VT, TF > &&vector)
Clearing the given temporary vector.
Definition: Vector.h:588
constexpr void reset(Vector< VT, TF > &&vector)
Resetting the given temporary vector.
Definition: Vector.h:518
BLAZE_ALWAYS_INLINE void shrinkToFit(Vector< VT, TF > &vector)
Requesting the removal of unused capacity.
Definition: Vector.h:737
BLAZE_ALWAYS_INLINE VT::ConstIterator end(const Vector< VT, TF > &vector)
Returns an iterator just past the last element of the given vector.
Definition: Vector.h:381
BLAZE_ALWAYS_INLINE VT::ConstIterator cend(const Vector< VT, TF > &vector)
Returns an iterator just past the last element of the given vector.
Definition: Vector.h:397
BLAZE_ALWAYS_INLINE size_t nonZeros(const Vector< VT, TF > &vector)
Returns the number of non-zero elements in the vector.
Definition: Vector.h:448
Header file for the exception macros of the math module.
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
System settings for the inline keywords.
Header file for the IsZero type trait.
Header file for basic type definitions.