35#ifndef _BLAZE_MATH_VIEWS_COLUMN_H_
36#define _BLAZE_MATH_VIEWS_COLUMN_H_
141 using ReturnType = Column_<MT,I>;
142 return ReturnType( *matrix, args... );
190 using ReturnType =
const Column_<const MT,I>;
191 return ReturnType( *matrix, args... );
218 using ReturnType = Column_<MT,I>;
219 return ReturnType( *matrix, args... );
267 using ReturnType = Column_<MT>;
268 return ReturnType( *matrix, index, args... );
316 using ReturnType =
const Column_<const MT>;
317 return ReturnType( *matrix, index, args... );
344 using ReturnType = Column_<MT>;
345 return ReturnType( *matrix, index, args... );
371template<
size_t... CCAs
374inline decltype(
auto)
column(
const MatMatAddExpr<MT>& matrix, RCAs... args )
378 return column<CCAs...>( (*matrix).leftOperand(), args... ) +
379 column<CCAs...>( (*matrix).rightOperand(), args... );
398template<
size_t... CCAs
405 return column<CCAs...>( (*matrix).leftOperand(), args... ) -
406 column<CCAs...>( (*matrix).rightOperand(), args... );
425template<
size_t... CCAs
432 return column<CCAs...>( (*matrix).leftOperand(), args... ) *
433 column<CCAs...>( (*matrix).rightOperand(), args... );
452template<
size_t... CCAs
459 return (*matrix).leftOperand() *
column<CCAs...>( (*matrix).rightOperand(), args... );
478template<
size_t... CCAs
488 if( (*matrix).columns() <= cd.column() ) {
493 const size_t columns( (*matrix).rightOperand().columns() );
523 if( (*matrix).columns() <= I ) {
528 return (*matrix).leftOperand() * (*matrix).rightOperand()[I];
555 if( (*matrix).columns() <= index ) {
560 return (*matrix).leftOperand() * (*matrix).rightOperand()[index];
579template<
size_t... CCAs
586 return column<CCAs...>( (*matrix).leftOperand(), args... ) * (*matrix).rightOperand();
605template<
size_t... CCAs
612 return column<CCAs...>( (*matrix).leftOperand(), args... ) / (*matrix).rightOperand();
631template<
size_t... CCAs
657template<
size_t... CCAs
666 (*matrix).operation() );
694 if( (*matrix).columns() <= I ) {
699 return map( (*matrix).leftOperand(),
700 blaze::bind2nd( (*matrix).operation(), (*matrix).rightOperand()[I] ) );
727 if( (*matrix).columns() <= index ) {
732 return map( (*matrix).leftOperand(),
733 blaze::bind2nd( (*matrix).operation(), (*matrix).rightOperand()[index] ) );
752template<
size_t... CCAs
778template<
size_t... CCAs
804template<
size_t... CCAs
830template<
size_t... CCAs
856template<
size_t... CCAs
863 return column<CCAs...>( (*matrix).operand(), args... );
882template<
size_t... CCAs
913template<
size_t... CCAs
924 if( (*matrix).columns() <= cd.column() ) {
948template<
size_t... CCAs
960 if( (*matrix).columns() <= cd.column() ) {
986template<
size_t... CCAs
997 if( (*matrix).columns() <= cd.column() ) {
1003 , cd.column() % (*matrix).operand().columns()
1005 , (*matrix).template repetitions<0UL>() );
1054 for(
size_t i=0UL; i<
column.size(); ++i )
1097 for(
const auto& element :
column )
1123template<
typename MT
1128inline bool isIntact(
const Column<MT,SO,DF,SF,CCAs...>&
column )
noexcept
1130 return (
column.column() <
column.operand().columns() &&
1150template<
typename MT1
1158inline bool isSame(
const Column<MT1,SO,DF,SF1,CCAs1...>& a,
1159 const Column<MT2,SO,DF,SF2,CCAs2...>& b )
noexcept
1161 return (
isSame( a.operand(), b.operand() ) && ( a.column() == b.column() ) );
1182template<
typename MT
1188inline bool trySet(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
const ET& value )
1192 return trySet(
column.operand(), index,
column.column(), value );
1214template<
typename MT
1221 trySet(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
const ET& value )
1226 return trySet(
column.operand(), index,
column.column(),
size, 1UL, value );
1247template<
typename MT
1253inline bool tryAdd(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
const ET& value )
1257 return tryAdd(
column.operand(), index,
column.column(), value );
1279template<
typename MT
1286 tryAdd(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
const ET& value )
1291 return tryAdd(
column.operand(), index,
column.column(),
size, 1UL, value );
1312template<
typename MT
1318inline bool trySub(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
const ET& value )
1322 return trySub(
column.operand(), index,
column.column(), value );
1344template<
typename MT
1351 trySub(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
const ET& value )
1356 return trySub(
column.operand(), index,
column.column(),
size, 1UL, value );
1377template<
typename MT
1383inline bool tryMult(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
const ET& value )
1387 return tryMult(
column.operand(), index,
column.column(), value );
1409template<
typename MT
1416 tryMult(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
const ET& value )
1421 return tryMult(
column.operand(), index,
column.column(),
size, 1UL, value );
1442template<
typename MT
1448inline bool tryDiv(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
const ET& value )
1452 return tryDiv(
column.operand(), index,
column.column(), value );
1474template<
typename MT
1481 tryDiv(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
const ET& value )
1486 return tryDiv(
column.operand(), index,
column.column(),
size, 1UL, value );
1507template<
typename MT
1512inline bool tryShift(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
int count )
1516 return tryShift(
column.operand(), index,
column.column(), count );
1538template<
typename MT
1544 tryShift(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
int count )
1549 return tryShift(
column.operand(), index,
column.column(),
size, 1UL, count );
1570template<
typename MT
1576inline bool tryBitand(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
const ET& value )
1580 return tryBitand(
column.operand(), index,
column.column(), value );
1602template<
typename MT
1609 tryBitand(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
const ET& value )
1614 return tryBitand(
column.operand(), index,
column.column(),
size, 1UL, value );
1635template<
typename MT
1641inline bool tryBitor(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
const ET& value )
1645 return tryBitor(
column.operand(), index,
column.column(), value );
1667template<
typename MT
1674 tryBitor(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
const ET& value )
1679 return tryBitor(
column.operand(), index,
column.column(),
size, 1UL, value );
1700template<
typename MT
1706inline bool tryBitxor(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
const ET& value )
1710 return tryBitxor(
column.operand(), index,
column.column(), value );
1732template<
typename MT
1739 tryBitxor(
const Column<MT,SO,DF,SF,CCAs...>&
column,
size_t index,
size_t size,
const ET& value )
1744 return tryBitxor(
column.operand(), index,
column.column(),
size, 1UL, value );
1765template<
typename MT
1771inline bool tryAssign(
const Column<MT,SO,DF,SF,CCAs...>& lhs,
1777 return tryAssign( lhs.operand(), *rhs, index, lhs.column() );
1798template<
typename MT
1804inline bool tryAddAssign(
const Column<MT,SO,SF,SF,CCAs...>& lhs,
1810 return tryAddAssign( lhs.operand(), *rhs, index, lhs.column() );
1831template<
typename MT
1837inline bool trySubAssign(
const Column<MT,SO,DF,SF,CCAs...>& lhs,
1843 return trySubAssign( lhs.operand(), *rhs, index, lhs.column() );
1864template<
typename MT
1870inline bool tryMultAssign(
const Column<MT,SO,DF,SF,CCAs...>& lhs,
1876 return tryMultAssign( lhs.operand(), *rhs, index, lhs.column() );
1897template<
typename MT
1903inline bool tryDivAssign(
const Column<MT,SO,DF,SF,CCAs...>& lhs,
1909 return tryDivAssign( lhs.operand(), *rhs, index, lhs.column() );
1930template<
typename MT
1936inline bool tryShiftAssign(
const Column<MT,SO,SF,SF,CCAs...>& lhs,
1942 return tryShiftAssign( lhs.operand(), *rhs, index, lhs.column() );
1963template<
typename MT
1969inline bool tryBitandAssign(
const Column<MT,SO,SF,SF,CCAs...>& lhs,
1975 return tryBitandAssign( lhs.operand(), *rhs, index, lhs.column() );
1996template<
typename MT
2002inline bool tryBitorAssign(
const Column<MT,SO,SF,SF,CCAs...>& lhs,
2008 return tryBitorAssign( lhs.operand(), *rhs, index, lhs.column() );
2029template<
typename MT
2035inline bool tryBitxorAssign(
const Column<MT,SO,SF,SF,CCAs...>& lhs,
2041 return tryBitxorAssign( lhs.operand(), *rhs, index, lhs.column() );
2062template<
typename MT
2067inline decltype(
auto) derestrict( Column<MT,SO,DF,SF,I>& c )
2090template<
typename MT
2095inline decltype(
auto) derestrict( Column<MT,SO,DF,SF,I>&& c )
2118template<
typename MT
2122inline decltype(
auto) derestrict( Column<MT,SO,DF,SF>& c )
2145template<
typename MT
2149inline decltype(
auto) derestrict( Column<MT,SO,DF,SF>&& c )
2170template<
typename MT
2175inline decltype(
auto) unview( Column<MT,SO,DF,SF,CCAs...>& c )
2196template<
typename MT
2201inline decltype(
auto) unview(
const Column<MT,SO,DF,SF,CCAs...>& c )
2219template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CRAs >
2220struct Size< Column<MT,SO,DF,SF,CRAs...>, 0UL >
2221 :
public Size<MT,0UL>
2237template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CRAs >
2238struct MaxSize< Column<MT,SO,DF,SF,CRAs...>, 0UL >
2255template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs >
2273template<
typename MT,
bool SO,
bool SF,
size_t... CCAs >
2291template<
typename MT,
bool SO,
bool SF,
size_t... CCAs >
2309template<
typename MT,
bool SO,
bool SF,
size_t... CCAs >
2310struct IsAligned< Column<MT,SO,true,SF,CCAs...> >
2311 :
public BoolConstant< IsAligned_v<MT> && ( IsColumnMajorMatrix_v<MT> || IsSymmetric_v<MT> ) >
2327template<
typename MT,
bool SF,
size_t... CCAs >
2345template<
typename MT,
bool SO,
bool SF,
size_t... CCAs >
2346struct IsPadded< Column<MT,SO,true,SF,CCAs...> >
2347 :
BoolConstant< IsPadded_v<MT> && ( IsColumnMajorMatrix_v<MT> || IsSymmetric_v<MT> ) >
2363template<
typename MT,
bool DF,
size_t... CCAs >
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
Header file for run time assertion macros.
Header file for the Bind2nd functor.
Header file for the blaze::checked and blaze::unchecked instances.
Header file for the implementation of the ColumnData class template.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the HasConstDataAccess type trait.
Header file for the HasMutableDataAccess type trait.
Header file for the IntegralConstant class template.
Header file for the IsAligned type trait.
Header file for the IsColumnMajorMatrix type trait.
Header file for the IsContiguous type trait.
Header file for the isDefault shim.
Header file for the IsOpposedView type trait.
Header file for the IsPadded type trait.
Header file for the IsSymmetric type trait.
Header file for the MaxSize type trait.
Header file for the relaxation flag enumeration.
Auxiliary class template for the data members of the Column class.
Definition ColumnData.h:65
Base class for matrices.
Definition Matrix.h:85
Base class for N-dimensional vectors.
Definition Vector.h:82
Header file for the DeclExpr base class.
Header file for the MatEvalExpr base class.
Header file for the MatMapExpr base class.
Header file for the MatMatAddExpr base class.
Header file for the MatMatKronExpr base class.
Header file for the MatMatMapExpr base class.
Header file for the MatMatMultExpr base class.
Header file for the MatMatSubExpr base class.
Header file for the MatNoAliasExpr base class.
Header file for the MatNoSIMDExpr base class.
Header file for the MatRepeatExpr base class.
Header file for the MatScalarDivExpr base class.
Header file for the MatScalarMultExpr base class.
Header file for the MatSerialExpr base class.
Header file for the MatTransExpr base class.
Header file for the Matrix base class.
Header file for the SchurExpr base class.
Header file for the VecExpandExpr base class.
Header file for the VecTVecMapExpr base class.
Header file for the VecTVecMultExpr base class.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition Column.h:137
decltype(auto) noalias(const DenseMatrix< MT, SO > &dm)
Forces the non-aliased evaluation of the given dense matrix expression dm.
Definition DMatNoAliasExpr.h:679
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition DMatEvalExpr.h:790
decltype(auto) repeat(const DenseMatrix< MT, SO > &dm, size_t m, size_t n)
Repeats the given dense matrix.
Definition DMatRepeatExpr.h:543
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition DMatTransExpr.h:766
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Elementwise evaluation of the given binary operation on each single element of the dense matrices lhs...
Definition DMatDMatMapExpr.h:1144
decltype(auto) nosimd(const DenseMatrix< MT, SO > &dm)
Disables the SIMD evaluation of the given dense matrix expression dm.
Definition DMatNoSIMDExpr.h:717
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition DMatSerialExpr.h:812
decltype(auto) kron(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the Kronecker product of two dense matrices ( ).
Definition DMatDMatKronExpr.h:957
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition DiagonalMatrix.h:207
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
constexpr Bind2nd< OP, A2 > bind2nd(const OP &op, const A2 &a2)
Binds the given object/value to the 2nd parameter of the given operation.
Definition Bind2nd.h:155
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition RelaxationFlag.h:66
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition Matrix.h:660
bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition Matrix.h:1424
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition Matrix.h:676
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition Row.h:137
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition Subvector.h:158
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition Inline.h:85
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
BoolConstant< true > TrueType
Type traits base class.
Definition IntegralConstant.h:132
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition FunctionTrace.h:94
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition IntegralConstant.h:110
constexpr bool isChecked(const Ts &... args)
Extracting blaze::Check arguments from a given list of arguments.
Definition Check.h:225
constexpr Unchecked unchecked
Global Unchecked instance.
Definition Check.h:146
Header file for the exception macros of the math module.
Header file for the Size type trait.
Base class for all matrix for-each expression templates.
Definition DeclExpr.h:68
Compile time check for low-level access to constant data.
Definition HasConstDataAccess.h:76
Compile time check for low-level access to mutable data.
Definition HasMutableDataAccess.h:76
Compile time check for the alignment of data types.
Definition IsAligned.h:88
Compile time check for the memory layout of data types.
Definition IsContiguous.h:87
Compile time check for resizable data types.
Definition IsOpposedView.h:82
Compile time check for data types with padding.
Definition IsPadded.h:77
Compile time check for data types with restricted data access.
Definition IsRestricted.h:83
Base class for all matrix evaluation expression templates.
Definition MatEvalExpr.h:69
Base class for all unary matrix map expression templates.
Definition MatMapExpr.h:68
Base class for all matrix/matrix Kronecker expression templates.
Definition MatMatKronExpr.h:69
Base class for all binary matrix map expression templates.
Definition MatMatMapExpr.h:68
Base class for all matrix/matrix multiplication expression templates.
Definition MatMatMultExpr.h:71
Base class for all matrix/matrix subtraction expression templates.
Definition MatMatSubExpr.h:69
Base class for all matrix no-alias expression templates.
Definition MatNoAliasExpr.h:68
Base class for all matrix no-SIMD expression templates.
Definition MatNoSIMDExpr.h:95
Base class for all matrix repeat expression templates.
Definition MatRepeatExpr.h:69
Base class for all matrix/scalar division expression templates.
Definition MatScalarDivExpr.h:75
Base class for all matrix/scalar multiplication expression templates.
Definition MatScalarMultExpr.h:77
Base class for all matrix serial evaluation expression templates.
Definition MatSerialExpr.h:69
Base class for all matrix transposition expression templates.
Definition MatTransExpr.h:69
Compile time evaluation of the maximum size of vectors and matrices.
Definition MaxSize.h:118
Base class for all Schur product expression templates.
Definition SchurExpr.h:68
Compile time evaluation of the size of vectors and matrices.
Definition Size.h:119
Base class for all vector expansion expression templates.
Definition VecExpandExpr.h:69
Base class for all outer map expression templates.
Definition VecTVecMapExpr.h:68
Base class for all outer product expression templates.
Definition VecTVecMultExpr.h:69
Header file for basic type definitions.
Header file for the implementation of the Column base template.
Column specialization for dense matrices.
Column specialization for sparse matrices.