10 #ifndef EIGEN_REPLICATE_H 11 #define EIGEN_REPLICATE_H 16 template<
typename MatrixType,
int RowFactor,
int ColFactor>
28 : RowFactor * MatrixType::RowsAtCompileTime,
31 : ColFactor * MatrixType::ColsAtCompileTime,
33 MaxRowsAtCompileTime = RowsAtCompileTime,
34 MaxColsAtCompileTime = ColsAtCompileTime,
35 IsRowMajor = MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1 ? 1
36 : MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1 ? 0
61 template<
typename MatrixType,
int RowFactor,
int ColFactor>
class Replicate 72 template<typename OriginalMatrixType>
75 : m_matrix(
matrix), m_rowFactor(RowFactor), m_colFactor(ColFactor)
78 THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)
82 template<
typename OriginalMatrixType>
85 : m_matrix(matrix), m_rowFactor(rowFactor), m_colFactor(colFactor)
88 THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)
92 inline Index rows()
const {
return m_matrix.rows() * m_rowFactor.value(); }
94 inline Index cols()
const {
return m_matrix.cols() * m_colFactor.value(); }
116 template<
typename Derived>
117 template<
int RowFactor,
int ColFactor>
132 template<
typename ExpressionType,
int Direction>
142 #endif // EIGEN_REPLICATE_H MatrixType::Scalar Scalar
ref_selector< MatrixType >::type MatrixTypeNested
EIGEN_DEVICE_FUNC const ReplicateReturnType replicate(Index factor) const
Namespace containing all symbols from the Eigen library.
Replicate< ExpressionType,(isVertical?Dynamic:1),(isHorizontal?Dynamic:1)> ReplicateReturnType
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
const internal::variable_if_dynamic< Index, RowFactor > m_rowFactor
EIGEN_DEVICE_FUNC Replicate(const OriginalMatrixType &matrix, Index rowFactor, Index colFactor)
const unsigned int RowMajorBit
internal::dense_xpr_base< Replicate >::type Base
traits< MatrixType >::XprKind XprKind
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC const Replicate< Derived, RowFactor, ColFactor > replicate() const
Expression of the multiple replication of a matrix or vector.
traits< MatrixType >::StorageKind StorageKind
#define EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC const _MatrixTypeNested & nestedExpression() const
remove_reference< MatrixTypeNested >::type _MatrixTypeNested
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
MatrixTypeNested m_matrix
const internal::variable_if_dynamic< Index, ColFactor > m_colFactor
internal::traits< Replicate >::_MatrixTypeNested _MatrixTypeNested
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
internal::traits< Replicate >::MatrixTypeNested MatrixTypeNested
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const