title: Getting the location of the maximum coefficient of an Eigen C++ library Vector
body: <p>I came across a problem due to either my misunderstanding of the
  documentation, or a bug.</p>
  
  <p>I want to retrieve the position of the maximum coefficient of a vector:</p>
  
  <pre><code>#include &lt;Eigen/Core&gt;
  #include &lt;iostream&gt;
  
  int main(int argc, char *argv[])
  {
    Eigen::Vector3f v;
    int pos;
  
    v &lt;&lt;  1, 2, 3;
  
    std::cout &lt;&lt; v.maxCoeff(&amp;pos) &lt;&lt; "\n" &lt;&lt; "pos=" &lt;&lt;  pos &lt;&lt; "\n";
  
    return 0;
  }
  </code></pre>
  
  <p>the returned result (pos) is always zero, no matter where the maximum
  value is.  Through debugging, I have seen that indeed the correct value
  (i, j) is computed in the visitor, but it seems that maxVisitor.col is
  returned instead of maxVisitor.row.</p>
  
  <p>This happens also with the latest mercurial version.</p>
  
  <p>Do you think it is a bug?  Should I file a bug report?</p>