title: How to access to the values stored in a flann::Matrix
body: <p>I'm working with flann library with point clouds. I have this adapter method that transform my own points to a flann-usable points</p>
  
  <pre><code>flann::Matrix&lt;float&gt; * converterFlann::convertArray(vector&lt;Point *&gt; *P){
  
      float points[P-&gt;size()*3];
  
      int j = 0;
      for (int i = 0; i&lt;P-&gt;size(); i++){
  
          points[j] = P-&gt;at(i)-&gt;getX(); j++;
          points[j] = P-&gt;at(i)-&gt;getY(); j++;
          points[j] = P-&gt;at(i)-&gt;getZ(); j++;
      }
  
      P-&gt;at(0)-&gt;print();
      cout &lt;&lt; points[0] &lt;&lt; " " &lt;&lt; points[1] &lt;&lt; " " &lt;&lt; points[2] &lt;&lt; endl;
  
      flann::Matrix&lt;float&gt; *nari = new flann::Matrix&lt;float&gt;(points, P-&gt;size(), 3);
  
      cout &lt;&lt; *nari[0][0] &lt;&lt; " " &lt;&lt; *nari[0][1] &lt;&lt; " " &lt;&lt; *nari[0][2] &lt;&lt; endl;
  
      return nari;
  }
  </code></pre>
  
  <p>And the output of this method is</p>
  
  <pre><code>Printing my point:         (-0.06325,   0.0359793,  0.0420873) Index: 0
  Printing from points array: -0.06325 0.0359793 0.0420873
  Printing from flann:        -0.06325 -0.06275 -0.0645
  </code></pre>
  
  <p>I don't understand why printing from flann::Matrix, Y and Z are different. I've been looking for some documentation about storing procedure of flann::Matrix but I'm not able to find any answer. I thing that my array-type access is correct but it doesn't work.</p>
  
  <p>Thanks in advance. :D</p>