make_circulant2.cpp File Reference
#include <Eigen/Core>
#include <iostream>

Classes

class  circulant_functor< ArgType >
 
struct  circulant_helper< ArgType >
 

Functions

template<class ArgType >
Eigen::CwiseNullaryOp< circulant_functor< ArgType >, typename circulant_helper< ArgType >::MatrixTypemakeCirculant (const Eigen::MatrixBase< ArgType > &arg)
 
int main ()
 

Function Documentation

◆ main()

int main ( )
39  {
40  Eigen::VectorXd vec(4);
41  vec << 1, 2, 4, 8;
42  Eigen::MatrixXd mat;
43  mat = makeCirculant(vec);
44  std::cout << mat << std::endl;
45 }
Eigen::SparseMatrix< double > mat
Definition: EigenUnitTest.cpp:10
Eigen::CwiseNullaryOp< circulant_functor< ArgType >, typename circulant_helper< ArgType >::MatrixType > makeCirculant(const Eigen::MatrixBase< ArgType > &arg)
Definition: make_circulant2.cpp:31

References makeCirculant().

◆ makeCirculant()

template<class ArgType >
Eigen::CwiseNullaryOp<circulant_functor<ArgType>, typename circulant_helper<ArgType>::MatrixType> makeCirculant ( const Eigen::MatrixBase< ArgType > &  arg)
32  {
34  return MatrixType::NullaryExpr(arg.size(), arg.size(), circulant_functor<ArgType>(arg.derived()));
35 }
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Definition: make_circulant2.cpp:6

Referenced by main().