35#ifndef _BLAZE_MATH_VIEWS_SUBVECTOR_SPARSE_H_
36#define _BLAZE_MATH_VIEWS_SUBVECTOR_SPARSE_H_
102class Subvector<VT,AF,TF,false,CSAs...>
103 :
public View< SparseVector< Subvector<VT,AF,TF,false,CSAs...>, TF > >
108 using DataType = SubvectorData<CSAs...>;
109 using Operand = If_t< IsExpression_v<VT>, VT, VT& >;
115 using This = Subvector<VT,AF,TF,
false,CSAs...>;
117 using BaseType = View< SparseVector<This,TF> >;
118 using ViewedType = VT;
120 using TransposeType = TransposeType_t<ResultType>;
121 using ElementType = ElementType_t<VT>;
122 using ReturnType = ReturnType_t<VT>;
123 using CompositeType =
const Subvector&;
126 using ConstReference = ConstReference_t<VT>;
129 using Reference = If_t< IsConst_v<VT>, ConstReference, Reference_t<VT> >;
135 template<
typename VectorType
136 ,
typename IteratorType >
137 class SubvectorElement
138 :
private SparseElement
147 inline SubvectorElement( IteratorType pos,
size_t offset )
159 template<
typename T >
inline SubvectorElement& operator=(
const T& v ) {
171 template<
typename T >
inline SubvectorElement&
operator+=(
const T& v ) {
183 template<
typename T >
inline SubvectorElement&
operator-=(
const T& v ) {
195 template<
typename T >
inline SubvectorElement&
operator*=(
const T& v ) {
207 template<
typename T >
inline SubvectorElement&
operator/=(
const T& v ) {
218 inline const SubvectorElement* operator->()
const {
228 inline decltype(
auto) value()
const {
229 return pos_->value();
238 inline size_t index()
const {
239 return pos_->index() - offset_;
254 template<
typename VectorType
255 ,
typename IteratorType >
256 class SubvectorIterator
260 using IteratorCategory = std::forward_iterator_tag;
261 using ValueType = SubvectorElement<VectorType,IteratorType>;
262 using PointerType = ValueType;
263 using ReferenceType = ValueType;
264 using DifferenceType = ptrdiff_t;
267 using iterator_category = IteratorCategory;
268 using value_type = ValueType;
269 using pointer = PointerType;
270 using reference = ReferenceType;
271 using difference_type = DifferenceType;
277 inline SubvectorIterator()
289 inline SubvectorIterator( IteratorType iterator,
size_t index )
300 template<
typename VectorType2,
typename IteratorType2 >
301 inline SubvectorIterator(
const SubvectorIterator<VectorType2,IteratorType2>& it )
303 , offset_( it.offset() )
312 inline SubvectorIterator& operator++() {
323 inline const SubvectorIterator operator++(
int ) {
324 const SubvectorIterator tmp( *
this );
336 return ReferenceType( pos_, offset_ );
345 inline PointerType operator->()
const {
346 return PointerType( pos_, offset_ );
356 template<
typename VectorType2,
typename IteratorType2 >
357 inline bool operator==(
const SubvectorIterator<VectorType2,IteratorType2>& rhs )
const {
358 return base() == rhs.base();
368 template<
typename VectorType2,
typename IteratorType2 >
369 inline bool operator!=(
const SubvectorIterator<VectorType2,IteratorType2>& rhs )
const {
370 return !( *
this == rhs );
380 inline DifferenceType
operator-(
const SubvectorIterator& rhs )
const {
381 return pos_ - rhs.pos_;
390 inline IteratorType base()
const {
400 inline size_t offset() const noexcept {
415 using ConstIterator = SubvectorIterator< const VT, ConstIterator_t<VT> >;
418 using Iterator = If_t< IsConst_v<VT>, ConstIterator, SubvectorIterator< VT, Iterator_t<VT> > >;
423 static constexpr bool smpAssignable = VT::smpAssignable;
426 static constexpr bool compileTimeArgs = DataType::compileTimeArgs;
432 template<
typename... RSAs >
433 explicit inline Subvector( VT& vector, RSAs... args );
435 Subvector(
const Subvector& ) =
default;
442 ~Subvector() =
default;
449 inline Reference operator[](
size_t index );
450 inline ConstReference operator[](
size_t index )
const;
451 inline Reference at(
size_t index );
452 inline ConstReference at(
size_t index )
const;
453 inline Iterator
begin ();
454 inline ConstIterator
begin ()
const;
455 inline ConstIterator
cbegin()
const;
456 inline Iterator
end ();
457 inline ConstIterator
end ()
const;
458 inline ConstIterator
cend ()
const;
465 inline Subvector& operator= ( initializer_list<ElementType> list );
466 inline Subvector& operator= (
const Subvector& rhs );
467 template<
typename VT2 >
inline Subvector& operator= (
const Vector<VT2,TF>& rhs );
468 template<
typename VT2 >
inline Subvector&
operator+=(
const Vector<VT2,TF>& rhs );
469 template<
typename VT2 >
inline Subvector&
operator-=(
const Vector<VT2,TF>& rhs );
470 template<
typename VT2 >
inline Subvector&
operator*=(
const Vector<VT2,TF>& rhs );
471 template<
typename VT2 >
inline Subvector&
operator/=(
const DenseVector<VT2,TF>& rhs );
472 template<
typename VT2 >
inline Subvector& operator%=(
const Vector<VT2,TF>& rhs );
479 using DataType::offset;
480 using DataType::size;
482 inline VT& operand() noexcept;
483 inline const VT& operand() const noexcept;
485 inline
size_t capacity() const noexcept;
486 inline
size_t nonZeros() const;
488 inline
void reserve(
size_t n );
495 inline Iterator set (
size_t index, const ElementType& value );
496 inline Iterator insert(
size_t index, const ElementType& value );
497 inline
void append(
size_t index, const ElementType& value,
bool check=false );
504 inline
void erase(
size_t index );
505 inline Iterator erase( Iterator pos );
506 inline Iterator erase( Iterator first, Iterator last );
508 template< typename Pred, typename = DisableIf_t< IsIntegral_v<Pred> > >
509 inline
void erase( Pred predicate );
511 template< typename Pred >
512 inline
void erase( Iterator first, Iterator last, Pred predicate );
519 inline Iterator find (
size_t index );
520 inline ConstIterator find (
size_t index ) const;
521 inline Iterator lowerBound(
size_t index );
522 inline ConstIterator lowerBound(
size_t index ) const;
523 inline Iterator upperBound(
size_t index );
524 inline ConstIterator upperBound(
size_t index ) const;
531 template< typename Other > inline Subvector& scale( const Other& scalar );
538 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
539 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
541 inline
bool canSMPAssign() const noexcept;
543 template< typename VT2 > inline
void assign ( const DenseVector <VT2,TF>& rhs );
544 template< typename VT2 > inline
void assign ( const SparseVector<VT2,TF>& rhs );
545 template< typename VT2 > inline
void addAssign( const DenseVector <VT2,TF>& rhs );
546 template< typename VT2 > inline
void addAssign( const SparseVector<VT2,TF>& rhs );
547 template< typename VT2 > inline
void subAssign( const DenseVector <VT2,TF>& rhs );
548 template< typename VT2 > inline
void subAssign( const SparseVector<VT2,TF>& rhs );
598template< typename... RSAs >
599inline Subvector<VT,AF,TF,false,CSAs...>::Subvector( VT& vector, RSAs... args )
600 : DataType( args... )
604 if( offset() + size() > vector.size() ) {
605 BLAZE_THROW_INVALID_ARGUMENT(
"Invalid subvector specification" );
638inline typename Subvector<VT,AF,TF,
false,CSAs...>::Reference
639 Subvector<VT,AF,TF,false,CSAs...>::operator[](
size_t index )
642 return vector_[offset()+index];
662inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstReference
663 Subvector<VT,AF,TF,false,CSAs...>::operator[](
size_t index )
const
666 return const_cast<const VT&
>( vector_ )[offset()+index];
687inline typename Subvector<VT,AF,TF,
false,CSAs...>::Reference
688 Subvector<VT,AF,TF,false,CSAs...>::at(
size_t index )
690 if( index >=
size() ) {
693 return (*
this)[index];
714inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstReference
715 Subvector<VT,AF,TF,false,CSAs...>::at(
size_t index )
const
717 if( index >=
size() ) {
720 return (*
this)[index];
738inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
739 Subvector<VT,AF,TF,false,CSAs...>::begin()
741 if( offset() == 0UL )
742 return Iterator( vector_.begin(), offset() );
744 return Iterator( vector_.lowerBound( offset() ), offset() );
762inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstIterator
763 Subvector<VT,AF,TF,false,CSAs...>::begin()
const
765 if( offset() == 0UL )
766 return ConstIterator( vector_.cbegin(), offset() );
768 return ConstIterator( vector_.lowerBound( offset() ), offset() );
786inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstIterator
787 Subvector<VT,AF,TF,false,CSAs...>::cbegin()
const
789 if( offset() == 0UL )
790 return ConstIterator( vector_.cbegin(), offset() );
792 return ConstIterator( vector_.lowerBound( offset() ), offset() );
810inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
811 Subvector<VT,AF,TF,false,CSAs...>::end()
813 if( offset() +
size() == vector_.size() )
814 return Iterator( vector_.end(), offset() );
816 return Iterator( vector_.lowerBound( offset() +
size() ), offset() );
834inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstIterator
835 Subvector<VT,AF,TF,false,CSAs...>::end()
const
837 if( offset() +
size() == vector_.size() )
838 return ConstIterator( vector_.cend(), offset() );
840 return ConstIterator( vector_.lowerBound( offset() +
size() ), offset() );
858inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstIterator
859 Subvector<VT,AF,TF,false,CSAs...>::cend()
const
861 if( offset() +
size() == vector_.size() )
862 return ConstIterator( vector_.cend(), offset() );
864 return ConstIterator( vector_.lowerBound( offset() +
size() ), offset() );
897inline Subvector<VT,AF,TF,
false,CSAs...>&
898 Subvector<VT,AF,TF,false,CSAs...>::operator=( initializer_list<ElementType> list )
902 if( list.size() >
size() ) {
908 if( !tryAssign( vector_, tmp, offset() ) ) {
912 decltype(
auto) left( derestrict( *
this ) );
941inline Subvector<VT,AF,TF,
false,CSAs...>&
942 Subvector<VT,AF,TF,false,CSAs...>::operator=(
const Subvector& rhs )
949 if(
this == &rhs || ( &vector_ == &rhs.vector_ && offset() == rhs.offset() ) )
952 if(
size() != rhs.size() ) {
956 if( !tryAssign( vector_, rhs, offset() ) ) {
960 decltype(
auto) left( derestrict( *
this ) );
962 if( rhs.canAlias(
this ) ) {
963 const ResultType tmp( rhs );
996template<
typename VT2 >
997inline Subvector<VT,AF,TF,
false,CSAs...>&
998 Subvector<VT,AF,TF,false,CSAs...>::operator=(
const Vector<VT2,TF>& rhs )
1000 using blaze::assign;
1005 if(
size() != (*rhs).size() ) {
1010 Right right( *rhs );
1012 if( !tryAssign( vector_, right, offset() ) ) {
1016 decltype(
auto) left( derestrict( *
this ) );
1021 assign( left, tmp );
1025 assign( left, right );
1048template<
typename VT
1052template<
typename VT2 >
1053inline Subvector<VT,AF,TF,
false,CSAs...>&
1054 Subvector<VT,AF,TF,false,CSAs...>::operator+=(
const Vector<VT2,TF>& rhs )
1056 using blaze::assign;
1067 if(
size() != (*rhs).size() ) {
1071 const AddType tmp( *
this + (*rhs) );
1073 if( !tryAssign( vector_, tmp, offset() ) ) {
1077 decltype(
auto) left( derestrict( *
this ) );
1080 assign( left, tmp );
1102template<
typename VT
1106template<
typename VT2 >
1107inline Subvector<VT,AF,TF,
false,CSAs...>&
1108 Subvector<VT,AF,TF,false,CSAs...>::operator-=(
const Vector<VT2,TF>& rhs )
1110 using blaze::assign;
1121 if(
size() != (*rhs).size() ) {
1125 const SubType tmp( *
this - (*rhs) );
1127 if( !tryAssign( vector_, tmp, offset() ) ) {
1131 decltype(
auto) left( derestrict( *
this ) );
1134 assign( left, tmp );
1157template<
typename VT
1161template<
typename VT2 >
1162inline Subvector<VT,AF,TF,
false,CSAs...>&
1163 Subvector<VT,AF,TF,false,CSAs...>::operator*=(
const Vector<VT2,TF>& rhs )
1165 using blaze::assign;
1176 if(
size() != (*rhs).size() ) {
1180 const MultType tmp( *
this * (*rhs) );
1182 if( !tryAssign( vector_, tmp, offset() ) ) {
1186 decltype(
auto) left( derestrict( *
this ) );
1189 assign( left, tmp );
1211template<
typename VT
1215template<
typename VT2 >
1216inline Subvector<VT,AF,TF,
false,CSAs...>&
1219 using blaze::assign;
1232 if(
size() != (*rhs).size() ) {
1236 const DivType tmp( *
this / (*rhs) );
1238 if( !tryAssign( vector_, tmp, offset() ) ) {
1242 decltype(
auto) left( derestrict( *
this ) );
1245 assign( left, tmp );
1268template<
typename VT
1272template<
typename VT2 >
1273inline Subvector<VT,AF,TF,
false,CSAs...>&
1274 Subvector<VT,AF,TF,false,CSAs...>::operator%=(
const Vector<VT2,TF>& rhs )
1276 using blaze::assign;
1287 if(
size() != 3UL || (*rhs).size() != 3UL ) {
1291 const CrossType tmp( *
this % (*rhs) );
1293 if( !tryAssign( vector_, tmp, offset() ) ) {
1297 decltype(
auto) left( derestrict( *
this ) );
1300 assign( left, tmp );
1324template<
typename VT
1328inline VT& Subvector<VT,AF,TF,false,CSAs...>::operand() noexcept
1342template<
typename VT
1346inline const VT& Subvector<VT,AF,TF,false,CSAs...>::operand() const noexcept
1360template<
typename VT
1364inline size_t Subvector<VT,AF,TF,false,CSAs...>::capacity() const noexcept
1366 return nonZeros() + vector_.capacity() - vector_.nonZeros();
1380template<
typename VT
1384inline size_t Subvector<VT,AF,TF,false,CSAs...>::nonZeros()
const
1398template<
typename VT
1402inline void Subvector<VT,AF,TF,false,CSAs...>::reset()
1404 vector_.erase( vector_.lowerBound( offset() ), vector_.lowerBound( offset() +
size() ) );
1420template<
typename VT
1424void Subvector<VT,AF,TF,false,CSAs...>::reserve(
size_t n )
1426 const size_t current(
capacity() );
1429 vector_.reserve( vector_.capacity() + n - current );
1456template<
typename VT
1460inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
1461 Subvector<VT,AF,TF,false,CSAs...>::set(
size_t index,
const ElementType& value )
1463 return Iterator( vector_.set( offset() + index, value ), offset() );
1482template<
typename VT
1486inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
1487 Subvector<VT,AF,TF,false,CSAs...>::insert(
size_t index,
const ElementType& value )
1489 return Iterator( vector_.insert( offset() + index, value ), offset() );
1520template<
typename VT
1524inline void Subvector<VT,AF,TF,false,CSAs...>::append(
size_t index,
const ElementType& value,
bool check )
1526 if( offset() +
size() == vector_.size() )
1527 vector_.append( offset() + index, value, check );
1529 vector_.insert( offset() + index, value );
1552template<
typename VT
1556inline void Subvector<VT,AF,TF,false,CSAs...>::erase(
size_t index )
1558 vector_.erase( offset() + index );
1573template<
typename VT
1577inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
1578 Subvector<VT,AF,TF,false,CSAs...>::erase( Iterator pos )
1580 return Iterator( vector_.erase( pos.base() ), offset() );
1596template<
typename VT
1600inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
1601 Subvector<VT,AF,TF,false,CSAs...>::erase( Iterator first, Iterator last )
1603 return Iterator( vector_.erase( first.base(), last.base() ), offset() );
1632template<
typename VT
1636template<
typename Pred
1638inline void Subvector<VT,AF,TF,false,CSAs...>::erase( Pred predicate )
1640 vector_.erase(
begin().base(),
end().base(), predicate );
1672template<
typename VT
1676template<
typename Pred >
1677inline void Subvector<VT,AF,TF,false,CSAs...>::erase( Iterator first, Iterator last, Pred predicate )
1679 vector_.erase( first.base(), last.base(), predicate );
1707template<
typename VT
1711inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
1712 Subvector<VT,AF,TF,false,CSAs...>::find(
size_t index )
1716 if( pos != vector_.end() )
1717 return Iterator( pos, offset() );
1739template<
typename VT
1743inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstIterator
1744 Subvector<VT,AF,TF,false,CSAs...>::find(
size_t index )
const
1748 if( pos != vector_.end() )
1749 return Iterator( pos, offset() );
1770template<
typename VT
1774inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
1775 Subvector<VT,AF,TF,false,CSAs...>::lowerBound(
size_t index )
1777 return Iterator( vector_.lowerBound( offset() + index ), offset() );
1796template<
typename VT
1800inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstIterator
1801 Subvector<VT,AF,TF,false,CSAs...>::lowerBound(
size_t index )
const
1803 return ConstIterator( vector_.lowerBound( offset() + index ), offset() );
1822template<
typename VT
1826inline typename Subvector<VT,AF,TF,
false,CSAs...>::Iterator
1827 Subvector<VT,AF,TF,false,CSAs...>::upperBound(
size_t index )
1829 return Iterator( vector_.upperBound( offset() + index ), offset() );
1848template<
typename VT
1852inline typename Subvector<VT,AF,TF,
false,CSAs...>::ConstIterator
1853 Subvector<VT,AF,TF,false,CSAs...>::upperBound(
size_t index )
const
1855 return ConstIterator( vector_.upperBound( offset() + index ), offset() );
1880template<
typename VT
1884template<
typename Other >
1885inline Subvector<VT,AF,TF,
false,CSAs...>&
1886 Subvector<VT,AF,TF,false,CSAs...>::scale(
const Other& scalar )
1888 for( Iterator element=
begin(); element!=
end(); ++element )
1889 element->value() *= scalar;
1915template<
typename VT
1919template<
typename Other >
1920inline bool Subvector<VT,AF,TF,false,CSAs...>::canAlias(
const Other* alias )
const noexcept
1922 return vector_.isAliased( &unview( *alias ) );
1939template<
typename VT
1943template<
typename Other >
1944inline bool Subvector<VT,AF,TF,false,CSAs...>::isAliased(
const Other* alias )
const noexcept
1946 return vector_.isAliased( &unview( *alias ) );
1963template<
typename VT
1967inline bool Subvector<VT,AF,TF,false,CSAs...>::canSMPAssign() const noexcept
1987template<
typename VT
1991template<
typename VT2 >
1997 reserve( (*rhs).size() );
1999 for(
size_t i=0UL; i<
size(); ++i ) {
2000 append( i, (*rhs)[i],
true );
2019template<
typename VT
2023template<
typename VT2 >
2029 reserve( (*rhs).nonZeros() );
2032 append( element->index(), element->value(),
true );
2051template<
typename VT
2055template<
typename VT2 >
2066 const AddType tmp(
serial( *
this + (*rhs) ) );
2086template<
typename VT
2090template<
typename VT2 >
2101 const AddType tmp(
serial( *
this + (*rhs) ) );
2121template<
typename VT
2125template<
typename VT2 >
2136 const SubType tmp(
serial( *
this - (*rhs) ) );
2156template<
typename VT
2160template<
typename VT2 >
2171 const SubType tmp(
serial( *
this - (*rhs) ) );
Header file for the addition trait.
Header file for auxiliary alias declarations.
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.
Definition Aliases.h:130
typename T::Iterator Iterator_t
Alias declaration for nested Iterator type definitions.
Definition Aliases.h:210
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition Aliases.h:110
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition Aliases.h:450
Header file for the alignment flag enumeration.
Header file for run time assertion macros.
Header file for the blaze::checked and blaze::unchecked instances.
Header file for the cross product trait.
constexpr 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:751
Header file for the division trait.
Header file for the EnableIf class template.
Header file for the If class template.
Header file for the IsConst type trait.
Header file for the isDefault shim.
Header file for the IsExpression type trait class.
Header file for the IsIntegral type trait.
Header file for the IsReference type trait.
Header file for the IsRestricted type trait.
Deactivation of problematic macros.
Header file for the multiplication trait.
Header file for the subtraction trait.
Header file for the implementation of the SubvectorData class template.
Header file for the subvector trait.
Base class for N-dimensional dense vectors.
Definition DenseVector.h:77
Dense vector representation of an initializer list.
Definition InitializerVector.h:182
Base class for sparse vectors.
Definition SparseVector.h:72
Auxiliary class template for the data members of the Subvector class.
Definition SubvectorData.h:65
Base class for N-dimensional vectors.
Definition Vector.h:82
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of a vector representation of an initializer list.
Header file for the SparseVector base class.
Header file for the View base class.
auto operator/=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Division assignment operator for the division of a dense matrix by a scalar value ( ).
Definition DenseMatrix.h:574
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition DenseMatrix.h:386
auto operator*=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( ).
Definition DenseMatrix.h:510
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition DMatSerialExpr.h:812
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:9640
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition DenseMatrix.h:448
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition DiagonalMatrix.h:207
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSEXPR_TYPE(T)
Constraint on the data type.
Definition TransExpr.h:81
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.
Definition TransposeFlag.h:63
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.
Definition Computation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition SparseVector.h:61
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition DenseVector.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SUBVECTOR_TYPE(T)
Constraint on the data type.
Definition Subvector.h:81
typename CrossTrait< T1, T2 >::Type CrossTrait_t
Auxiliary alias declaration for the CrossTrait class template.
Definition CrossTrait.h:138
typename SubvectorTrait< VT, CSAs... >::Type SubvectorTrait_t
Auxiliary alias declaration for the SubvectorTrait type trait.
Definition SubvectorTrait.h:145
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.
Definition SubTrait.h:163
typename AddTrait< T1, T2 >::Type AddTrait_t
Auxiliary alias declaration for the AddTrait class template.
Definition AddTrait.h:163
typename DivTrait< T1, T2 >::Type DivTrait_t
Auxiliary alias declaration for the DivTrait class template.
Definition DivTrait.h:164
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition MultTrait.h:165
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:253
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.
Definition AlignmentFlag.h:63
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:293
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
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
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
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition Assert.h:117
constexpr bool IsReference_v
Auxiliary variable template for the IsReference type trait.
Definition IsReference.h:95
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition If.h:108
constexpr bool isChecked(const Ts &... args)
Extracting blaze::Check arguments from a given list of arguments.
Definition Check.h:225
Header file for the exception macros of the math module.
Header file for the extended initializer_list functionality.
Constraint on the data type.
Header file for the serial shim.
Header file for the SparseElement base class.
Base class for all views.
Definition View.h:67
Header file for basic type definitions.
Header file for the implementation of the Subvector base template.