title: how to get inverse matrix by using alglib rmatrixinverse
body: <p>I would like to ask one simply question about rmatrixinverse() from alglib. I got a 2D double array named <code>M (matrix n*n)</code> and I want to get the inverse matrix named <code>invM</code>. I am, for this case, using rmatrixinverse(), but the result is wrong. I tried some of the other inverse matrix solvers from alglib as well, but in my opinion, <code>rmatrixinverse()</code> fits the best, since the data is full of doubles.</p>
  
  <p>If someone ever faced this problem and have any idea, I will be very thankful.</p>
  
  <pre><code>alglib::real_2d_array invMalglib;
  alglib::ae_int_t info;
  alglib::matinvreport rep;
  invMalglib.setlength(matrix_degree,matrix_degree);
  for(int i = 0; i &lt; matrix_degree; i++)
      for(int j = 0; j &lt; matrix_degree; j++)
          invMalglib[i][j] = M[i][j];
  
  vector_from_matrix_and_vector(F, X, FtX, small_length, matrix_degree);
  alglib::rmatrixinverse(invMalglib, info, rep);
  for(int i = 0; i &lt; matrix_degree; i++)
      for(int j = 0; j &lt; matrix_degree; j++)
          invM[i][j] = invMalglib[i][j];
  </code></pre>