35 #ifndef _BLAZE_MATH_VIEWS_ROW_SPARSE_H_ 36 #define _BLAZE_MATH_VIEWS_ROW_SPARSE_H_ 114 template<
typename MT
117 class Row<MT,true,false,SF,CRAs...>
118 :
public View< SparseVector< Row<MT,true,false,SF,CRAs...>, true > >
119 ,
private RowData<CRAs...>
123 using DataType = RowData<CRAs...>;
124 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
130 using This = Row<MT,
true,
false,SF,CRAs...>;
132 using BaseType = SparseVector<This,true>;
133 using ViewedType = MT;
135 using TransposeType = TransposeType_t<ResultType>;
136 using ElementType = ElementType_t<MT>;
137 using ReturnType = ReturnType_t<MT>;
138 using CompositeType =
const Row&;
141 using ConstReference = ConstReference_t<MT>;
144 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
147 using ConstIterator = ConstIterator_t<MT>;
150 using Iterator = If_t< IsConst_v<MT>, ConstIterator, Iterator_t<MT> >;
155 static constexpr
bool smpAssignable =
false;
158 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
164 template<
typename... RRAs >
165 explicit inline Row( MT& matrix, RRAs... args );
167 Row(
const Row& ) =
default;
181 inline Reference operator[](
size_t index );
182 inline ConstReference operator[](
size_t index )
const;
183 inline Reference at(
size_t index );
184 inline ConstReference at(
size_t index )
const;
185 inline Iterator
begin ();
186 inline ConstIterator
begin ()
const;
187 inline ConstIterator
cbegin()
const;
188 inline Iterator
end ();
189 inline ConstIterator
end ()
const;
190 inline ConstIterator
cend ()
const;
197 inline Row& operator=( initializer_list<ElementType> list );
198 inline Row& operator=(
const Row& rhs );
200 template<
typename VT >
inline Row& operator= (
const DenseVector<VT,true>& rhs );
201 template<
typename VT >
inline Row& operator= (
const SparseVector<VT,true>& rhs );
202 template<
typename VT >
inline Row&
operator+=(
const DenseVector<VT,true>& rhs );
203 template<
typename VT >
inline Row&
operator+=(
const SparseVector<VT,true>& rhs );
204 template<
typename VT >
inline Row&
operator-=(
const DenseVector<VT,true>& rhs );
205 template<
typename VT >
inline Row&
operator-=(
const SparseVector<VT,true>& rhs );
206 template<
typename VT >
inline Row&
operator*=(
const Vector<VT,true>& rhs );
207 template<
typename VT >
inline Row&
operator/=(
const DenseVector<VT,true>& rhs );
208 template<
typename VT >
inline Row& operator%=(
const Vector<VT,true>& rhs );
217 inline MT& operand() noexcept;
218 inline const MT& operand() const noexcept;
220 inline
size_t size() const noexcept;
221 inline
size_t capacity() const noexcept;
224 inline
void reserve(
size_t n );
231 inline Iterator
set (
size_t index, const ElementType& value );
232 inline Iterator insert(
size_t index, const ElementType& value );
233 inline
void append(
size_t index, const ElementType& value,
bool check=false );
240 inline
void erase(
size_t index );
241 inline Iterator erase( Iterator pos );
242 inline Iterator erase( Iterator first, Iterator last );
245 inline
void erase( Pred predicate );
247 template< typename Pred >
248 inline
void erase( Iterator first, Iterator last, Pred predicate );
255 inline Iterator find (
size_t index );
256 inline ConstIterator find (
size_t index ) const;
257 inline Iterator lowerBound(
size_t index );
258 inline ConstIterator lowerBound(
size_t index ) const;
259 inline Iterator upperBound(
size_t index );
260 inline ConstIterator upperBound(
size_t index ) const;
267 template< typename Other > inline Row& scale( const Other& scalar );
274 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
275 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
277 template< typename VT > inline
void assign ( const DenseVector <VT,true>& rhs );
278 template< typename VT > inline
void assign ( const SparseVector<VT,true>& rhs );
279 template< typename VT > inline
void addAssign( const DenseVector <VT,true>& rhs );
280 template< typename VT > inline
void addAssign( const SparseVector<VT,true>& rhs );
281 template< typename VT > inline
void subAssign( const DenseVector <VT,true>& rhs );
282 template< typename VT > inline
void subAssign( const SparseVector<VT,true>& rhs );
290 inline
size_t extendCapacity() const noexcept;
336 template< typename MT
339 template< typename... RRAs >
340 inline Row<MT,true,false,SF,CRAs...>::Row( MT& matrix, RRAs... args )
341 : DataType( args... )
345 if( matrix_.rows() <=
row() ) {
375 template<
typename MT
378 inline typename Row<MT,
true,
false,SF,CRAs...>::Reference
379 Row<MT,true,false,SF,CRAs...>::operator[](
size_t index )
382 return matrix_(
row(),index);
398 template<
typename MT
401 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstReference
402 Row<MT,true,false,SF,CRAs...>::operator[](
size_t index )
const 405 return const_cast<const MT&>( matrix_ )(
row(),index);
422 template<
typename MT
425 inline typename Row<MT,
true,
false,SF,CRAs...>::Reference
426 Row<MT,true,false,SF,CRAs...>::at(
size_t index )
428 if( index >=
size() ) {
431 return (*
this)[index];
448 template<
typename MT
451 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstReference
452 Row<MT,true,false,SF,CRAs...>::at(
size_t index )
const 454 if( index >=
size() ) {
457 return (*
this)[index];
471 template<
typename MT
474 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
477 return matrix_.begin(
row() );
491 template<
typename MT
494 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstIterator
497 return matrix_.cbegin(
row() );
511 template<
typename MT
514 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstIterator
517 return matrix_.cbegin(
row() );
531 template<
typename MT
534 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
537 return matrix_.end(
row() );
551 template<
typename MT
554 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstIterator
557 return matrix_.cend(
row() );
571 template<
typename MT
574 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstIterator
577 return matrix_.cend(
row() );
606 template<
typename MT
609 inline Row<MT,
true,
false,SF,CRAs...>&
610 Row<MT,true,false,SF,CRAs...>::operator=( initializer_list<ElementType> list )
614 if( list.size() >
size() ) {
618 const InitializerVector<ElementType,true> tmp( list,
size() );
620 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
624 decltype(
auto) left( derestrict( *this ) );
651 template< typename MT
654 inline Row<MT,true,false,SF,CRAs...>&
655 Row<MT,true,false,SF,CRAs...>::operator=( const Row& rhs )
663 if(
this == &rhs || ( &matrix_ == &rhs.matrix_ &&
row() == rhs.row() ) )
666 if(
size() != rhs.size() ) {
670 if( !tryAssign( matrix_, rhs,
row(), 0UL ) ) {
674 decltype(
auto) left( derestrict( *this ) );
676 if( rhs.canAlias( &matrix_ ) ) {
677 const ResultType tmp( rhs );
679 left.reserve( tmp.nonZeros() );
684 left.reserve( rhs.nonZeros() );
710 template<
typename MT
713 template<
typename VT >
714 inline Row<MT,
true,
false,SF,CRAs...>&
715 Row<MT,true,false,SF,CRAs...>::operator=(
const DenseVector<VT,true>& rhs )
727 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
730 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
734 decltype(
auto) left( derestrict( *this ) );
737 const ResultType_t<VT> tmp( right );
743 assign( left, right );
768 template<
typename MT
771 template<
typename VT >
772 inline Row<MT,
true,
false,SF,CRAs...>&
773 Row<MT,true,false,SF,CRAs...>::operator=(
const SparseVector<VT,true>& rhs )
785 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
788 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
792 decltype(
auto) left( derestrict( *this ) );
795 const ResultType_t<VT> tmp( right );
797 left.reserve( tmp.nonZeros() );
802 left.reserve( right.nonZeros() );
803 assign( left, right );
828 template<
typename MT
831 template<
typename VT >
832 inline Row<MT,
true,
false,SF,CRAs...>&
844 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
854 const AddType tmp( *
this + (~rhs) );
856 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
860 decltype(
auto) left( derestrict( *this ) );
887 template< typename MT
890 template< typename VT >
891 inline Row<MT,true,false,SF,CRAs...>&
892 Row<MT,true,false,SF,CRAs...>::operator+=( const SparseVector<VT,true>& rhs )
903 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
913 const AddType tmp( *
this + (~rhs) );
915 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
919 decltype(
auto) left( derestrict( *this ) );
948 template< typename MT
951 template< typename VT >
952 inline Row<MT,true,false,SF,CRAs...>&
953 Row<MT,true,false,SF,CRAs...>::operator-=( const DenseVector<VT,true>& rhs )
964 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
974 const SubType tmp( *
this - (~rhs) );
976 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
980 decltype(
auto) left( derestrict( *this ) );
1008 template< typename MT
1011 template< typename VT >
1012 inline Row<MT,true,false,SF,CRAs...>&
1013 Row<MT,true,false,SF,CRAs...>::operator-=( const SparseVector<VT,true>& rhs )
1015 using blaze::assign;
1024 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
1034 const SubType tmp( *
this - (~rhs) );
1036 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
1040 decltype(
auto) left( derestrict( *this ) );
1044 assign( left, tmp );
1067 template< typename MT
1070 template< typename VT >
1071 inline Row<MT,true,false,SF,CRAs...>&
1072 Row<MT,true,false,SF,CRAs...>::operator*=( const Vector<VT,true>& rhs )
1074 using blaze::assign;
1082 using MultType = MultTrait_t< ResultType, ResultType_t<VT> >;
1091 const MultType tmp( *
this * (~rhs) );
1093 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
1097 decltype(
auto) left( derestrict( *this ) );
1100 assign( left, tmp );
1122 template< typename MT
1125 template< typename VT >
1126 inline Row<MT,true,false,SF,CRAs...>&
1127 Row<MT,true,false,SF,CRAs...>::operator/=( const DenseVector<VT,true>& rhs )
1129 using blaze::assign;
1138 using DivType = DivTrait_t< ResultType, ResultType_t<VT> >;
1148 const DivType tmp( *
this / (~rhs) );
1150 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
1154 decltype(
auto) left( derestrict( *this ) );
1157 assign( left, tmp );
1180 template< typename MT
1183 template< typename VT >
1184 inline Row<MT,true,false,SF,CRAs...>&
1185 Row<MT,true,false,SF,CRAs...>::operator%=( const Vector<VT,true>& rhs )
1187 using blaze::assign;
1192 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
1198 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
1202 const CrossType tmp( *
this % (~rhs) );
1204 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
1208 decltype(
auto) left( derestrict( *this ) );
1211 assign( left, tmp );
1235 template< typename MT
1238 inline MT& Row<MT,true,false,SF,CRAs...>::operand() noexcept
1252 template<
typename MT
1255 inline const MT& Row<MT,true,false,SF,CRAs...>::operand() const noexcept
1269 template<
typename MT
1274 return matrix_.columns();
1286 template<
typename MT
1291 return matrix_.capacity(
row() );
1306 template<
typename MT
1311 return matrix_.nonZeros(
row() );
1323 template<
typename MT
1328 matrix_.reset(
row() );
1344 template<
typename MT
1347 void Row<MT,true,false,SF,CRAs...>::reserve(
size_t n )
1349 matrix_.reserve(
row(), n );
1364 template<
typename MT
1367 inline size_t Row<MT,true,false,SF,CRAs...>::extendCapacity() const noexcept
1372 size_t nonzeros( 2UL*
capacity()+1UL );
1373 nonzeros =
max( nonzeros, 7UL );
1374 nonzeros =
min( nonzeros,
size() );
1404 template<
typename MT
1407 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
1410 return matrix_.set(
row(), index, value );
1429 template<
typename MT
1432 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
1433 Row<MT,true,false,SF,CRAs...>::insert(
size_t index,
const ElementType& value )
1435 return matrix_.insert(
row(), index, value );
1466 template<
typename MT
1469 inline void Row<MT,true,false,SF,CRAs...>::append(
size_t index,
const ElementType& value,
bool check )
1471 matrix_.append(
row(), index, value, check );
1494 template<
typename MT
1497 inline void Row<MT,true,false,SF,CRAs...>::erase(
size_t index )
1499 matrix_.erase(
row(), index );
1514 template<
typename MT
1517 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
1518 Row<MT,true,false,SF,CRAs...>::erase( Iterator pos )
1520 return matrix_.erase(
row(), pos );
1536 template<
typename MT
1539 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
1540 Row<MT,true,false,SF,CRAs...>::erase( Iterator first, Iterator last )
1542 return matrix_.erase(
row(), first, last );
1571 template<
typename MT
1574 template<
typename Pred
1576 inline void Row<MT,true,false,SF,CRAs...>::erase( Pred predicate )
1578 matrix_.erase(
row(),
begin(),
end(), predicate );
1609 template<
typename MT
1612 template<
typename Pred >
1613 inline void Row<MT,true,false,SF,CRAs...>::erase( Iterator first, Iterator last, Pred predicate )
1615 matrix_.erase(
row(), first, last, predicate );
1643 template<
typename MT
1646 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
1647 Row<MT,true,false,SF,CRAs...>::find(
size_t index )
1649 return matrix_.find(
row(), index );
1669 template<
typename MT
1672 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstIterator
1673 Row<MT,true,false,SF,CRAs...>::find(
size_t index )
const 1675 return matrix_.find(
row(), index );
1694 template<
typename MT
1697 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
1698 Row<MT,true,false,SF,CRAs...>::lowerBound(
size_t index )
1700 return matrix_.lowerBound(
row(), index );
1719 template<
typename MT
1722 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstIterator
1723 Row<MT,true,false,SF,CRAs...>::lowerBound(
size_t index )
const 1725 return matrix_.lowerBound(
row(), index );
1744 template<
typename MT
1747 inline typename Row<MT,
true,
false,SF,CRAs...>::Iterator
1748 Row<MT,true,false,SF,CRAs...>::upperBound(
size_t index )
1750 return matrix_.upperBound(
row(), index );
1769 template<
typename MT
1772 inline typename Row<MT,
true,
false,SF,CRAs...>::ConstIterator
1773 Row<MT,true,false,SF,CRAs...>::upperBound(
size_t index )
const 1775 return matrix_.upperBound(
row(), index );
1802 template<
typename MT
1805 template<
typename Other >
1806 inline Row<MT,
true,
false,SF,CRAs...>&
1807 Row<MT,true,false,SF,CRAs...>::scale(
const Other& scalar )
1811 for( Iterator element=
begin(); element!=
end(); ++element )
1812 element->value() *= scalar;
1838 template<
typename MT
1841 template<
typename Other >
1842 inline bool Row<MT,true,false,SF,CRAs...>::canAlias(
const Other* alias )
const noexcept
1844 return matrix_.isAliased( alias );
1861 template<
typename MT
1864 template<
typename Other >
1865 inline bool Row<MT,true,false,SF,CRAs...>::isAliased(
const Other* alias )
const noexcept
1867 return matrix_.isAliased( alias );
1885 template<
typename MT
1888 template<
typename VT >
1889 inline void Row<MT,true,false,SF,CRAs...>::assign(
const DenseVector<VT,true>& rhs )
1894 for(
size_t j=0UL; j<
size(); ++j )
1896 if( matrix_.nonZeros(
row() ) == matrix_.capacity(
row() ) )
1897 matrix_.reserve(
row(), extendCapacity() );
1899 matrix_.append(
row(), j, (~rhs)[j],
true );
1918 template<
typename MT
1921 template<
typename VT >
1922 inline void Row<MT,true,false,SF,CRAs...>::assign(
const SparseVector<VT,true>& rhs )
1927 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
1928 matrix_.append(
row(), element->index(), element->value(), true );
1947 template<
typename MT
1950 template<
typename VT >
1951 inline void Row<MT,true,false,SF,CRAs...>::addAssign(
const DenseVector<VT,true>& rhs )
1953 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
1961 const AddType tmp(
serial( *
this + (~rhs) ) );
1962 matrix_.reset(
row() );
1981 template<
typename MT
1984 template<
typename VT >
1985 inline void Row<MT,true,false,SF,CRAs...>::addAssign(
const SparseVector<VT,true>& rhs )
1987 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
1995 const AddType tmp(
serial( *
this + (~rhs) ) );
1996 matrix_.reset(
row() );
1997 matrix_.reserve(
row(), tmp.nonZeros() );
2016 template<
typename MT
2019 template<
typename VT >
2020 inline void Row<MT,true,false,SF,CRAs...>::subAssign(
const DenseVector<VT,true>& rhs )
2022 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
2030 const SubType tmp(
serial( *
this - (~rhs) ) );
2031 matrix_.reset(
row() );
2050 template<
typename MT
2053 template<
typename VT >
2054 inline void Row<MT,true,false,SF,CRAs...>::subAssign(
const SparseVector<VT,true>& rhs )
2056 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
2064 const SubType tmp(
serial( *
this - (~rhs) ) );
2065 matrix_.reset(
row() );
2066 matrix_.reserve(
row(), tmp.nonZeros() );
2093 template<
typename MT
2095 class Row<MT,false,false,false,CRAs...>
2096 :
public View< SparseVector< Row<MT,false,false,false,CRAs...>, true > >
2097 ,
private RowData<CRAs...>
2101 using DataType = RowData<CRAs...>;
2102 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
2108 using This = Row<MT,
false,
false,
false,CRAs...>;
2110 using BaseType = SparseVector<This,true>;
2111 using ViewedType = MT;
2113 using TransposeType = TransposeType_t<ResultType>;
2114 using ElementType = ElementType_t<MT>;
2115 using ReturnType = ReturnType_t<MT>;
2116 using CompositeType =
const Row&;
2119 using ConstReference = ConstReference_t<MT>;
2122 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
2128 template<
typename MatrixType
2129 ,
typename IteratorType >
2131 :
private SparseElement
2140 inline RowElement( IteratorType pos,
size_t column )
2152 template<
typename T >
inline RowElement& operator=(
const T& v ) {
2164 template<
typename T >
inline RowElement&
operator+=(
const T& v ) {
2176 template<
typename T >
inline RowElement&
operator-=(
const T& v ) {
2188 template<
typename T >
inline RowElement&
operator*=(
const T& v ) {
2200 template<
typename T >
inline RowElement&
operator/=(
const T& v ) {
2211 inline const RowElement* operator->()
const {
2221 inline decltype(
auto) value()
const {
2222 return pos_->value();
2231 inline size_t index()
const {
2247 template<
typename MatrixType
2248 ,
typename IteratorType >
2253 using IteratorCategory = std::forward_iterator_tag;
2254 using ValueType = RowElement<MatrixType,IteratorType>;
2255 using PointerType = ValueType;
2256 using ReferenceType = ValueType;
2257 using DifferenceType = ptrdiff_t;
2260 using iterator_category = IteratorCategory;
2261 using value_type = ValueType;
2262 using pointer = PointerType;
2263 using reference = ReferenceType;
2264 using difference_type = DifferenceType;
2270 inline RowIterator()
2271 : matrix_( nullptr )
2285 inline RowIterator( MatrixType& matrix,
size_t row,
size_t column )
2286 : matrix_( &matrix )
2291 for( ; column_<matrix_->columns(); ++column_ ) {
2292 pos_ = matrix_->find( row_, column_ );
2293 if( pos_ != matrix_->end( column_ ) )
break;
2306 inline RowIterator( MatrixType& matrix,
size_t row,
size_t column, IteratorType pos )
2307 : matrix_( &matrix )
2321 template<
typename MatrixType2,
typename IteratorType2 >
2322 inline RowIterator(
const RowIterator<MatrixType2,IteratorType2>& it )
2323 : matrix_( it.matrix_ )
2325 , column_( it.column_ )
2335 inline RowIterator& operator++() {
2337 for( ; column_<matrix_->columns(); ++column_ ) {
2338 pos_ = matrix_->find( row_, column_ );
2339 if( pos_ != matrix_->end( column_ ) )
break;
2351 inline const RowIterator operator++(
int ) {
2352 const RowIterator tmp( *
this );
2363 inline ReferenceType
operator*()
const {
2364 return ReferenceType( pos_, column_ );
2373 inline PointerType operator->()
const {
2374 return PointerType( pos_, column_ );
2384 template<
typename MatrixType2,
typename IteratorType2 >
2385 inline bool operator==(
const RowIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2386 return column_ == rhs.column_;
2396 template<
typename MatrixType2,
typename IteratorType2 >
2397 inline bool operator!=(
const RowIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2398 return !( *
this == rhs );
2408 inline DifferenceType
operator-(
const RowIterator& rhs )
const {
2409 size_t counter( 0UL );
2410 for(
size_t j=rhs.column_; j<column_; ++j ) {
2411 if( matrix_->find( row_, j ) != matrix_->end( j ) )
2420 MatrixType* matrix_;
2427 template<
typename MatrixType2,
typename IteratorType2 >
friend class RowIterator;
2428 template<
typename MT2,
bool SO2,
bool DF2,
bool SF2,
size_t... CRAs2 >
friend class Row;
2435 using ConstIterator = RowIterator< const MT, ConstIterator_t<MT> >;
2438 using Iterator = If_t< IsConst_v<MT>, ConstIterator, RowIterator< MT, Iterator_t<MT> > >;
2443 static constexpr
bool smpAssignable =
false;
2446 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
2452 template<
typename... RRAs >
2453 explicit inline Row( MT& matrix, RRAs... args );
2455 Row(
const Row& ) =
default;
2469 inline Reference operator[](
size_t index );
2470 inline ConstReference operator[](
size_t index )
const;
2471 inline Reference at(
size_t index );
2472 inline ConstReference at(
size_t index )
const;
2473 inline Iterator
begin ();
2474 inline ConstIterator
begin ()
const;
2475 inline ConstIterator
cbegin()
const;
2476 inline Iterator
end ();
2477 inline ConstIterator
end ()
const;
2478 inline ConstIterator
cend ()
const;
2485 inline Row& operator=( initializer_list<ElementType> list );
2486 inline Row& operator=(
const Row& rhs );
2488 template<
typename VT >
inline Row& operator= (
const Vector<VT,true>& rhs );
2489 template<
typename VT >
inline Row&
operator+=(
const Vector<VT,true>& rhs );
2490 template<
typename VT >
inline Row&
operator-=(
const Vector<VT,true>& rhs );
2491 template<
typename VT >
inline Row&
operator*=(
const Vector<VT,true>& rhs );
2492 template<
typename VT >
inline Row&
operator/=(
const DenseVector<VT,true>& rhs );
2493 template<
typename VT >
inline Row& operator%=(
const Vector<VT,true>& rhs );
2502 inline MT& operand() noexcept;
2503 inline const MT& operand() const noexcept;
2505 inline
size_t size() const noexcept;
2506 inline
size_t capacity() const noexcept;
2508 inline
void reset();
2509 inline
void reserve(
size_t n );
2516 inline Iterator
set (
size_t index, const ElementType& value );
2517 inline Iterator insert(
size_t index, const ElementType& value );
2518 inline
void append(
size_t index, const ElementType& value,
bool check=false );
2525 inline
void erase(
size_t index );
2526 inline Iterator erase( Iterator pos );
2527 inline Iterator erase( Iterator first, Iterator last );
2530 inline
void erase( Pred predicate );
2532 template< typename Pred >
2533 inline
void erase( Iterator first, Iterator last, Pred predicate );
2540 inline Iterator find (
size_t index );
2541 inline ConstIterator find (
size_t index ) const;
2542 inline Iterator lowerBound(
size_t index );
2543 inline ConstIterator lowerBound(
size_t index ) const;
2544 inline Iterator upperBound(
size_t index );
2545 inline ConstIterator upperBound(
size_t index ) const;
2552 template< typename Other > inline Row& scale( const Other& scalar );
2559 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
2560 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
2562 template< typename VT > inline
void assign ( const DenseVector <VT,true>& rhs );
2563 template< typename VT > inline
void assign ( const SparseVector<VT,true>& rhs );
2564 template< typename VT > inline
void addAssign( const Vector<VT,true>& rhs );
2565 template< typename VT > inline
void subAssign( const Vector<VT,true>& rhs );
2608 template< typename MT
2610 template< typename... RRAs >
2611 inline Row<MT,false,false,false,CRAs...>::Row( MT& matrix, RRAs... args )
2612 : DataType( args... )
2613 , matrix_ ( matrix )
2616 if( matrix_.rows() <=
row() ) {
2646 template<
typename MT
2648 inline typename Row<MT,
false,
false,
false,CRAs...>::Reference
2649 Row<MT,false,false,false,CRAs...>::operator[](
size_t index )
2652 return matrix_(
row(),index);
2668 template<
typename MT
2670 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstReference
2671 Row<MT,false,false,false,CRAs...>::operator[](
size_t index )
const 2674 return const_cast<const MT&>( matrix_ )(
row(),index);
2691 template<
typename MT
2693 inline typename Row<MT,
false,
false,
false,CRAs...>::Reference
2694 Row<MT,false,false,false,CRAs...>::at(
size_t index )
2696 if( index >=
size() ) {
2699 return (*
this)[index];
2716 template<
typename MT
2718 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstReference
2719 Row<MT,false,false,false,CRAs...>::at(
size_t index )
const 2721 if( index >=
size() ) {
2724 return (*
this)[index];
2738 template<
typename MT
2740 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
2743 return Iterator( matrix_,
row(), 0UL );
2757 template<
typename MT
2759 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstIterator
2762 return ConstIterator( matrix_,
row(), 0UL );
2776 template<
typename MT
2778 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstIterator
2781 return ConstIterator( matrix_,
row(), 0UL );
2795 template<
typename MT
2797 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
2800 return Iterator( matrix_,
row(),
size() );
2814 template<
typename MT
2816 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstIterator
2819 return ConstIterator( matrix_,
row(),
size() );
2833 template<
typename MT
2835 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstIterator
2838 return ConstIterator( matrix_,
row(),
size() );
2867 template<
typename MT
2869 inline Row<MT,
false,
false,
false,CRAs...>&
2870 Row<MT,false,false,false,CRAs...>::operator=( initializer_list<ElementType> list )
2872 using blaze::assign;
2874 if( list.size() >
size() ) {
2878 const InitializerVector<ElementType,true> tmp( list,
size() );
2880 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
2884 decltype(
auto) left( derestrict( *this ) );
2886 assign( left, tmp );
2910 template< typename MT
2912 inline Row<MT,false,false,false,CRAs...>&
2913 Row<MT,false,false,false,CRAs...>::operator=( const Row& rhs )
2915 using blaze::assign;
2921 if(
this == &rhs || ( &matrix_ == &rhs.matrix_ &&
row() == rhs.row() ) )
2924 if(
size() != rhs.size() ) {
2928 if( !tryAssign( matrix_, rhs,
row(), 0UL ) ) {
2932 decltype(
auto) left( derestrict( *this ) );
2934 if( rhs.canAlias( &matrix_ ) ) {
2935 const ResultType tmp( rhs );
2936 assign( left, tmp );
2939 assign( left, rhs );
2964 template<
typename MT
2966 template<
typename VT >
2967 inline Row<MT,
false,
false,
false,CRAs...>&
2968 Row<MT,false,false,false,CRAs...>::operator=(
const Vector<VT,true>& rhs )
2970 using blaze::assign;
2976 const CompositeType_t<VT> tmp( ~rhs );
2978 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
2982 decltype(
auto) left( derestrict( *this ) );
2984 assign( left, tmp );
3008 template< typename MT
3010 template< typename VT >
3011 inline Row<MT,false,false,false,CRAs...>&
3012 Row<MT,false,false,false,CRAs...>::operator+=( const Vector<VT,true>& rhs )
3014 using blaze::assign;
3022 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
3031 const AddType tmp( *
this + (~rhs) );
3033 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
3037 decltype(
auto) left( derestrict( *this ) );
3039 assign( left, tmp );
3063 template< typename MT
3065 template< typename VT >
3066 inline Row<MT,false,false,false,CRAs...>&
3067 Row<MT,false,false,false,CRAs...>::operator-=( const Vector<VT,true>& rhs )
3069 using blaze::assign;
3077 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
3086 const SubType tmp( *
this - (~rhs) );
3088 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
3092 decltype(
auto) left( derestrict( *this ) );
3094 assign( left, tmp );
3117 template< typename MT
3119 template< typename VT >
3120 inline Row<MT,false,false,false,CRAs...>&
3121 Row<MT,false,false,false,CRAs...>::operator*=( const Vector<VT,true>& rhs )
3123 using blaze::assign;
3131 using MultType = MultTrait_t< ResultType, ResultType_t<VT> >;
3140 const MultType tmp( *
this * (~rhs) );
3142 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
3146 decltype(
auto) left( derestrict( *this ) );
3148 assign( left, tmp );
3170 template< typename MT
3172 template< typename VT >
3173 inline Row<MT,false,false,false,CRAs...>&
3174 Row<MT,false,false,false,CRAs...>::operator/=( const DenseVector<VT,true>& rhs )
3176 using blaze::assign;
3185 using DivType = DivTrait_t< ResultType, ResultType_t<VT> >;
3195 const DivType tmp( *
this / (~rhs) );
3197 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
3201 decltype(
auto) left( derestrict( *this ) );
3203 assign( left, tmp );
3226 template< typename MT
3228 template< typename VT >
3229 inline Row<MT,false,false,false,CRAs...>&
3230 Row<MT,false,false,false,CRAs...>::operator%=( const Vector<VT,true>& rhs )
3232 using blaze::assign;
3237 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
3243 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
3247 const CrossType tmp( *
this % (~rhs) );
3249 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
3253 decltype(
auto) left( derestrict( *this ) );
3255 assign( left, tmp );
3279 template< typename MT
3281 inline MT& Row<MT,false,false,false,CRAs...>::operand() noexcept
3295 template<
typename MT
3297 inline const MT& Row<MT,false,false,false,CRAs...>::operand() const noexcept
3311 template<
typename MT
3315 return matrix_.columns();
3327 template<
typename MT
3331 return matrix_.columns();
3346 template<
typename MT
3350 size_t counter( 0UL );
3351 for( ConstIterator element=
begin(); element!=
end(); ++element ) {
3366 template<
typename MT
3370 const size_t jbegin( ( IsUpper_v<MT> )
3371 ?( ( IsUniUpper_v<MT> || IsStrictlyUpper_v<MT> )
3375 const size_t jend ( ( IsLower_v<MT> )
3376 ?( ( IsUniLower_v<MT> || IsStrictlyLower_v<MT> )
3381 for(
size_t j=jbegin; j<jend; ++j ) {
3382 matrix_.erase(
row(), j );
3399 template<
typename MT
3401 void Row<MT,false,false,false,CRAs...>::reserve(
size_t n )
3431 template<
typename MT
3433 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
3436 return Iterator( matrix_,
row(), index, matrix_.set(
row(), index, value ) );
3455 template<
typename MT
3457 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
3458 Row<MT,false,false,false,CRAs...>::insert(
size_t index,
const ElementType& value )
3460 return Iterator( matrix_,
row(), index, matrix_.insert(
row(), index, value ) );
3491 template<
typename MT
3493 inline void Row<MT,false,false,false,CRAs...>::append(
size_t index,
const ElementType& value,
bool check )
3495 if( !check || !isDefault<strict>( value ) )
3496 matrix_.insert(
row(), index, value );
3519 template<
typename MT
3521 inline void Row<MT,false,false,false,CRAs...>::erase(
size_t index )
3523 matrix_.erase(
row(), index );
3538 template<
typename MT
3540 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
3541 Row<MT,false,false,false,CRAs...>::erase( Iterator pos )
3543 const size_t column( pos.column_ );
3548 matrix_.erase(
column, pos.pos_ );
3549 return Iterator( matrix_,
row(),
column+1UL );
3565 template<
typename MT
3567 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
3568 Row<MT,false,false,false,CRAs...>::erase( Iterator first, Iterator last )
3570 for( ; first!=last; ++first ) {
3571 matrix_.erase( first.column_, first.pos_ );
3602 template<
typename MT
3604 template<
typename Pred
3606 inline void Row<MT,false,false,false,CRAs...>::erase( Pred predicate )
3608 for( Iterator element=
begin(); element!=
end(); ++element ) {
3609 if( predicate( element->value() ) )
3610 matrix_.erase( element.column_, element.pos_ );
3642 template<
typename MT
3644 template<
typename Pred >
3645 inline void Row<MT,false,false,false,CRAs...>::erase( Iterator first, Iterator last, Pred predicate )
3647 for( ; first!=last; ++first ) {
3648 if( predicate( first->value() ) )
3649 matrix_.erase( first.column_, first.pos_ );
3678 template<
typename MT
3680 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
3681 Row<MT,false,false,false,CRAs...>::find(
size_t index )
3683 const Iterator_t<MT> pos( matrix_.find(
row(), index ) );
3685 if( pos != matrix_.end( index ) )
3686 return Iterator( matrix_,
row(), index, pos );
3708 template<
typename MT
3710 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstIterator
3711 Row<MT,false,false,false,CRAs...>::find(
size_t index )
const 3713 const ConstIterator_t<MT> pos( matrix_.find(
row(), index ) );
3715 if( pos != matrix_.end( index ) )
3716 return ConstIterator( matrix_,
row(), index, pos );
3737 template<
typename MT
3739 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
3740 Row<MT,false,false,false,CRAs...>::lowerBound(
size_t index )
3742 for(
size_t i=index; i<
size(); ++i )
3744 const Iterator_t<MT> pos( matrix_.find(
row(), i ) );
3746 if( pos != matrix_.end( i ) )
3747 return Iterator( matrix_,
row(), i, pos );
3769 template<
typename MT
3771 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstIterator
3772 Row<MT,false,false,false,CRAs...>::lowerBound(
size_t index )
const 3774 for(
size_t i=index; i<
size(); ++i )
3776 const ConstIterator_t<MT> pos( matrix_.find(
row(), i ) );
3778 if( pos != matrix_.end( i ) )
3779 return ConstIterator( matrix_,
row(), i, pos );
3801 template<
typename MT
3803 inline typename Row<MT,
false,
false,
false,CRAs...>::Iterator
3804 Row<MT,false,false,false,CRAs...>::upperBound(
size_t index )
3806 for(
size_t i=index+1UL; i<
size(); ++i )
3808 const Iterator_t<MT> pos( matrix_.find(
row(), i ) );
3810 if( pos != matrix_.end( i ) )
3811 return Iterator( matrix_,
row(), i, pos );
3833 template<
typename MT
3835 inline typename Row<MT,
false,
false,
false,CRAs...>::ConstIterator
3836 Row<MT,false,false,false,CRAs...>::upperBound(
size_t index )
const 3838 for(
size_t i=index+1UL; i<
size(); ++i )
3840 const ConstIterator_t<MT> pos( matrix_.find(
row(), i ) );
3842 if( pos != matrix_.end( i ) )
3843 return ConstIterator( matrix_,
row(), i, pos );
3873 template<
typename MT
3875 template<
typename Other >
3876 inline Row<MT,
false,
false,
false,CRAs...>&
3877 Row<MT,false,false,false,CRAs...>::scale(
const Other& scalar )
3881 for( Iterator element=
begin(); element!=
end(); ++element )
3882 element->value() *= scalar;
3908 template<
typename MT
3910 template<
typename Other >
3911 inline bool Row<MT,false,false,false,CRAs...>::canAlias(
const Other* alias )
const noexcept
3913 return matrix_.isAliased( alias );
3926 template<
typename MT
3928 template<
typename Other >
3929 inline bool Row<MT,false,false,false,CRAs...>::isAliased(
const Other* alias )
const noexcept
3931 return matrix_.isAliased( alias );
3949 template<
typename MT
3951 template<
typename VT >
3952 inline void Row<MT,false,false,false,CRAs...>::assign(
const DenseVector<VT,true>& rhs )
3956 for(
size_t j=0UL; j<(~rhs).
size(); ++j ) {
3957 matrix_(
row(),j) = (~rhs)[j];
3976 template<
typename MT
3978 template<
typename VT >
3979 inline void Row<MT,false,false,false,CRAs...>::assign(
const SparseVector<VT,true>& rhs )
3985 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
3986 for( ; j<element->index(); ++j )
3987 matrix_.erase(
row(), j );
3988 matrix_(
row(),j++) = element->value();
3990 for( ; j<
size(); ++j ) {
3991 matrix_.erase(
row(), j );
4010 template<
typename MT
4012 template<
typename VT >
4013 inline void Row<MT,false,false,false,CRAs...>::addAssign(
const Vector<VT,true>& rhs )
4015 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
4022 const AddType tmp(
serial( *
this + (~rhs) ) );
4041 template<
typename MT
4043 template<
typename VT >
4044 inline void Row<MT,false,false,false,CRAs...>::subAssign(
const Vector<VT,true>& rhs )
4046 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
4053 const SubType tmp(
serial( *
this - (~rhs) ) );
4080 template<
typename MT
4082 class Row<MT,false,false,true,CRAs...>
4083 :
public View< SparseVector< Row<MT,false,false,true,CRAs...>, true > >
4084 ,
private RowData<CRAs...>
4088 using DataType = RowData<CRAs...>;
4089 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
4095 using This = Row<MT,
false,
false,
true,CRAs...>;
4097 using BaseType = SparseVector<This,true>;
4098 using ViewedType = MT;
4100 using TransposeType = TransposeType_t<ResultType>;
4101 using ElementType = ElementType_t<MT>;
4102 using ReturnType = ReturnType_t<MT>;
4103 using CompositeType =
const Row&;
4106 using ConstReference = ConstReference_t<MT>;
4109 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
4112 using ConstIterator = ConstIterator_t<MT>;
4115 using Iterator = If_t< IsConst_v<MT>, ConstIterator, Iterator_t<MT> >;
4120 static constexpr
bool smpAssignable =
false;
4123 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
4129 template<
typename... RRAs >
4130 explicit inline Row( MT& matrix, RRAs... args );
4132 Row(
const Row& ) =
default;
4146 inline Reference operator[](
size_t index );
4147 inline ConstReference operator[](
size_t index )
const;
4148 inline Reference at(
size_t index );
4149 inline ConstReference at(
size_t index )
const;
4150 inline Iterator
begin ();
4151 inline ConstIterator
begin ()
const;
4152 inline ConstIterator
cbegin()
const;
4153 inline Iterator
end ();
4154 inline ConstIterator
end ()
const;
4155 inline ConstIterator
cend ()
const;
4162 inline Row& operator=( initializer_list<ElementType> list );
4163 inline Row& operator=(
const Row& rhs );
4165 template<
typename VT >
inline Row& operator= (
const DenseVector<VT,true>& rhs );
4166 template<
typename VT >
inline Row& operator= (
const SparseVector<VT,true>& rhs );
4167 template<
typename VT >
inline Row&
operator+=(
const DenseVector<VT,true>& rhs );
4168 template<
typename VT >
inline Row&
operator+=(
const SparseVector<VT,true>& rhs );
4169 template<
typename VT >
inline Row&
operator-=(
const DenseVector<VT,true>& rhs );
4170 template<
typename VT >
inline Row&
operator-=(
const SparseVector<VT,true>& rhs );
4171 template<
typename VT >
inline Row&
operator*=(
const Vector<VT,true>& rhs );
4172 template<
typename VT >
inline Row&
operator/=(
const DenseVector<VT,true>& rhs );
4173 template<
typename VT >
inline Row& operator%=(
const Vector<VT,true>& rhs );
4182 inline MT& operand() noexcept;
4183 inline const MT& operand() const noexcept;
4185 inline
size_t size() const noexcept;
4186 inline
size_t capacity() const noexcept;
4188 inline
void reset();
4189 inline
void reserve(
size_t n );
4196 inline Iterator
set (
size_t index, const ElementType& value );
4197 inline Iterator insert(
size_t index, const ElementType& value );
4198 inline
void append(
size_t index, const ElementType& value,
bool check=false );
4205 inline
void erase(
size_t index );
4206 inline Iterator erase( Iterator pos );
4207 inline Iterator erase( Iterator first, Iterator last );
4210 inline
void erase( Pred predicate );
4212 template< typename Pred >
4213 inline
void erase( Iterator first, Iterator last, Pred predicate );
4220 inline Iterator find (
size_t index );
4221 inline ConstIterator find (
size_t index ) const;
4222 inline Iterator lowerBound(
size_t index );
4223 inline ConstIterator lowerBound(
size_t index ) const;
4224 inline Iterator upperBound(
size_t index );
4225 inline ConstIterator upperBound(
size_t index ) const;
4232 template< typename Other > inline Row& scale( const Other& scalar );
4239 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
4240 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
4242 template< typename VT > inline
void assign ( const DenseVector <VT,true>& rhs );
4243 template< typename VT > inline
void assign ( const SparseVector<VT,true>& rhs );
4244 template< typename VT > inline
void addAssign( const DenseVector <VT,true>& rhs );
4245 template< typename VT > inline
void addAssign( const SparseVector<VT,true>& rhs );
4246 template< typename VT > inline
void subAssign( const DenseVector <VT,true>& rhs );
4247 template< typename VT > inline
void subAssign( const SparseVector<VT,true>& rhs );
4255 inline
size_t extendCapacity() const;
4302 template< typename MT
4304 template< typename... RRAs >
4305 inline Row<MT,false,false,true,CRAs...>::Row( MT& matrix, RRAs... args )
4306 : DataType( args... )
4307 , matrix_ ( matrix )
4310 if( matrix_.rows() <=
row() ) {
4340 template<
typename MT
4342 inline typename Row<MT,
false,
false,
true,CRAs...>::Reference
4343 Row<MT,false,false,true,CRAs...>::operator[](
size_t index )
4346 return matrix_(index,
row());
4362 template<
typename MT
4364 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstReference
4365 Row<MT,false,false,true,CRAs...>::operator[](
size_t index )
const 4368 return const_cast<const MT&>( matrix_ )(index,
row());
4385 template<
typename MT
4387 inline typename Row<MT,
false,
false,
true,CRAs...>::Reference
4388 Row<MT,false,false,true,CRAs...>::at(
size_t index )
4390 if( index >=
size() ) {
4393 return (*
this)[index];
4410 template<
typename MT
4412 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstReference
4413 Row<MT,false,false,true,CRAs...>::at(
size_t index )
const 4415 if( index >=
size() ) {
4418 return (*
this)[index];
4432 template<
typename MT
4434 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
4437 return matrix_.begin(
row() );
4451 template<
typename MT
4453 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstIterator
4456 return matrix_.cbegin(
row() );
4470 template<
typename MT
4472 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstIterator
4475 return matrix_.cbegin(
row() );
4489 template<
typename MT
4491 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
4494 return matrix_.end(
row() );
4508 template<
typename MT
4510 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstIterator
4513 return matrix_.cend(
row() );
4527 template<
typename MT
4529 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstIterator
4532 return matrix_.cend(
row() );
4561 template<
typename MT
4563 inline Row<MT,
false,
false,
true,CRAs...>&
4564 Row<MT,false,false,true,CRAs...>::operator=( initializer_list<ElementType> list )
4566 using blaze::assign;
4568 if( list.size() >
size() ) {
4572 const InitializerVector<ElementType,true> tmp( list,
size() );
4574 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
4578 decltype(
auto) left( derestrict( *this ) );
4581 assign( left, tmp );
4605 template< typename MT
4607 inline Row<MT,false,false,true,CRAs...>&
4608 Row<MT,false,false,true,CRAs...>::operator=( const Row& rhs )
4610 using blaze::assign;
4616 if(
this == &rhs || ( &matrix_ == &rhs.matrix_ &&
row() == rhs.row() ) )
4619 if(
size() != rhs.size() ) {
4623 if( !tryAssign( matrix_, rhs,
row(), 0UL ) ) {
4627 decltype(
auto) left( derestrict( *this ) );
4629 if( rhs.canAlias( &matrix_ ) ) {
4630 const ResultType tmp( rhs );
4632 left.reserve( tmp.nonZeros() );
4633 assign( left, tmp );
4637 left.reserve( rhs.nonZeros() );
4638 assign( left, rhs );
4663 template<
typename MT
4665 template<
typename VT >
4666 inline Row<MT,
false,
false,
true,CRAs...>&
4667 Row<MT,false,false,true,CRAs...>::operator=(
const DenseVector<VT,true>& rhs )
4669 using blaze::assign;
4679 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4680 Right right( ~rhs );
4682 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
4686 decltype(
auto) left( derestrict( *this ) );
4689 const ResultType_t<VT> tmp( right );
4691 assign( left, tmp );
4695 assign( left, right );
4720 template<
typename MT
4722 template<
typename VT >
4723 inline Row<MT,
false,
false,
true,CRAs...>&
4724 Row<MT,false,false,true,CRAs...>::operator=(
const SparseVector<VT,true>& rhs )
4726 using blaze::assign;
4736 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4737 Right right( ~rhs );
4739 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
4743 decltype(
auto) left( derestrict( *this ) );
4746 const ResultType_t<VT> tmp( right );
4748 left.reserve( tmp.nonZeros() );
4749 assign( left, tmp );
4753 left.reserve( right.nonZeros() );
4754 assign( left, right );
4779 template<
typename MT
4781 template<
typename VT >
4782 inline Row<MT,
false,
false,
true,CRAs...>&
4785 using blaze::assign;
4794 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
4804 const AddType tmp( *
this + (~rhs) );
4806 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
4810 decltype(
auto) left( derestrict( *this ) );
4813 assign( left, tmp );
4837 template< typename MT
4839 template< typename VT >
4840 inline Row<MT,false,false,true,CRAs...>&
4841 Row<MT,false,false,true,CRAs...>::operator+=( const SparseVector<VT,true>& rhs )
4843 using blaze::assign;
4852 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
4862 const AddType tmp( *
this + (~rhs) );
4864 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
4868 decltype(
auto) left( derestrict( *this ) );
4872 assign( left, tmp );
4897 template< typename MT
4899 template< typename VT >
4900 inline Row<MT,false,false,true,CRAs...>&
4901 Row<MT,false,false,true,CRAs...>::operator-=( const DenseVector<VT,true>& rhs )
4903 using blaze::assign;
4912 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
4922 const SubType tmp( *
this - (~rhs) );
4924 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
4928 decltype(
auto) left( derestrict( *this ) );
4931 assign( left, tmp );
4956 template< typename MT
4958 template< typename VT >
4959 inline Row<MT,false,false,true,CRAs...>&
4960 Row<MT,false,false,true,CRAs...>::operator-=( const SparseVector<VT,true>& rhs )
4962 using blaze::assign;
4971 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
4981 const SubType tmp( *
this - (~rhs) );
4983 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
4987 decltype(
auto) left( derestrict( *this ) );
4991 assign( left, tmp );
5014 template< typename MT
5016 template< typename VT >
5017 inline Row<MT,false,false,true,CRAs...>&
5018 Row<MT,false,false,true,CRAs...>::operator*=( const Vector<VT,true>& rhs )
5020 using blaze::assign;
5028 using MultType = MultTrait_t< ResultType, ResultType_t<VT> >;
5037 const MultType tmp( *
this * (~rhs) );
5039 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
5043 decltype(
auto) left( derestrict( *this ) );
5046 assign( left, tmp );
5068 template< typename MT
5070 template< typename VT >
5071 inline Row<MT,false,false,true,CRAs...>&
5072 Row<MT,false,false,true,CRAs...>::operator/=( const DenseVector<VT,true>& rhs )
5074 using blaze::assign;
5083 using DivType = DivTrait_t< ResultType, ResultType_t<VT> >;
5093 const DivType tmp( *
this / (~rhs) );
5095 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
5099 decltype(
auto) left( derestrict( *this ) );
5102 assign( left, tmp );
5125 template< typename MT
5127 template< typename VT >
5128 inline Row<MT,false,false,true,CRAs...>&
5129 Row<MT,false,false,true,CRAs...>::operator%=( const Vector<VT,true>& rhs )
5131 using blaze::assign;
5136 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
5142 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
5146 const CrossType tmp( *
this % (~rhs) );
5148 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
5152 decltype(
auto) left( derestrict( *this ) );
5155 assign( left, tmp );
5179 template< typename MT
5181 inline MT& Row<MT,false,false,true,CRAs...>::operand() noexcept
5195 template<
typename MT
5197 inline const MT& Row<MT,false,false,true,CRAs...>::operand() const noexcept
5211 template<
typename MT
5215 return matrix_.columns();
5227 template<
typename MT
5231 return matrix_.capacity(
row() );
5246 template<
typename MT
5250 return matrix_.nonZeros(
row() );
5262 template<
typename MT
5266 matrix_.reset(
row() );
5282 template<
typename MT
5284 void Row<MT,false,false,true,CRAs...>::reserve(
size_t n )
5286 matrix_.reserve(
row(), n );
5301 template<
typename MT
5303 inline size_t Row<MT,false,false,true,CRAs...>::extendCapacity()
const 5308 size_t nonzeros( 2UL*
capacity()+1UL );
5309 nonzeros =
max( nonzeros, 7UL );
5310 nonzeros =
min( nonzeros,
size() );
5340 template<
typename MT
5342 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
5345 return matrix_.set( index,
row(), value );
5364 template<
typename MT
5366 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
5367 Row<MT,false,false,true,CRAs...>::insert(
size_t index,
const ElementType& value )
5369 return matrix_.insert( index,
row(), value );
5400 template<
typename MT
5402 inline void Row<MT,false,false,true,CRAs...>::append(
size_t index,
const ElementType& value,
bool check )
5404 matrix_.append( index,
row(), value, check );
5427 template<
typename MT
5429 inline void Row<MT,false,false,true,CRAs...>::erase(
size_t index )
5431 matrix_.erase( index,
row() );
5446 template<
typename MT
5448 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
5449 Row<MT,false,false,true,CRAs...>::erase( Iterator pos )
5451 return matrix_.erase(
row(), pos );
5467 template<
typename MT
5469 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
5470 Row<MT,false,false,true,CRAs...>::erase( Iterator first, Iterator last )
5472 return matrix_.erase(
row(), first, last );
5501 template<
typename MT
5503 template<
typename Pred
5505 inline void Row<MT,false,false,true,CRAs...>::erase( Pred predicate )
5507 matrix_.erase(
row(),
begin(),
end(), predicate );
5538 template<
typename MT
5540 template<
typename Pred >
5541 inline void Row<MT,false,false,true,CRAs...>::erase( Iterator first, Iterator last, Pred predicate )
5543 matrix_.erase(
row(), first, last, predicate );
5571 template<
typename MT
5573 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
5574 Row<MT,false,false,true,CRAs...>::find(
size_t index )
5576 return matrix_.find( index,
row() );
5596 template<
typename MT
5598 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstIterator
5599 Row<MT,false,false,true,CRAs...>::find(
size_t index )
const 5601 return matrix_.find( index,
row() );
5620 template<
typename MT
5622 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
5623 Row<MT,false,false,true,CRAs...>::lowerBound(
size_t index )
5625 return matrix_.lowerBound( index,
row() );
5644 template<
typename MT
5646 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstIterator
5647 Row<MT,false,false,true,CRAs...>::lowerBound(
size_t index )
const 5649 return matrix_.lowerBound( index,
row() );
5668 template<
typename MT
5670 inline typename Row<MT,
false,
false,
true,CRAs...>::Iterator
5671 Row<MT,false,false,true,CRAs...>::upperBound(
size_t index )
5673 return matrix_.upperBound( index,
row() );
5692 template<
typename MT
5694 inline typename Row<MT,
false,
false,
true,CRAs...>::ConstIterator
5695 Row<MT,false,false,true,CRAs...>::upperBound(
size_t index )
const 5697 return matrix_.upperBound( index,
row() );
5724 template<
typename MT
5726 template<
typename Other >
5727 inline Row<MT,
false,
false,
true,CRAs...>&
5728 Row<MT,false,false,true,CRAs...>::scale(
const Other& scalar )
5732 for( Iterator element=
begin(); element!=
end(); ++element )
5733 element->value() *= scalar;
5759 template<
typename MT
5761 template<
typename Other >
5762 inline bool Row<MT,false,false,true,CRAs...>::canAlias(
const Other* alias )
const noexcept
5764 return matrix_.isAliased( alias );
5781 template<
typename MT
5783 template<
typename Other >
5784 inline bool Row<MT,false,false,true,CRAs...>::isAliased(
const Other* alias )
const noexcept
5786 return matrix_.isAliased( alias );
5804 template<
typename MT
5806 template<
typename VT >
5807 inline void Row<MT,false,false,true,CRAs...>::assign(
const DenseVector<VT,true>& rhs )
5812 for(
size_t i=0UL; i<
size(); ++i )
5814 if( matrix_.nonZeros(
row() ) == matrix_.capacity(
row() ) )
5815 matrix_.reserve(
row(), extendCapacity() );
5817 matrix_.append( i,
row(), (~rhs)[i],
true );
5836 template<
typename MT
5838 template<
typename VT >
5839 inline void Row<MT,false,false,true,CRAs...>::assign(
const SparseVector<VT,true>& rhs )
5844 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
5845 matrix_.append( element->index(),
row(), element->value(), true );
5864 template<
typename MT
5866 template<
typename VT >
5867 inline void Row<MT,false,false,true,CRAs...>::addAssign(
const DenseVector<VT,true>& rhs )
5869 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
5877 const AddType tmp(
serial( *
this + (~rhs) ) );
5878 matrix_.reset(
row() );
5897 template<
typename MT
5899 template<
typename VT >
5900 inline void Row<MT,false,false,true,CRAs...>::addAssign(
const SparseVector<VT,true>& rhs )
5902 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
5910 const AddType tmp(
serial( *
this + (~rhs) ) );
5911 matrix_.reset(
row() );
5912 matrix_.reserve(
row(), tmp.nonZeros() );
5931 template<
typename MT
5933 template<
typename VT >
5934 inline void Row<MT,false,false,true,CRAs...>::subAssign(
const DenseVector<VT,true>& rhs )
5936 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
5944 const SubType tmp(
serial( *
this - (~rhs) ) );
5945 matrix_.reset(
row() );
5964 template<
typename MT
5966 template<
typename VT >
5967 inline void Row<MT,false,false,true,CRAs...>::subAssign(
const SparseVector<VT,true>& rhs )
5969 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
5977 const SubType tmp(
serial( *
this - (~rhs) ) );
5978 matrix_.reset(
row() );
5979 matrix_.reserve(
row(), tmp.nonZeros() );
#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.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:133
Headerfile for the generic min algorithm.
Header file for the blaze::checked and blaze::unchecked instances.
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:432
Header file for the implementation of the RowData class template.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression,...
Definition: Assert.h:117
Header file for the IsUniUpper type trait.
Header file for the subtraction trait.
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
Header file for basic type definitions.
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:750
Header file for the SparseVector base class.
Header file for the View base class.
Header file for the row trait.
Header file for the serial shim.
#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
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 reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
Header file for the IsIntegral type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SUBMATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a submatrix type (i.e....
Definition: Submatrix.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper unitriangular matrix ty...
Definition: UniTriangular.h:81
Header file for the MAYBE_UNUSED function template.
constexpr bool IsReference_v
Auxiliary variable template for the IsReference type trait.The IsReference_v variable template provid...
Definition: IsReference.h:95
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
#define BLAZE_CONSTRAINT_MUST_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a symmetric matrix type,...
Definition: Symmetric.h:60
Header file for the reset shim.
Constraints on the storage order of matrix types.
#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 IsUniLower type trait.
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
Constraint on the data type.
Constraint on the data type.
Headerfile for the generic max algorithm.
Header file for the DisableIf class template.
Header file for the implementation of the Row base template.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
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.
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: ColumnMajorMatrix.h:61
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:9091
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1162
#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
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:370
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
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.The Contains_v variable template provides a c...
Definition: Contains.h:138
Header file for the IsLower type trait.
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
#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
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.
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1198
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
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
Constraint on the data type.
Constraint on the data type.
Header file for the IsStrictlyLower type trait.
Constraint on the data type.
auto operator/=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Division assignment operator for the division of a dense matrix by a scalar value ( ).
Definition: DenseMatrix.h:558
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type,...
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
Header file for the IsConst type trait.
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
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:133
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type,...
Definition: Reference.h:79
typename RowTrait< MT, CRAs... >::Type RowTrait_t
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_t alias declaration provides a c...
Definition: RowTrait.h:170
Header file for the isDefault shim.
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Constraint on the data type.
Constraint on the data type.
Constraints on the storage order of matrix types.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
#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.
#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
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: RowVector.h:61
auto operator *=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:494
constexpr bool IsIntegral_v
Auxiliary variable template for the IsIntegral type trait.The IsIntegral_v variable template provides...
Definition: IsIntegral.h:95
Header file for the IsUpper type trait.
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
Header file for the IsRestricted type trait.
#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
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type,...
Definition: SparseMatrix.h:61
Constraint on the transpose flag of vector types.
Header file for the IsExpression type trait class.
Constraint on the data type.