Eigen::Replicate< MatrixType, RowFactor, ColFactor > Class Template Reference

Expression of the multiple replication of a matrix or vector. More...

#include <Replicate.h>

+ Inheritance diagram for Eigen::Replicate< MatrixType, RowFactor, ColFactor >:

Public Types

typedef internal::dense_xpr_base< Replicate >::type Base
 
typedef internal::remove_all_t< MatrixTypeNestedExpression
 

Public Member Functions

template<typename OriginalMatrixType >
EIGEN_DEVICE_FUNC Replicate (const OriginalMatrixType &matrix)
 
template<typename OriginalMatrixType >
EIGEN_DEVICE_FUNC Replicate (const OriginalMatrixType &matrix, Index rowFactor, Index colFactor)
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows () const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols () const
 
EIGEN_DEVICE_FUNC const MatrixTypeNested_nestedExpression () const
 

Protected Attributes

MatrixTypeNested m_matrix
 
const internal::variable_if_dynamic< Index, RowFactor > m_rowFactor
 
const internal::variable_if_dynamic< Index, ColFactor > m_colFactor
 

Private Types

typedef internal::traits< Replicate >::MatrixTypeNested MatrixTypeNested
 
typedef internal::traits< Replicate >::MatrixTypeNested_ MatrixTypeNested_
 

Detailed Description

template<typename MatrixType, int RowFactor, int ColFactor>
class Eigen::Replicate< MatrixType, RowFactor, ColFactor >

Expression of the multiple replication of a matrix or vector.

Template Parameters
MatrixTypethe type of the object we are replicating
RowFactornumber of repetitions at compile time along the vertical direction, can be Dynamic.
ColFactornumber of repetitions at compile time along the horizontal direction, can be Dynamic.

This class represents an expression of the multiple replication of a matrix or vector. It is the return type of DenseBase::replicate() and most of the time this is the only way it is used.

See also
DenseBase::replicate()

Member Typedef Documentation

◆ Base

template<typename MatrixType , int RowFactor, int ColFactor>
typedef internal::dense_xpr_base<Replicate>::type Eigen::Replicate< MatrixType, RowFactor, ColFactor >::Base

◆ MatrixTypeNested

template<typename MatrixType , int RowFactor, int ColFactor>
typedef internal::traits<Replicate>::MatrixTypeNested Eigen::Replicate< MatrixType, RowFactor, ColFactor >::MatrixTypeNested
private

◆ MatrixTypeNested_

template<typename MatrixType , int RowFactor, int ColFactor>
typedef internal::traits<Replicate>::MatrixTypeNested_ Eigen::Replicate< MatrixType, RowFactor, ColFactor >::MatrixTypeNested_
private

◆ NestedExpression

template<typename MatrixType , int RowFactor, int ColFactor>
typedef internal::remove_all_t<MatrixType> Eigen::Replicate< MatrixType, RowFactor, ColFactor >::NestedExpression

Constructor & Destructor Documentation

◆ Replicate() [1/2]

template<typename MatrixType , int RowFactor, int ColFactor>
template<typename OriginalMatrixType >
EIGEN_DEVICE_FUNC Eigen::Replicate< MatrixType, RowFactor, ColFactor >::Replicate ( const OriginalMatrixType &  matrix)
inlineexplicit
75  : m_matrix(matrix), m_rowFactor(RowFactor), m_colFactor(ColFactor) {
76  EIGEN_STATIC_ASSERT((internal::is_same<std::remove_const_t<MatrixType>, OriginalMatrixType>::value),
77  THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)
78  eigen_assert(RowFactor != Dynamic && ColFactor != Dynamic);
79  }
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
const internal::variable_if_dynamic< Index, ColFactor > m_colFactor
Definition: Replicate.h:96
const internal::variable_if_dynamic< Index, RowFactor > m_rowFactor
Definition: Replicate.h:95
MatrixTypeNested m_matrix
Definition: Replicate.h:94
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor >, 0, Eigen::OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: common.h:85
squared absolute value
Definition: GlobalFunctions.h:87
const int Dynamic
Definition: Constants.h:25

References Eigen::Dynamic, eigen_assert, EIGEN_STATIC_ASSERT, and Eigen::value.

◆ Replicate() [2/2]

template<typename MatrixType , int RowFactor, int ColFactor>
template<typename OriginalMatrixType >
EIGEN_DEVICE_FUNC Eigen::Replicate< MatrixType, RowFactor, ColFactor >::Replicate ( const OriginalMatrixType &  matrix,
Index  rowFactor,
Index  colFactor 
)
inline
83  : m_matrix(matrix), m_rowFactor(rowFactor), m_colFactor(colFactor) {
84  EIGEN_STATIC_ASSERT((internal::is_same<std::remove_const_t<MatrixType>, OriginalMatrixType>::value),
85  THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)
86  }

References EIGEN_STATIC_ASSERT, and Eigen::value.

Member Function Documentation

◆ cols()

◆ nestedExpression()

template<typename MatrixType , int RowFactor, int ColFactor>
EIGEN_DEVICE_FUNC const MatrixTypeNested_& Eigen::Replicate< MatrixType, RowFactor, ColFactor >::nestedExpression ( ) const
inline

◆ rows()

Member Data Documentation

◆ m_colFactor

template<typename MatrixType , int RowFactor, int ColFactor>
const internal::variable_if_dynamic<Index, ColFactor> Eigen::Replicate< MatrixType, RowFactor, ColFactor >::m_colFactor
protected

◆ m_matrix

◆ m_rowFactor

template<typename MatrixType , int RowFactor, int ColFactor>
const internal::variable_if_dynamic<Index, RowFactor> Eigen::Replicate< MatrixType, RowFactor, ColFactor >::m_rowFactor
protected

The documentation for this class was generated from the following file: