title: Design a simple C++ iterator for Matrix
body: <p>I was thinking to design a simple C++ iterator with <code>++</code> operation behave differently for backward and forward iterations like STL. So that a matrix <code>A</code> can be access through row and column as below, </p>
  
  <pre><code>  A.row(3).begin()
    A.row(3).end()
    A.col(3).begin()
    A.col(3).end()
    A.col(3).rbegin()
    A.col(3).rend()
  
    ++ A.row(3).begin()
    ++ A.col(3).rbegin()
  </code></pre>
  
  <p>My matrix class would look like below,</p>
  
  <pre><code>class Matrix {
   public:
    Iter row(size_t rowID);
    Iter col(size_t colID);
   private:
    vector&lt;int&gt; data_{1, 2, 3, 4, 5, 6};
    size_t nRow{3};
    size_t nCol{2};
  };
  </code></pre>
  
  <p>Is there any suggestions on how I can design my <code>Iter</code> class?</p>