10#ifndef EIGEN_REPLICATE_H
11#define EIGEN_REPLICATE_H
31template<
typename MatrixType,
int RowFactor,
int ColFactor>
35 typedef typename MatrixType::Scalar Scalar;
39 typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
41 RowsAtCompileTime =
RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic
43 :
RowFactor * MatrixType::RowsAtCompileTime,
44 ColsAtCompileTime =
ColFactor==Dynamic || int(MatrixType::ColsAtCompileTime)==Dynamic
46 :
ColFactor * MatrixType::ColsAtCompileTime,
48 MaxRowsAtCompileTime = RowsAtCompileTime,
49 MaxColsAtCompileTime = ColsAtCompileTime,
50 IsRowMajor = MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1 ? 1
51 : MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1 ? 0
60template<
typename MatrixType,
int RowFactor,
int ColFactor>
class Replicate
71 template<
typename OriginalMatrixType>
77 THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)
81 template<
typename OriginalMatrixType>
87 THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)
91 inline Index rows()
const {
return m_matrix.rows() * m_rowFactor.value(); }
93 inline Index cols()
const {
return m_matrix.cols() * m_colFactor.value(); }
96 const _MatrixTypeNested& nestedExpression()
const
102 MatrixTypeNested m_matrix;
115template<
typename Derived>
116template<
int RowFactor,
int ColFactor>
131template<
typename ExpressionType,
int Direction>
Base class for all dense matrices, vectors, and arrays.
Definition DenseBase.h:49
Expression of the multiple replication of a matrix or vector.
Definition Replicate.h:62
Pseudo expression representing a solving operation.
Definition Solve.h:63
Pseudo expression providing partial reduction operations.
Definition VectorwiseOp.h:157
Eigen::Index Index
Definition VectorwiseOp.h:162
Definition XprHelper.h:67
@ Horizontal
For Reverse, all rows are reversed; for PartialReduxExpr and VectorwiseOp, act on rows.
Definition Constants.h:268
@ Vertical
For Reverse, all columns are reversed; for PartialReduxExpr and VectorwiseOp, act on columns.
Definition Constants.h:265
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:61
Definition XprHelper.h:428
Definition ForwardDeclarations.h:17