35 #ifndef _BLAZE_MATH_VIEWS_SUBVECTOR_SPARSE_H_ 36 #define _BLAZE_MATH_VIEWS_SUBVECTOR_SPARSE_H_ 100 template<
typename VT
104 class Subvector<VT,AF,TF,false,CSAs...>
105 :
public View< SparseVector< Subvector<VT,AF,TF,false,CSAs...>, TF > >
106 ,
private SubvectorData<CSAs...>
110 using DataType = SubvectorData<CSAs...>;
111 using Operand = If_< IsExpression<VT>, VT, VT& >;
117 using This = Subvector<VT,AF,TF,
false,CSAs...>;
119 using BaseType = SparseVector<This,TF>;
120 using ViewedType = VT;
137 template<
typename VectorType
138 ,
typename IteratorType >
139 class SubvectorElement
140 :
private SparseElement
149 inline SubvectorElement( IteratorType pos,
size_t offset )
161 template<
typename T >
inline SubvectorElement& operator=(
const T& v ) {
173 template<
typename T >
inline SubvectorElement&
operator+=(
const T& v ) {
185 template<
typename T >
inline SubvectorElement&
operator-=(
const T& v ) {
197 template<
typename T >
inline SubvectorElement&
operator*=(
const T& v ) {
209 template<
typename T >
inline SubvectorElement&
operator/=(
const T& v ) {
220 inline const SubvectorElement* operator->()
const {
230 inline decltype(
auto) value()
const {
231 return pos_->value();
240 inline size_t index()
const {
241 return pos_->index() - offset_;
256 template<
typename VectorType
257 ,
typename IteratorType >
258 class SubvectorIterator
262 using IteratorCategory = std::forward_iterator_tag;
263 using ValueType = SubvectorElement<VectorType,IteratorType>;
264 using PointerType = ValueType;
265 using ReferenceType = ValueType;
266 using DifferenceType = ptrdiff_t;
269 using iterator_category = IteratorCategory;
270 using value_type = ValueType;
271 using pointer = PointerType;
272 using reference = ReferenceType;
273 using difference_type = DifferenceType;
279 inline SubvectorIterator()
291 inline SubvectorIterator( IteratorType iterator,
size_t index )
302 template<
typename VectorType2,
typename IteratorType2 >
303 inline SubvectorIterator(
const SubvectorIterator<VectorType2,IteratorType2>& it )
305 , offset_( it.offset() )
314 inline SubvectorIterator& operator++() {
325 inline const SubvectorIterator operator++(
int ) {
326 const SubvectorIterator tmp( *
this );
338 return ReferenceType( pos_, offset_ );
347 inline PointerType operator->()
const {
348 return PointerType( pos_, offset_ );
358 template<
typename VectorType2,
typename IteratorType2 >
359 inline bool operator==(
const SubvectorIterator<VectorType2,IteratorType2>& rhs )
const {
360 return base() == rhs.base();
370 template<
typename VectorType2,
typename IteratorType2 >
371 inline bool operator!=(
const SubvectorIterator<VectorType2,IteratorType2>& rhs )
const {
372 return !( *
this == rhs );
382 inline DifferenceType
operator-(
const SubvectorIterator& rhs )
const {
383 return pos_ - rhs.pos_;
392 inline IteratorType base()
const {
402 inline size_t offset() const noexcept {
417 using ConstIterator = SubvectorIterator< const VT, ConstIterator_<VT> >;
425 enum :
bool { smpAssignable = VT::smpAssignable };
431 template<
typename... RSAs >
432 explicit inline Subvector( VT& vector, RSAs... args );
444 inline Reference operator[](
size_t index );
445 inline ConstReference operator[](
size_t index )
const;
447 inline ConstReference at(
size_t index )
const;
449 inline ConstIterator
begin ()
const;
450 inline ConstIterator
cbegin()
const;
452 inline ConstIterator
end ()
const;
453 inline ConstIterator
cend ()
const;
460 inline Subvector& operator= ( initializer_list<ElementType> list );
461 inline Subvector& operator= (
const Subvector& rhs );
462 template<
typename VT2 >
inline Subvector& operator= (
const Vector<VT2,TF>& rhs );
463 template<
typename VT2 >
inline Subvector&
operator+=(
const Vector<VT2,TF>& rhs );
464 template<
typename VT2 >
inline Subvector&
operator-=(
const Vector<VT2,TF>& rhs );
465 template<
typename VT2 >
inline Subvector&
operator*=(
const Vector<VT2,TF>& rhs );
466 template<
typename VT2 >
inline Subvector&
operator/=(
const DenseVector<VT2,TF>& rhs );
467 template<
typename VT2 >
inline Subvector& operator%=(
const Vector<VT2,TF>& rhs );
474 using DataType::offset;
477 inline VT& operand() noexcept;
478 inline const VT& operand() const noexcept;
480 inline
size_t capacity() const noexcept;
483 inline
void reserve(
size_t n );
492 inline
void append(
size_t index, const
ElementType& value,
bool check=false );
499 inline
void erase(
size_t index );
503 template< typename Pred, typename =
DisableIf_< IsIntegral<Pred> > >
504 inline
void erase( Pred predicate );
506 template< typename Pred >
514 inline
Iterator find (
size_t index );
515 inline ConstIterator find (
size_t index ) const;
516 inline
Iterator lowerBound(
size_t index );
517 inline ConstIterator lowerBound(
size_t index ) const;
518 inline
Iterator upperBound(
size_t index );
519 inline ConstIterator upperBound(
size_t index ) const;
526 template< typename Other > inline Subvector& scale( const Other& scalar );
533 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
534 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
536 inline
bool canSMPAssign() const noexcept;
538 template< typename VT2 > inline
void assign ( const DenseVector <VT2,TF>& rhs );
539 template< typename VT2 > inline
void assign ( const SparseVector<VT2,TF>& rhs );
540 template< typename VT2 > inline
void addAssign( const DenseVector <VT2,TF>& rhs );
541 template< typename VT2 > inline
void addAssign( const SparseVector<VT2,TF>& rhs );
542 template< typename VT2 > inline
void subAssign( const DenseVector <VT2,TF>& rhs );
543 template< typename VT2 > inline
void subAssign( const SparseVector<VT2,TF>& rhs );
589 template< typename VT
593 template< typename... RSAs >
594 inline Subvector<VT,AF,TF,false,CSAs...>::Subvector( VT& vector, RSAs... args )
595 : DataType( args... )
598 if( !Contains< TypeList<RSAs...>,
Unchecked >::value ) {
599 if( offset() +
size() > vector.size() ) {
629 template<
typename VT
633 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Reference 634 Subvector<VT,AF,TF,false,CSAs...>::operator[](
size_t index )
637 return vector_[offset()+index];
653 template<
typename VT
658 Subvector<VT,AF,TF,false,CSAs...>::operator[](
size_t index )
const 661 return const_cast<const VT&
>( vector_ )[offset()+index];
678 template<
typename VT
682 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Reference 683 Subvector<VT,AF,TF,false,CSAs...>::at(
size_t index )
685 if( index >=
size() ) {
688 return (*
this)[index];
705 template<
typename VT
710 Subvector<VT,AF,TF,false,CSAs...>::at(
size_t index )
const 712 if( index >=
size() ) {
715 return (*
this)[index];
729 template<
typename VT
733 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 736 if( offset() == 0UL )
737 return Iterator( vector_.begin(), offset() );
739 return Iterator( vector_.lowerBound( offset() ), offset() );
753 template<
typename VT
760 if( offset() == 0UL )
763 return ConstIterator( vector_.lowerBound( offset() ), offset() );
777 template<
typename VT
784 if( offset() == 0UL )
787 return ConstIterator( vector_.lowerBound( offset() ), offset() );
801 template<
typename VT
805 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 808 if( offset() +
size() == vector_.size() )
809 return Iterator( vector_.end(), offset() );
811 return Iterator( vector_.lowerBound( offset() +
size() ), offset() );
825 template<
typename VT
832 if( offset() +
size() == vector_.size() )
849 template<
typename VT
856 if( offset() +
size() == vector_.size() )
888 template<
typename VT
892 inline Subvector<VT,AF,TF,
false,CSAs...>&
893 Subvector<VT,AF,TF,false,CSAs...>::operator=( initializer_list<ElementType> list )
897 if( list.size() >
size() ) {
901 const InitializerVector<ElementType,TF> tmp( list,
size() );
903 if( !tryAssign( vector_, tmp, offset() ) ) {
907 decltype(
auto) left( derestrict( *this ) );
932 template< typename VT
936 inline Subvector<VT,AF,TF,false,CSAs...>&
937 Subvector<VT,AF,TF,false,CSAs...>::operator=( const Subvector& rhs )
944 if(
this == &rhs || ( &vector_ == &rhs.vector_ && offset() == rhs.offset() ) )
947 if(
size() != rhs.size() ) {
951 if( !tryAssign( vector_, rhs, offset() ) ) {
955 decltype(
auto) left( derestrict( *this ) );
957 if( rhs.canAlias( &vector_ ) ) {
987 template<
typename VT
991 template<
typename VT2 >
992 inline Subvector<VT,AF,TF,
false,CSAs...>&
993 Subvector<VT,AF,TF,false,CSAs...>::operator=(
const Vector<VT2,TF>& rhs )
1004 using Right = If_< IsRestricted<VT>, CompositeType_<VT2>,
const VT2& >;
1005 Right right( ~rhs );
1007 if( !tryAssign( vector_, right, offset() ) ) {
1011 decltype(
auto) left( derestrict( *this ) );
1013 if( IsReference<Right>::value || right.canAlias( &vector_ ) ) {
1014 const ResultType_<VT2> tmp( right );
1016 assign( left, tmp );
1020 assign( left, right );
1043 template<
typename VT
1047 template<
typename VT2 >
1048 inline Subvector<VT,AF,TF,
false,CSAs...>&
1051 using blaze::assign;
1057 using AddType = AddTrait_< ResultType, ResultType_<VT2> >;
1066 const AddType tmp( *
this + (~rhs) );
1068 if( !tryAssign( vector_, tmp, offset() ) ) {
1072 decltype(
auto) left( derestrict( *this ) );
1075 assign( left, tmp );
1097 template< typename VT
1101 template< typename VT2 >
1102 inline Subvector<VT,AF,TF,false,CSAs...>&
1103 Subvector<VT,AF,TF,false,CSAs...>::operator-=( const Vector<VT2,TF>& rhs )
1105 using blaze::assign;
1111 using SubType = SubTrait_< ResultType, ResultType_<VT2> >;
1120 const SubType tmp( *
this - (~rhs) );
1122 if( !tryAssign( vector_, tmp, offset() ) ) {
1126 decltype(
auto) left( derestrict( *this ) );
1129 assign( left, tmp );
1152 template< typename VT
1156 template< typename VT2 >
1157 inline Subvector<VT,AF,TF,false,CSAs...>&
1158 Subvector<VT,AF,TF,false,CSAs...>::operator*=( const Vector<VT2,TF>& rhs )
1160 using blaze::assign;
1166 using MultType = MultTrait_< ResultType, ResultType_<VT2> >;
1175 const MultType tmp( *
this * (~rhs) );
1177 if( !tryAssign( vector_, tmp, offset() ) ) {
1181 decltype(
auto) left( derestrict( *this ) );
1184 assign( left, tmp );
1206 template< typename VT
1210 template< typename VT2 >
1211 inline Subvector<VT,AF,TF,false,CSAs...>&
1212 Subvector<VT,AF,TF,false,CSAs...>::operator/=( const DenseVector<VT2,TF>& rhs )
1214 using blaze::assign;
1221 using DivType = DivTrait_< ResultType, ResultType_<VT2> >;
1231 const DivType tmp( *
this / (~rhs) );
1233 if( !tryAssign( vector_, tmp, offset() ) ) {
1237 decltype(
auto) left( derestrict( *this ) );
1240 assign( left, tmp );
1263 template< typename VT
1267 template< typename VT2 >
1268 inline Subvector<VT,AF,TF,false,CSAs...>&
1269 Subvector<VT,AF,TF,false,CSAs...>::operator%=( const Vector<VT2,TF>& rhs )
1271 using blaze::assign;
1276 using CrossType = CrossTrait_< ResultType, ResultType_<VT2> >;
1282 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
1286 const CrossType tmp( *
this % (~rhs) );
1288 if( !tryAssign( vector_, tmp, offset() ) ) {
1292 decltype(
auto) left( derestrict( *this ) );
1295 assign( left, tmp );
1319 template< typename VT
1323 inline VT& Subvector<VT,AF,TF,false,CSAs...>::operand() noexcept
1337 template<
typename VT
1341 inline const VT& Subvector<VT,AF,TF,false,CSAs...>::operand() const noexcept
1355 template<
typename VT
1361 return nonZeros() + vector_.capacity() - vector_.nonZeros();
1375 template<
typename VT
1393 template<
typename VT
1399 vector_.erase( vector_.lowerBound( offset() ), vector_.lowerBound( offset() +
size() ) );
1415 template<
typename VT
1419 void Subvector<VT,AF,TF,false,CSAs...>::reserve(
size_t n )
1421 const size_t current(
capacity() );
1424 vector_.reserve( vector_.capacity() + n - current );
1451 template<
typename VT
1455 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1458 return Iterator( vector_.set( offset() + index, value ), offset() );
1477 template<
typename VT
1481 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1482 Subvector<VT,AF,TF,false,CSAs...>::insert(
size_t index,
const ElementType& value )
1484 return Iterator( vector_.insert( offset() + index, value ), offset() );
1515 template<
typename VT
1519 inline void Subvector<VT,AF,TF,false,CSAs...>::append(
size_t index,
const ElementType& value,
bool check )
1521 if( offset() +
size() == vector_.size() )
1522 vector_.append( offset() + index, value, check );
1523 else if( !check || !isDefault<strict>( value ) )
1524 vector_.insert( offset() + index, value );
1547 template<
typename VT
1551 inline void Subvector<VT,AF,TF,false,CSAs...>::erase(
size_t index )
1553 vector_.erase( offset() + index );
1568 template<
typename VT
1572 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1573 Subvector<VT,AF,TF,false,CSAs...>::erase(
Iterator pos )
1575 return Iterator( vector_.erase( pos.base() ), offset() );
1591 template<
typename VT
1595 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1598 return Iterator( vector_.erase( first.base(), last.base() ), offset() );
1627 template<
typename VT
1631 template<
typename Pred
1633 inline void Subvector<VT,AF,TF,false,CSAs...>::erase( Pred predicate )
1635 vector_.erase(
begin().base(),
end().base(), predicate );
1667 template<
typename VT
1671 template<
typename Pred >
1672 inline void Subvector<VT,AF,TF,false,CSAs...>::erase(
Iterator first,
Iterator last, Pred predicate )
1674 vector_.erase( first.base(), last.base(), predicate );
1702 template<
typename VT
1706 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1707 Subvector<VT,AF,TF,false,CSAs...>::find(
size_t index )
1709 const Iterator_<VT> pos( vector_.find( offset() + index ) );
1711 if( pos != vector_.end() )
1734 template<
typename VT
1739 Subvector<VT,AF,TF,false,CSAs...>::find(
size_t index )
const 1741 const ConstIterator_<VT> pos( vector_.find( offset() + index ) );
1743 if( pos != vector_.end() )
1765 template<
typename VT
1769 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1770 Subvector<VT,AF,TF,false,CSAs...>::lowerBound(
size_t index )
1772 return Iterator( vector_.lowerBound( offset() + index ), offset() );
1791 template<
typename VT
1796 Subvector<VT,AF,TF,false,CSAs...>::lowerBound(
size_t index )
const 1798 return ConstIterator( vector_.lowerBound( offset() + index ), offset() );
1817 template<
typename VT
1821 inline typename Subvector<VT,AF,TF,
false,CSAs...>
::Iterator 1822 Subvector<VT,AF,TF,false,CSAs...>::upperBound(
size_t index )
1824 return Iterator( vector_.upperBound( offset() + index ), offset() );
1843 template<
typename VT
1848 Subvector<VT,AF,TF,false,CSAs...>::upperBound(
size_t index )
const 1850 return ConstIterator( vector_.upperBound( offset() + index ), offset() );
1875 template<
typename VT
1879 template<
typename Other >
1880 inline Subvector<VT,AF,TF,
false,CSAs...>&
1881 Subvector<VT,AF,TF,false,CSAs...>::scale(
const Other& scalar )
1884 element->value() *= scalar;
1910 template<
typename VT
1914 template<
typename Other >
1915 inline bool Subvector<VT,AF,TF,false,CSAs...>::canAlias(
const Other* alias )
const noexcept
1917 return vector_.isAliased( alias );
1934 template<
typename VT
1938 template<
typename Other >
1939 inline bool Subvector<VT,AF,TF,false,CSAs...>::isAliased(
const Other* alias )
const noexcept
1941 return vector_.isAliased( alias );
1958 template<
typename VT
1962 inline bool Subvector<VT,AF,TF,false,CSAs...>::canSMPAssign() const noexcept
1982 template<
typename VT
1986 template<
typename VT2 >
1987 inline void Subvector<VT,AF,TF,false,CSAs...>::assign(
const DenseVector<VT2,TF>& rhs )
1992 reserve( (~rhs).
size() );
1994 for(
size_t i=0UL; i<
size(); ++i ) {
1995 append( i, (~rhs)[i],
true );
2014 template<
typename VT
2018 template<
typename VT2 >
2019 inline void Subvector<VT,AF,TF,false,CSAs...>::assign(
const SparseVector<VT2,TF>& rhs )
2026 for( ConstIterator_<VT2> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
2027 append( element->index(), element->value(), true );
2046 template<
typename VT
2050 template<
typename VT2 >
2051 inline void Subvector<VT,AF,TF,false,CSAs...>::addAssign(
const DenseVector<VT2,TF>& rhs )
2053 using AddType = AddTrait_< ResultType, ResultType_<VT2> >;
2061 const AddType tmp(
serial( *
this + (~rhs) ) );
2081 template<
typename VT
2085 template<
typename VT2 >
2086 inline void Subvector<VT,AF,TF,false,CSAs...>::addAssign(
const SparseVector<VT2,TF>& rhs )
2088 using AddType = AddTrait_< ResultType, ResultType_<VT2> >;
2096 const AddType tmp(
serial( *
this + (~rhs) ) );
2116 template<
typename VT
2120 template<
typename VT2 >
2121 inline void Subvector<VT,AF,TF,false,CSAs...>::subAssign(
const DenseVector<VT2,TF>& rhs )
2123 using SubType = SubTrait_< ResultType, ResultType_<VT2> >;
2131 const SubType tmp(
serial( *
this - (~rhs) ) );
2151 template<
typename VT
2155 template<
typename VT2 >
2156 inline void Subvector<VT,AF,TF,false,CSAs...>::subAssign(
const SparseVector<VT2,TF>& rhs )
2158 using SubType = SubTrait_< ResultType, ResultType_<VT2> >;
2166 const SubType tmp(
serial( *
this - (~rhs) ) );
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.Via these flags it is possible to specify subvec...
Definition: AlignmentFlag.h:62
#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
Constraint on the data type.
Header file for auxiliary alias declarations.
Header file for the blaze::checked and blaze::unchecked instances.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the alignment flag values.
Header file for the subtraction trait.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:522
Header file for basic type definitions.
Header file for the SparseVector base class.
Header file for the View base class.
Header file for the serial shim.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i...
Definition: Computation.h:81
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3076
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:364
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3074
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
Header file for the IsIntegral type trait.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:3078
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3083
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:560
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:733
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3084
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSEXPR_TYPE(T)
Constraint on the data type.In case the given data type T is a transposition expression (i...
Definition: TransExpr.h:81
Header file for the extended initializer_list functionality.
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:474
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:408
Constraint on the data type.
Header file for the DisableIf class template.
Header file for the multiplication trait.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:3082
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Header file for the implementation of a vector representation of an initializer list.
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3075
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3079
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the implementation of the Subvector base template.
Header file for the implementation of the SubvectorData class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3085
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:250
Header file for the subvector trait.
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional vector type...
Definition: SparseVector.h:61
Constraint on the data type.
Header file for the SparseElement base class.
Constraint on the data type.
Constraint on the data type.
Header file for the exception macros of the math module.
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:430
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:8893
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:290
Constraint on the data type.
Constraint on the data type.
typename SubvectorTrait< VT, CSAs... >::Type SubvectorTrait_
Auxiliary alias declaration for the SubvectorTrait type trait.The SubvectorTrait_ alias declaration p...
Definition: SubvectorTrait.h:145
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:76
Header file for the IsConst type trait.
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1357
Header file for run time assertion macros.
Header file for the relaxation flag types.
Header file for the addition trait.
Header file for the cross product trait.
Header file for the division trait.
Header file for the Unique class template.
Check< false > Unchecked
Type of the blaze::unchecked instance.blaze::Unchecked is the type of the blaze::unchecked instance...
Definition: Check.h:96
Header file for the isDefault shim.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:816
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
Header file for the IsReference type trait.
Header file for the RemoveReference type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3080
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SUBVECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is a subvector type (i.e. a dense or sparse subvector), a compilation error is created.
Definition: Subvector.h:81
EnableIf_< IsNumeric< ST >, MT &> operator/=(DenseMatrix< MT, SO > &mat, ST scalar)
Division assignment operator for the division of a dense matrix by a scalar value ( )...
Definition: DenseMatrix.h:655
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:3081
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1375
EnableIf_< IsNumeric< ST >, MT &> operator*=(DenseMatrix< MT, SO > &mat, ST scalar)
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( )...
Definition: DenseMatrix.h:593
Header file for the IsRestricted type trait.
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:63
#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 IsExpression type trait class.