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;
108 Vector( const Vector& ) = default;
109 Vector( Vector&& ) = default;
111 Vector& operator=( const Vector& ) = default;
112 Vector& operator=( Vector&& ) = default;
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 )
484constexpr auto reset_backend( Vector<VT,TF>& vector )
504 reset_backend( *vector );
520 reset_backend( *vector );
535constexpr auto clear_backend( Vector<VT,TF>& vector )
554constexpr auto clear_backend( Vector<VT,TF>& vector )
574 clear_backend( *vector );
590 clear_backend( *vector );
616 if( (*vector).size() != n ) {
641 (*vector).resize( n, preserve );
679 resize_backend( vector, n, preserve );
716 (*vector).shrinkToFit();
739 shrinkToFit_backend( vector );
798 typename VT::ResultType tmp( *vector );
880 return size( *vector ) == 0UL;
915template<
typename VT1
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
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition Matrix.h:960
MT::ResultType evaluate(const Matrix< MT, SO > &matrix)
Evaluates the given matrix expression.
Definition Matrix.h:1282
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:628
constexpr bool isEmpty(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is empty.
Definition Matrix.h:1364
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition Matrix.h:730
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:562
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition Matrix.h:692
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition Matrix.h:806
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:1424
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition Matrix.h:1108
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:584
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition Matrix.h:518
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition Matrix.h:676
MT::ResultType evaluateIf(const Matrix< MT, SO > &matrix)
Conditional evaluation of the given matrix expression.
Definition Matrix.h:1345
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition Matrix.h:1169
#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
constexpr bool IsSame_v
Auxiliary variable template for the IsSame type trait.
Definition IsSame.h:159
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
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
BoolConstant< true > TrueType
Type traits base class.
Definition IntegralConstant.h:132
#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
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:175
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition IntegralConstant.h:110
Header file for the exception macros of the math module.
System settings for the inline keywords.
Header file for the IsZero type trait.
Header file for basic type definitions.