title: How to convert row vector to column vector in Eigen?
body: <p>The <a href="http://eigen.tuxfamily.org/dox/TutorialMatrixClass.html" rel="noreferrer">documentation</a> says:</p>
  
  <blockquote>
    <p>... in Eigen, vectors are just a special case of
    matrices, with either 1 row or 1 column. The case where they have 1
    column is the most common; such vectors are called column-vectors,
    often abbreviated as just vectors. In the other case where they have 1
    row, they are called row-vectors.</p>
  </blockquote>
  
  <p>However this program outputs unintuitive results:</p>
  
  <pre><code>#include &lt;eigen3/Eigen/Dense&gt;
  #include &lt;iostream&gt;
  
  typedef Eigen::Matrix&lt;double, 1, Eigen::Dynamic&gt; RowVector;
  
  int main(int argc, char** argv)
  {
      RowVector row(10);
      std::cout &lt;&lt; "Rows: "    &lt;&lt; row.rows() &lt;&lt; std::endl;
      std::cout &lt;&lt; "Columns: " &lt;&lt; row.cols() &lt;&lt; std::endl;
      row.transposeInPlace();
      std::cout &lt;&lt; "Rows: "    &lt;&lt; row.rows() &lt;&lt; std::endl;
      std::cout &lt;&lt; "Columns: " &lt;&lt; row.cols() &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Rows: 1
  Columns: 10
  Rows: 1
  Columns: 10
  </code></pre>
  
  <p>Is this a bug, or am I using the library incorrectly?</p>