35 #ifndef _BLAZE_MATH_VIEWS_COLUMN_SPARSE_H_ 36 #define _BLAZE_MATH_VIEWS_COLUMN_SPARSE_H_ 114 template<
typename MT
117 class Column<MT,true,false,SF,CCAs...>
118 :
public View< SparseVector< Column<MT,true,false,SF,CCAs...>, false > >
119 ,
private ColumnData<CCAs...>
123 using DataType = ColumnData<CCAs...>;
124 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
130 using This = Column<MT,
true,
false,SF,CCAs...>;
132 using BaseType = SparseVector<This,false>;
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 Column&;
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... RCAs >
165 explicit inline Column( MT& matrix, RCAs... args );
167 Column(
const Column& ) =
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 Column& operator=( initializer_list<ElementType> list );
198 inline Column& operator=(
const Column& rhs );
200 template<
typename VT >
inline Column& operator= (
const DenseVector<VT,false>& rhs );
201 template<
typename VT >
inline Column& operator= (
const SparseVector<VT,false>& rhs );
202 template<
typename VT >
inline Column&
operator+=(
const DenseVector<VT,false>& rhs );
203 template<
typename VT >
inline Column&
operator+=(
const SparseVector<VT,false>& rhs );
204 template<
typename VT >
inline Column&
operator-=(
const DenseVector<VT,false>& rhs );
205 template<
typename VT >
inline Column&
operator-=(
const SparseVector<VT,false>& rhs );
206 template<
typename VT >
inline Column&
operator*=(
const Vector<VT,false>& rhs );
207 template<
typename VT >
inline Column&
operator/=(
const DenseVector<VT,false>& rhs );
208 template<
typename VT >
inline Column& operator%=(
const Vector<VT,false>& 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 Column& 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,false>& rhs );
278 template< typename VT > inline
void assign ( const SparseVector<VT,false>& rhs );
279 template< typename VT > inline
void addAssign( const DenseVector <VT,false>& rhs );
280 template< typename VT > inline
void addAssign( const SparseVector<VT,false>& rhs );
281 template< typename VT > inline
void subAssign( const DenseVector <VT,false>& rhs );
282 template< typename VT > inline
void subAssign( const SparseVector<VT,false>& rhs );
290 inline
size_t extendCapacity() const noexcept;
336 template< typename MT
339 template< typename... RCAs >
340 inline Column<MT,true,false,SF,CCAs...>::Column( MT& matrix, RCAs... args )
341 : DataType( args... )
345 if( matrix_.columns() <=
column() ) {
375 template<
typename MT
378 inline typename Column<MT,
true,
false,SF,CCAs...>::Reference
379 Column<MT,true,false,SF,CCAs...>::operator[](
size_t index )
382 return matrix_(index,
column());
398 template<
typename MT
401 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstReference
402 Column<MT,true,false,SF,CCAs...>::operator[](
size_t index )
const 405 return const_cast<const MT&>( matrix_ )(index,
column());
422 template<
typename MT
425 inline typename Column<MT,
true,
false,SF,CCAs...>::Reference
426 Column<MT,true,false,SF,CCAs...>::at(
size_t index )
428 if( index >=
size() ) {
431 return (*
this)[index];
448 template<
typename MT
451 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstReference
452 Column<MT,true,false,SF,CCAs...>::at(
size_t index )
const 454 if( index >=
size() ) {
457 return (*
this)[index];
471 template<
typename MT
474 inline typename Column<MT,
true,
false,SF,CCAs...>::Iterator
477 return matrix_.begin(
column() );
491 template<
typename MT
494 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstIterator
497 return matrix_.cbegin(
column() );
511 template<
typename MT
514 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstIterator
517 return matrix_.cbegin(
column() );
531 template<
typename MT
534 inline typename Column<MT,
true,
false,SF,CCAs...>::Iterator
537 return matrix_.end(
column() );
551 template<
typename MT
554 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstIterator
557 return matrix_.cend(
column() );
571 template<
typename MT
574 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstIterator
577 return matrix_.cend(
column() );
606 template<
typename MT
609 inline Column<MT,
true,
false,SF,CCAs...>&
610 Column<MT,true,false,SF,CCAs...>::operator=( initializer_list<ElementType> list )
614 if( list.size() >
size() ) {
618 const InitializerVector<ElementType,false> tmp( list,
size() );
620 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
624 decltype(
auto) left( derestrict( *this ) );
651 template< typename MT
654 inline Column<MT,true,false,SF,CCAs...>&
655 Column<MT,true,false,SF,CCAs...>::operator=( const Column& rhs )
663 if(
this == &rhs || ( &matrix_ == &rhs.matrix_ &&
column() == rhs.column() ) )
666 if(
size() != rhs.size() ) {
670 if( !tryAssign( matrix_, rhs, 0UL,
column() ) ) {
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 Column<MT,
true,
false,SF,CCAs...>&
715 Column<MT,true,false,SF,CCAs...>::operator=(
const DenseVector<VT,false>& rhs )
727 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
730 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
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 Column<MT,
true,
false,SF,CCAs...>&
773 Column<MT,true,false,SF,CCAs...>::operator=(
const SparseVector<VT,false>& rhs )
785 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
788 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
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 Column<MT,
true,
false,SF,CCAs...>&
844 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
854 const AddType tmp( *
this + (~rhs) );
856 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
860 decltype(
auto) left( derestrict( *this ) );
887 template< typename MT
890 template< typename VT >
891 inline Column<MT,true,false,SF,CCAs...>&
892 Column<MT,true,false,SF,CCAs...>::operator+=( const SparseVector<VT,false>& rhs )
903 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
913 const AddType tmp( *
this + (~rhs) );
915 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
919 decltype(
auto) left( derestrict( *this ) );
948 template< typename MT
951 template< typename VT >
952 inline Column<MT,true,false,SF,CCAs...>&
953 Column<MT,true,false,SF,CCAs...>::operator-=( const DenseVector<VT,false>& rhs )
964 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
974 const SubType tmp( *
this - (~rhs) );
976 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
980 decltype(
auto) left( derestrict( *this ) );
1008 template< typename MT
1011 template< typename VT >
1012 inline Column<MT,true,false,SF,CCAs...>&
1013 Column<MT,true,false,SF,CCAs...>::operator-=( const SparseVector<VT,false>& 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, 0UL,
column() ) ) {
1040 decltype(
auto) left( derestrict( *this ) );
1044 assign( left, tmp );
1067 template< typename MT
1070 template< typename VT >
1071 inline Column<MT,true,false,SF,CCAs...>&
1072 Column<MT,true,false,SF,CCAs...>::operator*=( const Vector<VT,false>& 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, 0UL,
column() ) ) {
1097 decltype(
auto) left( derestrict( *this ) );
1100 assign( left, tmp );
1122 template< typename MT
1125 template< typename VT >
1126 inline Column<MT,true,false,SF,CCAs...>&
1127 Column<MT,true,false,SF,CCAs...>::operator/=( const DenseVector<VT,false>& 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, 0UL,
column() ) ) {
1154 decltype(
auto) left( derestrict( *this ) );
1157 assign( left, tmp );
1180 template< typename MT
1183 template< typename VT >
1184 inline Column<MT,true,false,SF,CCAs...>&
1185 Column<MT,true,false,SF,CCAs...>::operator%=( const Vector<VT,false>& 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, 0UL,
column() ) ) {
1208 decltype(
auto) left( derestrict( *this ) );
1211 assign( left, tmp );
1235 template< typename MT
1238 inline MT& Column<MT,true,false,SF,CCAs...>::operand() noexcept
1252 template<
typename MT
1255 inline const MT& Column<MT,true,false,SF,CCAs...>::operand() const noexcept
1269 template<
typename MT
1274 return matrix_.rows();
1286 template<
typename MT
1291 return matrix_.capacity(
column() );
1306 template<
typename MT
1311 return matrix_.nonZeros(
column() );
1323 template<
typename MT
1328 matrix_.reset(
column() );
1344 template<
typename MT
1347 void Column<MT,true,false,SF,CCAs...>::reserve(
size_t n )
1349 matrix_.reserve(
column(), n );
1364 template<
typename MT
1367 inline size_t Column<MT,true,false,SF,CCAs...>::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 Column<MT,
true,
false,SF,CCAs...>::Iterator
1410 return matrix_.set( index,
column(), value );
1429 template<
typename MT
1432 inline typename Column<MT,
true,
false,SF,CCAs...>::Iterator
1433 Column<MT,true,false,SF,CCAs...>::insert(
size_t index,
const ElementType& value )
1435 return matrix_.insert( index,
column(), value );
1466 template<
typename MT
1469 inline void Column<MT,true,false,SF,CCAs...>::append(
size_t index,
const ElementType& value,
bool check )
1471 matrix_.append( index,
column(), value, check );
1494 template<
typename MT
1497 inline void Column<MT,true,false,SF,CCAs...>::erase(
size_t index )
1499 matrix_.erase( index,
column() );
1514 template<
typename MT
1517 inline typename Column<MT,
true,
false,SF,CCAs...>::Iterator
1518 Column<MT,true,false,SF,CCAs...>::erase( Iterator pos )
1520 return matrix_.erase(
column(), pos );
1536 template<
typename MT
1539 inline typename Column<MT,
true,
false,SF,CCAs...>::Iterator
1540 Column<MT,true,false,SF,CCAs...>::erase( Iterator first, Iterator last )
1542 return matrix_.erase(
column(), first, last );
1571 template<
typename MT
1574 template<
typename Pred
1576 inline void Column<MT,true,false,SF,CCAs...>::erase( Pred predicate )
1609 template<
typename MT
1612 template<
typename Pred >
1613 inline void Column<MT,true,false,SF,CCAs...>::erase( Iterator first, Iterator last, Pred predicate )
1615 matrix_.erase(
column(), first, last, predicate );
1643 template<
typename MT
1646 inline typename Column<MT,
true,
false,SF,CCAs...>::Iterator
1647 Column<MT,true,false,SF,CCAs...>::find(
size_t index )
1649 return matrix_.find( index,
column() );
1669 template<
typename MT
1672 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstIterator
1673 Column<MT,true,false,SF,CCAs...>::find(
size_t index )
const 1675 return matrix_.find( index,
column() );
1694 template<
typename MT
1697 inline typename Column<MT,
true,
false,SF,CCAs...>::Iterator
1698 Column<MT,true,false,SF,CCAs...>::lowerBound(
size_t index )
1700 return matrix_.lowerBound( index,
column() );
1719 template<
typename MT
1722 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstIterator
1723 Column<MT,true,false,SF,CCAs...>::lowerBound(
size_t index )
const 1725 return matrix_.lowerBound( index,
column() );
1744 template<
typename MT
1747 inline typename Column<MT,
true,
false,SF,CCAs...>::Iterator
1748 Column<MT,true,false,SF,CCAs...>::upperBound(
size_t index )
1750 return matrix_.upperBound( index,
column() );
1769 template<
typename MT
1772 inline typename Column<MT,
true,
false,SF,CCAs...>::ConstIterator
1773 Column<MT,true,false,SF,CCAs...>::upperBound(
size_t index )
const 1775 return matrix_.upperBound( index,
column() );
1802 template<
typename MT
1805 template<
typename Other >
1806 inline Column<MT,
true,
false,SF,CCAs...>&
1807 Column<MT,true,false,SF,CCAs...>::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 Column<MT,true,false,SF,CCAs...>::canAlias(
const Other* alias )
const noexcept
1844 return matrix_.isAliased( alias );
1861 template<
typename MT
1864 template<
typename Other >
1865 inline bool Column<MT,true,false,SF,CCAs...>::isAliased(
const Other* alias )
const noexcept
1867 return matrix_.isAliased( alias );
1885 template<
typename MT
1888 template<
typename VT >
1889 inline void Column<MT,true,false,SF,CCAs...>::assign(
const DenseVector<VT,false>& rhs )
1894 for(
size_t i=0UL; i<
size(); ++i )
1896 if( matrix_.nonZeros(
column() ) == matrix_.capacity(
column() ) )
1897 matrix_.reserve(
column(), extendCapacity() );
1899 matrix_.append( i,
column(), (~rhs)[i],
true );
1918 template<
typename MT
1921 template<
typename VT >
1922 inline void Column<MT,true,false,SF,CCAs...>::assign(
const SparseVector<VT,false>& rhs )
1927 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
1928 matrix_.append( element->index(),
column(), element->value(), true );
1947 template<
typename MT
1950 template<
typename VT >
1951 inline void Column<MT,true,false,SF,CCAs...>::addAssign(
const DenseVector<VT,false>& rhs )
1953 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
1961 const AddType tmp(
serial( *
this + (~rhs) ) );
1962 matrix_.reset(
column() );
1981 template<
typename MT
1984 template<
typename VT >
1985 inline void Column<MT,true,false,SF,CCAs...>::addAssign(
const SparseVector<VT,false>& rhs )
1987 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
1995 const AddType tmp(
serial( *
this + (~rhs) ) );
1996 matrix_.reset(
column() );
1997 matrix_.reserve(
column(), tmp.nonZeros() );
2016 template<
typename MT
2019 template<
typename VT >
2020 inline void Column<MT,true,false,SF,CCAs...>::subAssign(
const DenseVector<VT,false>& rhs )
2022 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
2030 const SubType tmp(
serial( *
this - (~rhs) ) );
2031 matrix_.reset(
column() );
2050 template<
typename MT
2053 template<
typename VT >
2054 inline void Column<MT,true,false,SF,CCAs...>::subAssign(
const SparseVector<VT,false>& rhs )
2056 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
2064 const SubType tmp(
serial( *
this - (~rhs) ) );
2065 matrix_.reset(
column() );
2066 matrix_.reserve(
column(), tmp.nonZeros() );
2093 template<
typename MT
2095 class Column<MT,false,false,false,CCAs...>
2096 :
public View< SparseVector< Column<MT,false,false,false,CCAs...>, false > >
2097 ,
private ColumnData<CCAs...>
2101 using DataType = ColumnData<CCAs...>;
2102 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
2108 using This = Column<MT,
false,
false,
false,CCAs...>;
2110 using BaseType = SparseVector<This,false>;
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 Column&;
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 ColumnElement( IteratorType pos,
size_t row )
2152 template<
typename T >
inline ColumnElement& operator=(
const T& v ) {
2164 template<
typename T >
inline ColumnElement&
operator+=(
const T& v ) {
2176 template<
typename T >
inline ColumnElement&
operator-=(
const T& v ) {
2188 template<
typename T >
inline ColumnElement&
operator*=(
const T& v ) {
2200 template<
typename T >
inline ColumnElement&
operator/=(
const T& v ) {
2211 inline const ColumnElement* 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 >
2249 class ColumnIterator
2253 using IteratorCategory = std::forward_iterator_tag;
2254 using ValueType = ColumnElement<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 ColumnIterator()
2271 : matrix_( nullptr )
2285 inline ColumnIterator( MatrixType& matrix,
size_t row,
size_t column )
2286 : matrix_( &matrix )
2291 for( ; row_<matrix_->rows(); ++row_ ) {
2292 pos_ = matrix_->find( row_, column_ );
2293 if( pos_ != matrix_->end( row_ ) )
break;
2306 inline ColumnIterator( MatrixType& matrix,
size_t row,
size_t column, IteratorType pos )
2307 : matrix_( &matrix )
2321 template<
typename MatrixType2,
typename IteratorType2 >
2322 inline ColumnIterator(
const ColumnIterator<MatrixType2,IteratorType2>& it )
2323 : matrix_( it.matrix_ )
2325 , column_( it.column_ )
2335 inline ColumnIterator& operator++() {
2337 for( ; row_<matrix_->rows(); ++row_ ) {
2338 pos_ = matrix_->find( row_, column_ );
2339 if( pos_ != matrix_->end( row_ ) )
break;
2351 inline const ColumnIterator operator++(
int ) {
2352 const ColumnIterator tmp( *
this );
2363 inline ReferenceType
operator*()
const {
2364 return ReferenceType( pos_, row_ );
2373 inline PointerType operator->()
const {
2374 return PointerType( pos_, row_ );
2384 template<
typename MatrixType2,
typename IteratorType2 >
2385 inline bool operator==(
const ColumnIterator<MatrixType2,IteratorType2>& rhs )
const {
2386 return row_ == rhs.row_;
2396 template<
typename MatrixType2,
typename IteratorType2 >
2397 inline bool operator!=(
const ColumnIterator<MatrixType2,IteratorType2>& rhs )
const {
2398 return !( *
this == rhs );
2408 inline DifferenceType
operator-(
const ColumnIterator& rhs )
const {
2409 size_t counter( 0UL );
2410 for(
size_t i=rhs.row_; i<row_; ++i ) {
2411 if( matrix_->find( i, column_ ) != matrix_->end( i ) )
2420 MatrixType* matrix_;
2427 template<
typename MatrixType2,
typename IteratorType2 >
friend class ColumnIterator;
2428 template<
typename MT2,
bool SO2,
bool DF2,
bool SF2,
size_t... CCAs2 >
friend class Column;
2435 using ConstIterator = ColumnIterator< const MT, ConstIterator_t<MT> >;
2438 using Iterator = If_t< IsConst_v<MT>, ConstIterator, ColumnIterator< MT, Iterator_t<MT> > >;
2443 static constexpr
bool smpAssignable =
false;
2446 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
2452 template<
typename... RCAs >
2453 explicit inline Column( MT& matrix, RCAs... args );
2455 Column(
const Column& ) =
default;
2462 ~Column() =
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 Column& operator=( initializer_list<ElementType> list );
2486 inline Column& operator=(
const Column& rhs );
2488 template<
typename VT >
inline Column& operator= (
const Vector<VT,false>& rhs );
2489 template<
typename VT >
inline Column&
operator+=(
const Vector<VT,false>& rhs );
2490 template<
typename VT >
inline Column&
operator-=(
const Vector<VT,false>& rhs );
2491 template<
typename VT >
inline Column&
operator*=(
const Vector<VT,false>& rhs );
2492 template<
typename VT >
inline Column&
operator/=(
const DenseVector<VT,false>& rhs );
2493 template<
typename VT >
inline Column& operator%=(
const Vector<VT,false>& rhs );
2502 inline MT& operand() noexcept;
2503 inline const MT& operand() const noexcept;
2505 inline
size_t size() const;
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 Column& scale( const Other& scalar );
2559 template< typename Other > inline
bool canAlias ( const Other* alias ) const;
2560 template< typename Other > inline
bool isAliased( const Other* alias ) const;
2562 template< typename VT > inline
void assign ( const DenseVector <VT,false>& rhs );
2563 template< typename VT > inline
void assign ( const SparseVector<VT,false>& rhs );
2564 template< typename VT > inline
void addAssign( const Vector<VT,false>& rhs );
2565 template< typename VT > inline
void subAssign( const Vector<VT,false>& rhs );
2613 template< typename MT
2615 template< typename... RCAs >
2616 inline Column<MT,false,false,false,CCAs...>::Column( MT& matrix, RCAs... args )
2617 : DataType( args... )
2618 , matrix_ ( matrix )
2621 if( matrix_.columns() <=
column() ) {
2651 template<
typename MT
2653 inline typename Column<MT,
false,
false,
false,CCAs...>::Reference
2654 Column<MT,false,false,false,CCAs...>::operator[](
size_t index )
2657 return matrix_(index,
column());
2673 template<
typename MT
2675 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstReference
2676 Column<MT,false,false,false,CCAs...>::operator[](
size_t index )
const 2679 return const_cast<const MT&>( matrix_ )(index,
column());
2696 template<
typename MT
2698 inline typename Column<MT,
false,
false,
false,CCAs...>::Reference
2699 Column<MT,false,false,false,CCAs...>::at(
size_t index )
2701 if( index >=
size() ) {
2704 return (*
this)[index];
2721 template<
typename MT
2723 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstReference
2724 Column<MT,false,false,false,CCAs...>::at(
size_t index )
const 2726 if( index >=
size() ) {
2729 return (*
this)[index];
2743 template<
typename MT
2745 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
2748 return Iterator( matrix_, 0UL,
column() );
2762 template<
typename MT
2764 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstIterator
2767 return ConstIterator( matrix_, 0UL,
column() );
2781 template<
typename MT
2783 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstIterator
2786 return ConstIterator( matrix_, 0UL,
column() );
2800 template<
typename MT
2802 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
2805 return Iterator( matrix_,
size(),
column() );
2819 template<
typename MT
2821 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstIterator
2824 return ConstIterator( matrix_,
size(),
column() );
2838 template<
typename MT
2840 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstIterator
2843 return ConstIterator( matrix_,
size(),
column() );
2872 template<
typename MT
2874 inline Column<MT,
false,
false,
false,CCAs...>&
2875 Column<MT,false,false,false,CCAs...>::operator=( initializer_list<ElementType> list )
2877 using blaze::assign;
2879 if( list.size() >
size() ) {
2883 const InitializerVector<ElementType,false> tmp( list,
size() );
2885 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
2889 decltype(
auto) left( derestrict( *this ) );
2891 assign( left, tmp );
2915 template< typename MT
2917 inline Column<MT,false,false,false,CCAs...>&
2918 Column<MT,false,false,false,CCAs...>::operator=( const Column& rhs )
2920 using blaze::assign;
2926 if(
this == &rhs || ( &matrix_ == &rhs.matrix_ &&
column() == rhs.column() ) )
2929 if(
size() != rhs.size() ) {
2933 if( !tryAssign( matrix_, rhs, 0UL,
column() ) ) {
2937 decltype(
auto) left( derestrict( *this ) );
2939 if( rhs.canAlias( &matrix_ ) ) {
2940 const ResultType tmp( rhs );
2941 assign( left, tmp );
2944 assign( left, rhs );
2969 template<
typename MT
2971 template<
typename VT >
2972 inline Column<MT,
false,
false,
false,CCAs...>&
2973 Column<MT,false,false,false,CCAs...>::operator=(
const Vector<VT,false>& rhs )
2975 using blaze::assign;
2981 const CompositeType_t<VT> tmp( ~rhs );
2983 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
2987 decltype(
auto) left( derestrict( *this ) );
2989 assign( left, tmp );
3013 template< typename MT
3015 template< typename VT >
3016 inline Column<MT,false,false,false,CCAs...>&
3017 Column<MT,false,false,false,CCAs...>::operator+=( const Vector<VT,false>& rhs )
3019 using blaze::assign;
3027 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
3036 const AddType tmp( *
this + (~rhs) );
3038 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
3042 decltype(
auto) left( derestrict( *this ) );
3044 assign( left, tmp );
3068 template< typename MT
3070 template< typename VT >
3071 inline Column<MT,false,false,false,CCAs...>&
3072 Column<MT,false,false,false,CCAs...>::operator-=( const Vector<VT,false>& rhs )
3074 using blaze::assign;
3082 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
3091 const SubType tmp( *
this - (~rhs) );
3093 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
3097 decltype(
auto) left( derestrict( *this ) );
3099 assign( left, tmp );
3122 template< typename MT
3124 template< typename VT >
3125 inline Column<MT,false,false,false,CCAs...>&
3126 Column<MT,false,false,false,CCAs...>::operator*=( const Vector<VT,false>& rhs )
3128 using blaze::assign;
3136 using MultType = MultTrait_t< ResultType, ResultType_t<VT> >;
3145 const MultType tmp( *
this * (~rhs) );
3147 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
3151 decltype(
auto) left( derestrict( *this ) );
3153 assign( left, tmp );
3175 template< typename MT
3177 template< typename VT >
3178 inline Column<MT,false,false,false,CCAs...>&
3179 Column<MT,false,false,false,CCAs...>::operator/=( const DenseVector<VT,false>& rhs )
3181 using blaze::assign;
3190 using DivType = DivTrait_t< ResultType, ResultType_t<VT> >;
3200 const DivType tmp( *
this / (~rhs) );
3202 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
3206 decltype(
auto) left( derestrict( *this ) );
3208 assign( left, tmp );
3231 template< typename MT
3233 template< typename VT >
3234 inline Column<MT,false,false,false,CCAs...>&
3235 Column<MT,false,false,false,CCAs...>::operator%=( const Vector<VT,false>& rhs )
3237 using blaze::assign;
3242 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
3248 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
3252 const CrossType tmp( *
this % (~rhs) );
3254 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
3258 decltype(
auto) left( derestrict( *this ) );
3260 assign( left, tmp );
3284 template< typename MT
3286 inline MT& Column<MT,false,false,false,CCAs...>::operand() noexcept
3300 template<
typename MT
3302 inline const MT& Column<MT,false,false,false,CCAs...>::operand() const noexcept
3316 template<
typename MT
3320 return matrix_.rows();
3332 template<
typename MT
3336 return matrix_.rows();
3351 template<
typename MT
3355 size_t counter( 0UL );
3356 for( ConstIterator element=
begin(); element!=
end(); ++element ) {
3371 template<
typename MT
3375 const size_t ibegin( ( IsLower_v<MT> )
3376 ?( ( IsUniLower_v<MT> || IsStrictlyLower_v<MT> )
3380 const size_t iend ( ( IsUpper_v<MT> )
3381 ?( ( IsUniUpper_v<MT> || IsStrictlyUpper_v<MT> )
3386 for(
size_t i=ibegin; i<iend; ++i ) {
3387 matrix_.erase( i,
column() );
3404 template<
typename MT
3406 void Column<MT,false,false,false,CCAs...>::reserve(
size_t n )
3436 template<
typename MT
3438 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
3441 return Iterator( matrix_, index,
column(), matrix_.set( index,
column(), value ) );
3460 template<
typename MT
3462 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
3463 Column<MT,false,false,false,CCAs...>::insert(
size_t index,
const ElementType& value )
3465 return Iterator( matrix_, index,
column(), matrix_.insert( index,
column(), value ) );
3496 template<
typename MT
3498 inline void Column<MT,false,false,false,CCAs...>::append(
size_t index,
const ElementType& value,
bool check )
3500 if( !check || !isDefault<strict>( value ) )
3501 matrix_.insert( index,
column(), value );
3524 template<
typename MT
3526 inline void Column<MT,false,false,false,CCAs...>::erase(
size_t index )
3528 matrix_.erase( index,
column() );
3543 template<
typename MT
3545 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
3546 Column<MT,false,false,false,CCAs...>::erase( Iterator pos )
3548 const size_t row( pos.row_ );
3553 matrix_.erase(
row, pos.pos_ );
3554 return Iterator( matrix_,
row+1UL,
column() );
3570 template<
typename MT
3572 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
3573 Column<MT,false,false,false,CCAs...>::erase( Iterator first, Iterator last )
3575 for( ; first!=last; ++first ) {
3576 matrix_.erase( first.row_, first.pos_ );
3607 template<
typename MT
3609 template<
typename Pred
3611 inline void Column<MT,false,false,false,CCAs...>::erase( Pred predicate )
3613 for( Iterator element=
begin(); element!=
end(); ++element ) {
3614 if( predicate( element->value() ) )
3615 matrix_.erase( element.row_, element.pos_ );
3648 template<
typename MT
3650 template<
typename Pred >
3651 inline void Column<MT,false,false,false,CCAs...>::erase( Iterator first, Iterator last, Pred predicate )
3653 for( ; first!=last; ++first ) {
3654 if( predicate( first->value() ) )
3655 matrix_.erase( first.row_, first.pos_ );
3684 template<
typename MT
3686 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
3687 Column<MT,false,false,false,CCAs...>::find(
size_t index )
3689 const Iterator_t<MT> pos( matrix_.find( index,
column() ) );
3691 if( pos != matrix_.end( index ) )
3692 return Iterator( matrix_, index,
column(), pos );
3714 template<
typename MT
3716 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstIterator
3717 Column<MT,false,false,false,CCAs...>::find(
size_t index )
const 3719 const ConstIterator_t<MT> pos( matrix_.find( index,
column() ) );
3721 if( pos != matrix_.end( index ) )
3722 return ConstIterator( matrix_, index,
column(), pos );
3743 template<
typename MT
3745 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
3746 Column<MT,false,false,false,CCAs...>::lowerBound(
size_t index )
3748 for(
size_t i=index; i<
size(); ++i )
3750 const Iterator_t<MT> pos( matrix_.find( i,
column() ) );
3752 if( pos != matrix_.end( i ) )
3753 return Iterator( matrix_, i,
column(), pos );
3775 template<
typename MT
3777 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstIterator
3778 Column<MT,false,false,false,CCAs...>::lowerBound(
size_t index )
const 3780 for(
size_t i=index; i<
size(); ++i )
3782 const ConstIterator_t<MT> pos( matrix_.find( i,
column() ) );
3784 if( pos != matrix_.end( i ) )
3785 return ConstIterator( matrix_, i,
column(), pos );
3807 template<
typename MT
3809 inline typename Column<MT,
false,
false,
false,CCAs...>::Iterator
3810 Column<MT,false,false,false,CCAs...>::upperBound(
size_t index )
3812 for(
size_t i=index+1UL; i<
size(); ++i )
3814 const Iterator_t<MT> pos( matrix_.find( i,
column() ) );
3816 if( pos != matrix_.end( i ) )
3817 return Iterator( matrix_, i,
column(), pos );
3839 template<
typename MT
3841 inline typename Column<MT,
false,
false,
false,CCAs...>::ConstIterator
3842 Column<MT,false,false,false,CCAs...>::upperBound(
size_t index )
const 3844 for(
size_t i=index+1UL; i<
size(); ++i )
3846 const ConstIterator_t<MT> pos( matrix_.find( i,
column() ) );
3848 if( pos != matrix_.end( i ) )
3849 return ConstIterator( matrix_, i,
column(), pos );
3879 template<
typename MT
3881 template<
typename Other >
3882 inline Column<MT,
false,
false,
false,CCAs...>&
3883 Column<MT,false,false,false,CCAs...>::scale(
const Other& scalar )
3887 for( Iterator element=
begin(); element!=
end(); ++element )
3888 element->value() *= scalar;
3914 template<
typename MT
3916 template<
typename Other >
3917 inline bool Column<MT,false,false,false,CCAs...>::canAlias(
const Other* alias )
const 3919 return matrix_.isAliased( alias );
3932 template<
typename MT
3934 template<
typename Other >
3935 inline bool Column<MT,false,false,false,CCAs...>::isAliased(
const Other* alias )
const 3937 return matrix_.isAliased( alias );
3955 template<
typename MT
3957 template<
typename VT >
3958 inline void Column<MT,false,false,false,CCAs...>::assign(
const DenseVector<VT,false>& rhs )
3962 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
3963 matrix_(i,
column()) = (~rhs)[i];
3982 template<
typename MT
3984 template<
typename VT >
3985 inline void Column<MT,false,false,false,CCAs...>::assign(
const SparseVector<VT,false>& rhs )
3991 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
3992 for( ; i<element->index(); ++i )
3993 matrix_.erase( i,
column() );
3994 matrix_(i++,
column()) = element->value();
3996 for( ; i<
size(); ++i ) {
3997 matrix_.erase( i,
column() );
4016 template<
typename MT
4018 template<
typename VT >
4019 inline void Column<MT,false,false,false,CCAs...>::addAssign(
const Vector<VT,false>& rhs )
4021 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
4028 const AddType tmp(
serial( *
this + (~rhs) ) );
4047 template<
typename MT
4049 template<
typename VT >
4050 inline void Column<MT,false,false,false,CCAs...>::subAssign(
const Vector<VT,false>& rhs )
4052 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
4059 const SubType tmp(
serial( *
this - (~rhs) ) );
4086 template<
typename MT
4088 class Column<MT,false,false,true,CCAs...>
4089 :
public View< SparseVector< Column<MT,false,false,true,CCAs...>, false > >
4090 ,
private ColumnData<CCAs...>
4094 using DataType = ColumnData<CCAs...>;
4095 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
4101 using This = Column<MT,
false,
false,
true,CCAs...>;
4103 using BaseType = SparseVector<This,false>;
4104 using ViewedType = MT;
4106 using TransposeType = TransposeType_t<ResultType>;
4107 using ElementType = ElementType_t<MT>;
4108 using ReturnType = ReturnType_t<MT>;
4109 using CompositeType =
const Column&;
4112 using ConstReference = ConstReference_t<MT>;
4115 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
4118 using ConstIterator = ConstIterator_t<MT>;
4121 using Iterator = If_t< IsConst_v<MT>, ConstIterator, Iterator_t<MT> >;
4126 static constexpr
bool smpAssignable =
false;
4129 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
4135 template<
typename... RCAs >
4136 explicit inline Column( MT& matrix, RCAs... args );
4138 Column(
const Column& ) =
default;
4145 ~Column() =
default;
4152 inline Reference operator[](
size_t index );
4153 inline ConstReference operator[](
size_t index )
const;
4154 inline Reference at(
size_t index );
4155 inline ConstReference at(
size_t index )
const;
4156 inline Iterator
begin ();
4157 inline ConstIterator
begin ()
const;
4158 inline ConstIterator
cbegin()
const;
4159 inline Iterator
end ();
4160 inline ConstIterator
end ()
const;
4161 inline ConstIterator
cend ()
const;
4168 inline Column& operator=( initializer_list<ElementType> list );
4169 inline Column& operator=(
const Column& rhs );
4171 template<
typename VT >
inline Column& operator= (
const DenseVector<VT,false>& rhs );
4172 template<
typename VT >
inline Column& operator= (
const SparseVector<VT,false>& rhs );
4173 template<
typename VT >
inline Column&
operator+=(
const DenseVector<VT,false>& rhs );
4174 template<
typename VT >
inline Column&
operator+=(
const SparseVector<VT,false>& rhs );
4175 template<
typename VT >
inline Column&
operator-=(
const DenseVector<VT,false>& rhs );
4176 template<
typename VT >
inline Column&
operator-=(
const SparseVector<VT,false>& rhs );
4177 template<
typename VT >
inline Column&
operator*=(
const Vector<VT,false>& rhs );
4178 template<
typename VT >
inline Column&
operator/=(
const DenseVector<VT,false>& rhs );
4179 template<
typename VT >
inline Column& operator%=(
const Vector<VT,false>& rhs );
4188 inline MT& operand() noexcept;
4189 inline const MT& operand() const noexcept;
4191 inline
size_t size() const noexcept;
4192 inline
size_t capacity() const noexcept;
4194 inline
void reset();
4195 inline
void reserve(
size_t n );
4202 inline Iterator
set (
size_t index, const ElementType& value );
4203 inline Iterator insert(
size_t index, const ElementType& value );
4204 inline
void append(
size_t index, const ElementType& value,
bool check=false );
4211 inline
void erase(
size_t index );
4212 inline Iterator erase( Iterator pos );
4213 inline Iterator erase( Iterator first, Iterator last );
4216 inline
void erase( Pred predicate );
4218 template< typename Pred >
4219 inline
void erase( Iterator first, Iterator last, Pred predicate );
4226 inline Iterator find (
size_t index );
4227 inline ConstIterator find (
size_t index ) const;
4228 inline Iterator lowerBound(
size_t index );
4229 inline ConstIterator lowerBound(
size_t index ) const;
4230 inline Iterator upperBound(
size_t index );
4231 inline ConstIterator upperBound(
size_t index ) const;
4238 template< typename Other > inline Column& scale( const Other& scalar );
4245 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
4246 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
4248 template< typename VT > inline
void assign ( const DenseVector <VT,false>& rhs );
4249 template< typename VT > inline
void assign ( const SparseVector<VT,false>& rhs );
4250 template< typename VT > inline
void addAssign( const DenseVector <VT,false>& rhs );
4251 template< typename VT > inline
void addAssign( const SparseVector<VT,false>& rhs );
4252 template< typename VT > inline
void subAssign( const DenseVector <VT,false>& rhs );
4253 template< typename VT > inline
void subAssign( const SparseVector<VT,false>& rhs );
4261 inline
size_t extendCapacity() const noexcept;
4308 template< typename MT
4310 template< typename... RCAs >
4311 inline Column<MT,false,false,true,CCAs...>::Column( MT& matrix, RCAs... args )
4312 : DataType( args... )
4313 , matrix_ ( matrix )
4316 if( matrix_.columns() <=
column() ) {
4346 template<
typename MT
4348 inline typename Column<MT,
false,
false,
true,CCAs...>::Reference
4349 Column<MT,false,false,true,CCAs...>::operator[](
size_t index )
4352 return matrix_(
column(),index);
4368 template<
typename MT
4370 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstReference
4371 Column<MT,false,false,true,CCAs...>::operator[](
size_t index )
const 4374 return const_cast<const MT&>( matrix_ )(
column(),index);
4391 template<
typename MT
4393 inline typename Column<MT,
false,
false,
true,CCAs...>::Reference
4394 Column<MT,false,false,true,CCAs...>::at(
size_t index )
4396 if( index >=
size() ) {
4399 return (*
this)[index];
4416 template<
typename MT
4418 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstReference
4419 Column<MT,false,false,true,CCAs...>::at(
size_t index )
const 4421 if( index >=
size() ) {
4424 return (*
this)[index];
4438 template<
typename MT
4440 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
4443 return matrix_.begin(
column() );
4457 template<
typename MT
4459 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstIterator
4462 return matrix_.cbegin(
column() );
4476 template<
typename MT
4478 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstIterator
4481 return matrix_.cbegin(
column() );
4495 template<
typename MT
4497 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
4500 return matrix_.end(
column() );
4514 template<
typename MT
4516 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstIterator
4519 return matrix_.cend(
column() );
4533 template<
typename MT
4535 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstIterator
4538 return matrix_.cend(
column() );
4567 template<
typename MT
4569 inline Column<MT,
false,
false,
true,CCAs...>&
4570 Column<MT,false,false,true,CCAs...>::operator=( initializer_list<ElementType> list )
4572 using blaze::assign;
4574 if( list.size() >
size() ) {
4578 const InitializerVector<ElementType,false> tmp( list,
size() );
4580 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
4584 decltype(
auto) left( derestrict( *this ) );
4587 assign( left, tmp );
4611 template< typename MT
4613 inline Column<MT,false,false,true,CCAs...>&
4614 Column<MT,false,false,true,CCAs...>::operator=( const Column& rhs )
4616 using blaze::assign;
4622 if(
this == &rhs || ( &matrix_ == &rhs.matrix_ &&
column() == rhs.column() ) )
4625 if(
size() != rhs.size() ) {
4629 if( !tryAssign( matrix_, rhs, 0UL,
column() ) ) {
4633 decltype(
auto) left( derestrict( *this ) );
4635 if( rhs.canAlias( &matrix_ ) ) {
4636 const ResultType tmp( rhs );
4638 left.reserve( tmp.nonZeros() );
4639 assign( left, tmp );
4643 left.reserve( rhs.nonZeros() );
4644 assign( left, rhs );
4669 template<
typename MT
4671 template<
typename VT >
4672 inline Column<MT,
false,
false,
true,CCAs...>&
4673 Column<MT,false,false,true,CCAs...>::operator=(
const DenseVector<VT,false>& rhs )
4675 using blaze::assign;
4685 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4686 Right right( ~rhs );
4688 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
4692 decltype(
auto) left( derestrict( *this ) );
4695 const ResultType_t<VT> tmp( right );
4697 assign( left, tmp );
4701 assign( left, right );
4726 template<
typename MT
4728 template<
typename VT >
4729 inline Column<MT,
false,
false,
true,CCAs...>&
4730 Column<MT,false,false,true,CCAs...>::operator=(
const SparseVector<VT,false>& rhs )
4732 using blaze::assign;
4742 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4743 Right right( ~rhs );
4745 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
4749 decltype(
auto) left( derestrict( *this ) );
4752 const ResultType_t<VT> tmp( right);
4754 left.reserve( tmp.nonZeros() );
4755 assign( left, tmp );
4759 left.reserve( right.nonZeros() );
4760 assign( left, right );
4785 template<
typename MT
4787 template<
typename VT >
4788 inline Column<MT,
false,
false,
true,CCAs...>&
4791 using blaze::assign;
4800 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
4810 const AddType tmp( *
this + (~rhs) );
4812 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
4816 decltype(
auto) left( derestrict( *this ) );
4819 assign( left, tmp );
4843 template< typename MT
4845 template< typename VT >
4846 inline Column<MT,false,false,true,CCAs...>&
4847 Column<MT,false,false,true,CCAs...>::operator+=( const SparseVector<VT,false>& rhs )
4849 using blaze::assign;
4858 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
4868 const AddType tmp( *
this + (~rhs) );
4870 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
4874 decltype(
auto) left( derestrict( *this ) );
4878 assign( left, tmp );
4903 template< typename MT
4905 template< typename VT >
4906 inline Column<MT,false,false,true,CCAs...>&
4907 Column<MT,false,false,true,CCAs...>::operator-=( const DenseVector<VT,false>& rhs )
4909 using blaze::assign;
4918 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
4928 const SubType tmp( *
this - (~rhs) );
4930 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
4934 decltype(
auto) left( derestrict( *this ) );
4937 assign( left, tmp );
4962 template< typename MT
4964 template< typename VT >
4965 inline Column<MT,false,false,true,CCAs...>&
4966 Column<MT,false,false,true,CCAs...>::operator-=( const SparseVector<VT,false>& rhs )
4968 using blaze::assign;
4977 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
4987 const SubType tmp( *
this - (~rhs) );
4989 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
4993 decltype(
auto) left( derestrict( *this ) );
4997 assign( left, tmp );
5020 template< typename MT
5022 template< typename VT >
5023 inline Column<MT,false,false,true,CCAs...>&
5024 Column<MT,false,false,true,CCAs...>::operator*=( const Vector<VT,false>& rhs )
5026 using blaze::assign;
5034 using MultType = MultTrait_t< ResultType, ResultType_t<VT> >;
5043 const MultType tmp( *
this * (~rhs) );
5045 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
5049 decltype(
auto) left( derestrict( *this ) );
5052 assign( left, tmp );
5074 template< typename MT
5076 template< typename VT >
5077 inline Column<MT,false,false,true,CCAs...>&
5078 Column<MT,false,false,true,CCAs...>::operator/=( const DenseVector<VT,false>& rhs )
5080 using blaze::assign;
5089 using DivType = DivTrait_t< ResultType, ResultType_t<VT> >;
5099 const DivType tmp( *
this / (~rhs) );
5101 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
5105 decltype(
auto) left( derestrict( *this ) );
5108 assign( left, tmp );
5131 template< typename MT
5133 template< typename VT >
5134 inline Column<MT,false,false,true,CCAs...>&
5135 Column<MT,false,false,true,CCAs...>::operator%=( const Vector<VT,false>& rhs )
5137 using blaze::assign;
5142 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
5148 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
5152 const CrossType tmp( *
this % (~rhs) );
5154 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
5158 decltype(
auto) left( derestrict( *this ) );
5161 assign( left, tmp );
5185 template< typename MT
5187 inline MT& Column<MT,false,false,true,CCAs...>::operand() noexcept
5201 template<
typename MT
5203 inline const MT& Column<MT,false,false,true,CCAs...>::operand() const noexcept
5217 template<
typename MT
5221 return matrix_.rows();
5233 template<
typename MT
5237 return matrix_.capacity(
column() );
5252 template<
typename MT
5256 return matrix_.nonZeros(
column() );
5268 template<
typename MT
5272 matrix_.reset(
column() );
5288 template<
typename MT
5290 void Column<MT,false,false,true,CCAs...>::reserve(
size_t n )
5292 matrix_.reserve(
column(), n );
5307 template<
typename MT
5309 inline size_t Column<MT,false,false,true,CCAs...>::extendCapacity() const noexcept
5314 size_t nonzeros( 2UL*
capacity()+1UL );
5315 nonzeros =
max( nonzeros, 7UL );
5316 nonzeros =
min( nonzeros,
size() );
5346 template<
typename MT
5348 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
5351 return matrix_.set(
column(), index, value );
5370 template<
typename MT
5372 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
5373 Column<MT,false,false,true,CCAs...>::insert(
size_t index,
const ElementType& value )
5375 return matrix_.insert(
column(), index, value );
5406 template<
typename MT
5408 inline void Column<MT,false,false,true,CCAs...>::append(
size_t index,
const ElementType& value,
bool check )
5410 matrix_.append(
column(), index, value, check );
5433 template<
typename MT
5435 inline void Column<MT,false,false,true,CCAs...>::erase(
size_t index )
5437 matrix_.erase(
column(), index );
5452 template<
typename MT
5454 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
5455 Column<MT,false,false,true,CCAs...>::erase( Iterator pos )
5457 return matrix_.erase(
column(), pos );
5473 template<
typename MT
5475 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
5476 Column<MT,false,false,true,CCAs...>::erase( Iterator first, Iterator last )
5478 return matrix_.erase(
column(), first, last );
5507 template<
typename MT
5509 template<
typename Pred
5511 inline void Column<MT,false,false,true,CCAs...>::erase( Pred predicate )
5544 template<
typename MT
5546 template<
typename Pred >
5547 inline void Column<MT,false,false,true,CCAs...>::erase( Iterator first, Iterator last, Pred predicate )
5549 matrix_.erase(
column(), first, last, predicate );
5577 template<
typename MT
5579 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
5580 Column<MT,false,false,true,CCAs...>::find(
size_t index )
5582 return matrix_.find(
column(), index );
5602 template<
typename MT
5604 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstIterator
5605 Column<MT,false,false,true,CCAs...>::find(
size_t index )
const 5607 return matrix_.find(
column(), index );
5626 template<
typename MT
5628 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
5629 Column<MT,false,false,true,CCAs...>::lowerBound(
size_t index )
5631 return matrix_.lowerBound(
column(), index );
5650 template<
typename MT
5652 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstIterator
5653 Column<MT,false,false,true,CCAs...>::lowerBound(
size_t index )
const 5655 return matrix_.lowerBound(
column(), index );
5674 template<
typename MT
5676 inline typename Column<MT,
false,
false,
true,CCAs...>::Iterator
5677 Column<MT,false,false,true,CCAs...>::upperBound(
size_t index )
5679 return matrix_.upperBound(
column(), index );
5698 template<
typename MT
5700 inline typename Column<MT,
false,
false,
true,CCAs...>::ConstIterator
5701 Column<MT,false,false,true,CCAs...>::upperBound(
size_t index )
const 5703 return matrix_.upperBound(
column(), index );
5730 template<
typename MT
5732 template<
typename Other >
5733 inline Column<MT,
false,
false,
true,CCAs...>&
5734 Column<MT,false,false,true,CCAs...>::scale(
const Other& scalar )
5738 for( Iterator element=
begin(); element!=
end(); ++element )
5739 element->value() *= scalar;
5765 template<
typename MT
5767 template<
typename Other >
5768 inline bool Column<MT,false,false,true,CCAs...>::canAlias(
const Other* alias )
const noexcept
5770 return matrix_.isAliased( alias );
5787 template<
typename MT
5789 template<
typename Other >
5790 inline bool Column<MT,false,false,true,CCAs...>::isAliased(
const Other* alias )
const noexcept
5792 return matrix_.isAliased( alias );
5810 template<
typename MT
5812 template<
typename VT >
5813 inline void Column<MT,false,false,true,CCAs...>::assign(
const DenseVector<VT,false>& rhs )
5818 for(
size_t i=0UL; i<
size(); ++i )
5820 if( matrix_.nonZeros(
column() ) == matrix_.capacity(
column() ) )
5821 matrix_.reserve(
column(), extendCapacity() );
5823 matrix_.append(
column(), i, (~rhs)[i],
true );
5842 template<
typename MT
5844 template<
typename VT >
5845 inline void Column<MT,false,false,true,CCAs...>::assign(
const SparseVector<VT,false>& rhs )
5850 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
5851 matrix_.append(
column(), element->index(), element->value(), true );
5870 template<
typename MT
5872 template<
typename VT >
5873 inline void Column<MT,false,false,true,CCAs...>::addAssign(
const DenseVector<VT,false>& rhs )
5875 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
5883 const AddType tmp(
serial( *
this + (~rhs) ) );
5884 matrix_.reset(
column() );
5903 template<
typename MT
5905 template<
typename VT >
5906 inline void Column<MT,false,false,true,CCAs...>::addAssign(
const SparseVector<VT,false>& rhs )
5908 using AddType = AddTrait_t< ResultType, ResultType_t<VT> >;
5916 const AddType tmp(
serial( *
this + (~rhs) ) );
5917 matrix_.reset(
column() );
5918 matrix_.reserve(
column(), tmp.nonZeros() );
5937 template<
typename MT
5939 template<
typename VT >
5940 inline void Column<MT,false,false,true,CCAs...>::subAssign(
const DenseVector<VT,false>& rhs )
5942 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
5950 const SubType tmp(
serial( *
this - (~rhs) ) );
5951 matrix_.reset(
column() );
5970 template<
typename MT
5972 template<
typename VT >
5973 inline void Column<MT,false,false,true,CCAs...>::subAssign(
const SparseVector<VT,false>& rhs )
5975 using SubType = SubTrait_t< ResultType, ResultType_t<VT> >;
5983 const SubType tmp(
serial( *
this - (~rhs) ) );
5984 matrix_.reset(
column() );
5985 matrix_.reserve(
column(), 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
#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.
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a column dense or sparse vector type...
Definition: ColumnVector.h:61
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
Header file for the implementation of the Column base template.
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 transpose flag of vector types.
Constraint on the data type.
typename ColumnTrait< MT, CCAs... >::Type ColumnTrait_t
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_t alias declaration provid...
Definition: ColumnTrait.h:170
Headerfile for the generic max algorithm.
Header file for the DisableIf class 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
Header file for the column trait.
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
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 implementation of the ColumnData class template.
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
Header file for the IsExpression type trait class.
Constraint on the data type.