Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / ground / gcs / src / libs / eigen / doc / examples / make_circulant.cpp.expression
blob380cd445045df643925a2a4478d50cf738b9369f
1 template <class ArgType>
2 class Circulant : public Eigen::MatrixBase<Circulant<ArgType> >
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   }
12   typedef typename Eigen::internal::ref_selector<Circulant>::type Nested; 
14   typedef Eigen::Index Index;
15   Index rows() const { return m_arg.rows(); }
16   Index cols() const { return m_arg.rows(); }
18   typedef typename Eigen::internal::ref_selector<ArgType>::type ArgTypeNested;
19   ArgTypeNested m_arg;