5 template<
class ArgType>
6 class circulant_functor {
9 circulant_functor(
const ArgType&
arg) : m_vec(
arg) {}
13 if (index < 0) index += m_vec.size();
20 template<
class ArgType>
21 struct circulant_helper {
23 ArgType::SizeAtCompileTime,
24 ArgType::SizeAtCompileTime,
26 ArgType::MaxSizeAtCompileTime,
32 template <
class ArgType>
37 return MatrixType::NullaryExpr(
arg.size(),
arg.size(), circulant_functor<ArgType>(
arg.derived()));
48 std::cout <<
mat << std::endl;
const ArgReturnType arg() const
RowXpr row(Index i)
This is the const version of row(). */.
ColXpr col(Index i)
This is the const version of col().
IndexedView_or_Block operator()(const RowIndices &rowIndices, const ColIndices &colIndices)
Matrix< float, 1, Dynamic > MatrixType
Generic expression of a matrix where all coefficients are defined by a functor.
Base class for all dense matrices, vectors, and expressions.
The matrix class, also used for vectors and row-vectors.
Eigen::CwiseNullaryOp< circulant_functor< ArgType >, typename circulant_helper< ArgType >::MatrixType > makeCirculant(const Eigen::MatrixBase< ArgType > &arg)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.