title: copy boost::numeric::ublas::matrix row to vector of vectors
body: <ul>
  <li>I am trying to copy matrix rows to a vector of vectors how can I
  apply it? </li>
  <li>Is it possible to convert boost matrix to vector of vectors?</li>
  </ul>
  
  <hr>
  
  <p>source code:</p>
  
  <pre><code>#include &lt;iostream.h&gt;
  #include &lt;boost/numeric/ublas/matrix.hpp&gt;
  #include &lt;vector&gt;
  
  int main()
  {
      //declare vector and matrix
      std::vector&lt;std::vector&lt;float&gt;&gt; document;
      boost::numeric::ublas::matrix&lt;float&gt; data(10,10);
      // fill matrix (any numbers)
      for (size_t i = 0; i &lt; data.size1(); i++)
      {
          for (size_t j = 0; j &lt; data.size2(); j++)
          {
              data(i,j) = i + j ;
          }
      }
  
      //The problem is here. I want to copy data(j) to document i.e document.push_back(data(j)). How can I copy matrix rows to a vector?
    //I know that it's wrong: document.push_back(data(j)) but that's almost what i am trying to do
  
  //matrix_row&lt;matrix&lt;double&gt; &gt; mr (m, i); allows me to access a row right?
  
  return 0;
  
  }
  </code></pre>