Austin Schuh | 189376f | 2018-12-20 22:11:15 +1100 | [diff] [blame^] | 1 | template <class ArgType> |
| 2 | class Circulant : public Eigen::MatrixBase<Circulant<ArgType> > |
| 3 | { |
| 4 | public: |
| 5 | Circulant(const ArgType& arg) |
| 6 | : m_arg(arg) |
| 7 | { |
| 8 | EIGEN_STATIC_ASSERT(ArgType::ColsAtCompileTime == 1, |
| 9 | YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX); |
| 10 | } |
| 11 | |
| 12 | typedef typename Eigen::internal::ref_selector<Circulant>::type Nested; |
| 13 | |
| 14 | typedef Eigen::Index Index; |
| 15 | Index rows() const { return m_arg.rows(); } |
| 16 | Index cols() const { return m_arg.rows(); } |
| 17 | |
| 18 | typedef typename Eigen::internal::ref_selector<ArgType>::type ArgTypeNested; |
| 19 | ArgTypeNested m_arg; |
| 20 | }; |