title: Eigen C++: How can I fixed the values after a random matrix initialization?
body: <p>It seems that in Eigen package, the coefficients keep changing after a random matrix initialization. Some illustration codes and output are listed below. We expect that X.transpose() is the transpose of the first X. But it is a transpose of another random matrix! </p>
  
  <p>How can I fixed the those values after random matrix initialization?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;Eigen/Dense&gt;
  
  
  using namespace Eigen;
  using namespace std;
  int main(){
    auto X = MatrixXi::Random(2,2);
    cout &lt;&lt; X &lt;&lt; endl;
    cout &lt;&lt; "---------" &lt;&lt; endl;
    cout &lt;&lt; X.transpose() &lt;&lt; endl;
    cout &lt;&lt; "---------" &lt;&lt; endl;
    cout &lt;&lt; X &lt;&lt; endl;
    cout &lt;&lt; "---------" &lt;&lt; endl;
    return 0;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>-1073725017   548908249
   -791266575   -88798166
  ---------
    70367106 -603530552
  -972714280  384109054
  ---------
   385036099 -250177384
   933495885   41696341
  ---------
  </code></pre>