updated userguide after deprecation of internal LU decomposition in linear algebra
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@700367 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bfea325efd
commit
e95b705442
|
@ -68,7 +68,7 @@ System.out.println(p.getRowDimension()); // 2
|
||||||
System.out.println(p.getRowDimension()); // 2
|
System.out.println(p.getRowDimension()); // 2
|
||||||
|
|
||||||
// Invert p
|
// Invert p
|
||||||
RealMatrix pInverse = p.inverse();
|
RealMatrix pInverse = new LUDecompositionImpl(p).inverse();
|
||||||
</source>
|
</source>
|
||||||
</p>
|
</p>
|
||||||
</subsection>
|
</subsection>
|
||||||
|
@ -109,10 +109,11 @@ double[][] coefficientsData = {{2, 3, -2}, {-1, 7, 6}, {4, -3, -5}};
|
||||||
RealMatrix coefficients = new RealMatrixImpl(coefficientsData);
|
RealMatrix coefficients = new RealMatrixImpl(coefficientsData);
|
||||||
</source>
|
</source>
|
||||||
Next create a <code>double[]</code> array to represent the constant
|
Next create a <code>double[]</code> array to represent the constant
|
||||||
vector and use <code>solve(double[])</code> to solve the system
|
vector and use <code>solve(double[])</code> from the default implementation
|
||||||
|
of <code>LUDecomposition</code> to solve the system
|
||||||
<source>
|
<source>
|
||||||
double[] constants = {1, -2, 1};
|
double[] constants = {1, -2, 1};
|
||||||
double[] solution = coefficients.solve(constants);
|
double[] solution = new LUDecompositionImpl(coefficients).solve(constants);
|
||||||
</source>
|
</source>
|
||||||
The <code>solution</code> array will contain values for x
|
The <code>solution</code> array will contain values for x
|
||||||
(<code>solution[0]</code>), y (<code>solution[1]</code>),
|
(<code>solution[0]</code>), y (<code>solution[1]</code>),
|
||||||
|
|
Loading…
Reference in New Issue