title: Armadillo C++ LU decomposition
body: <p>I am using the Armadillo C++ library for solving linear systems of medium/large dimensions (1000-5000 equations). </p>
  
  <p>Since I have to solve different linear systems </p>
  
  <p>AX=b</p>
  
  <p>in which A is always the same and B changes, I would like to LU factorize A only once and reuse the LU factorization with different b. Unfortunately I do not know how to perform this kind of operations in Armadillo.</p>
  
  <p>What I did was just the LU factorization of the A matrix:</p>
  
  <pre><code>arma::mat A;
  // ... fill the A matrix ...
  arma::mat P,L,U;
  arma::lu(L, U, P, A);
  </code></pre>
  
  <p>But now I would like to use the matrices P, L and U to solve several linear systems with different b vectors.</p>
  
  <p>Could you help me please?</p>