Solve system of linear equations in Spark
<p>I have a system of linear equations in the form of <code>Ax = b</code> to solve in Spark.</p>

<p><code>A</code> is <code>n by n</code></p>

<p><code>b</code> is <code>n by 1</code></p>

<p>I represent<code>A</code> in the form of <code>IndexedRowMatrix</code> or <code>RowMatrix</code> and <code>b</code> in the form of <code>DenseMatrix</code> or <code>DenseVector</code>.</p>

<p>How can I solve this system to calculate the <code>x</code> vector?</p>

<p>If the suggested solution is <a href="https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/linalg/CholeskyDecomposition.scala" rel="nofollow">Cholesky Decomposition</a>, would you please guide me through doing it as it is not part of the public API ? For example if the original matrix <code>A</code> is:</p>

<pre><code>1,2,3,4
2,1,5,6
3,5,1,7
4,6,7,1
</code></pre>

<p>and <code>b</code> is:</p>

<pre><code>5,6,7,8
</code></pre>

<p>What is passed as argument to the <code>solve</code> method ?</p>

<p>Any other solution other than inversing <code>A</code> would be very helpful.</p>