From 35f7829af10c61e33dd2e2a7a015058e11a11ea0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 25 Mar 2017 14:17:07 +0100 Subject: update --- eigen/doc/examples/make_circulant.cpp.expression | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 eigen/doc/examples/make_circulant.cpp.expression (limited to 'eigen/doc/examples/make_circulant.cpp.expression') diff --git a/eigen/doc/examples/make_circulant.cpp.expression b/eigen/doc/examples/make_circulant.cpp.expression new file mode 100644 index 0000000..380cd44 --- /dev/null +++ b/eigen/doc/examples/make_circulant.cpp.expression @@ -0,0 +1,20 @@ +template +class Circulant : public Eigen::MatrixBase > +{ +public: + Circulant(const ArgType& arg) + : m_arg(arg) + { + EIGEN_STATIC_ASSERT(ArgType::ColsAtCompileTime == 1, + YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX); + } + + typedef typename Eigen::internal::ref_selector::type Nested; + + typedef Eigen::Index Index; + Index rows() const { return m_arg.rows(); } + Index cols() const { return m_arg.rows(); } + + typedef typename Eigen::internal::ref_selector::type ArgTypeNested; + ArgTypeNested m_arg; +}; -- cgit v1.2.3