| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>MatrixUtils (Apache Commons Math 3.3 API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="MatrixUtils (Apache Commons Math 3.3 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MatrixUtils.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/commons/math3/linear/NonPositiveDefiniteMatrixException.html" title="class in org.apache.commons.math3.linear"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/commons/math3/linear/MatrixUtils.html" target="_top">Frames</a></li> |
| <li><a href="MatrixUtils.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.commons.math3.linear</div> |
| <h2 title="Class MatrixUtils" class="title">Class MatrixUtils</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.commons.math3.linear.MatrixUtils</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="strong">MatrixUtils</span> |
| extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">A collection of static methods that operate on or return matrices.</div> |
| <dl><dt><span class="strong">Version:</span></dt> |
| <dd>$Id: MatrixUtils.java 1533638 2013-10-18 21:19:18Z tn $</dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrixFormat.html" title="class in org.apache.commons.math3.linear">RealMatrixFormat</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#DEFAULT_FORMAT">DEFAULT_FORMAT</a></strong></code> |
| <div class="block">The default format for <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> objects.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrixFormat.html" title="class in org.apache.commons.math3.linear">RealMatrixFormat</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#OCTAVE_FORMAT">OCTAVE_FORMAT</a></strong></code> |
| <div class="block">A format for <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> objects compatible with octave.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/Array2DRowRealMatrix.html" title="class in org.apache.commons.math3.linear">Array2DRowRealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#bigFractionMatrixToRealMatrix(org.apache.commons.math3.linear.FieldMatrix)">bigFractionMatrixToRealMatrix</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>> m)</code> |
| <div class="block">Convert a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a>/<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> matrix to a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#blockInverse(org.apache.commons.math3.linear.RealMatrix, int)">blockInverse</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> m, |
| int splitIndex)</code> |
| <div class="block">Computes the inverse of the given matrix by splitting it into |
| 4 sub-matrices.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkAdditionCompatible(org.apache.commons.math3.linear.AnyMatrix, org.apache.commons.math3.linear.AnyMatrix)">checkAdditionCompatible</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> left, |
| <a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> right)</code> |
| <div class="block">Check if matrices are addition compatible.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkColumnIndex(org.apache.commons.math3.linear.AnyMatrix, int)">checkColumnIndex</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int column)</code> |
| <div class="block">Check if a column index is valid.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkMatrixIndex(org.apache.commons.math3.linear.AnyMatrix, int, int)">checkMatrixIndex</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int row, |
| int column)</code> |
| <div class="block">Check if matrix indices are valid.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkMultiplicationCompatible(org.apache.commons.math3.linear.AnyMatrix, org.apache.commons.math3.linear.AnyMatrix)">checkMultiplicationCompatible</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> left, |
| <a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> right)</code> |
| <div class="block">Check if matrices are multiplication compatible</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkRowIndex(org.apache.commons.math3.linear.AnyMatrix, int)">checkRowIndex</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int row)</code> |
| <div class="block">Check if a row index is valid.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkSubMatrixIndex(org.apache.commons.math3.linear.AnyMatrix, int[], int[])">checkSubMatrixIndex</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int[] selectedRows, |
| int[] selectedColumns)</code> |
| <div class="block">Check if submatrix ranges indices are valid.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkSubMatrixIndex(org.apache.commons.math3.linear.AnyMatrix, int, int, int, int)">checkSubMatrixIndex</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int startRow, |
| int endRow, |
| int startColumn, |
| int endColumn)</code> |
| <div class="block">Check if submatrix ranges indices are valid.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkSubtractionCompatible(org.apache.commons.math3.linear.AnyMatrix, org.apache.commons.math3.linear.AnyMatrix)">checkSubtractionCompatible</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> left, |
| <a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> right)</code> |
| <div class="block">Check if matrices are subtraction compatible</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#checkSymmetric(org.apache.commons.math3.linear.RealMatrix, double)">checkSymmetric</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix, |
| double eps)</code> |
| <div class="block">Checks whether a matrix is symmetric.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <br><a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createColumnFieldMatrix(T[])">createColumnFieldMatrix</a></strong>(T[] columnData)</code> |
| <div class="block">Creates a column <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> using the data from the input |
| array.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createColumnRealMatrix(double[])">createColumnRealMatrix</a></strong>(double[] columnData)</code> |
| <div class="block">Creates a column <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> using the data from the input |
| array.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <br><a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createFieldDiagonalMatrix(T[])">createFieldDiagonalMatrix</a></strong>(T[] diagonal)</code> |
| <div class="block">Returns a diagonal matrix with specified elements.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <br><a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createFieldIdentityMatrix(org.apache.commons.math3.Field, int)">createFieldIdentityMatrix</a></strong>(<a href="../../../../../org/apache/commons/math3/Field.html" title="interface in org.apache.commons.math3">Field</a><T> field, |
| int dimension)</code> |
| <div class="block">Returns <code>dimension x dimension</code> identity matrix.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <br><a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createFieldMatrix(org.apache.commons.math3.Field, int, int)">createFieldMatrix</a></strong>(<a href="../../../../../org/apache/commons/math3/Field.html" title="interface in org.apache.commons.math3">Field</a><T> field, |
| int rows, |
| int columns)</code> |
| <div class="block">Returns a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> with specified dimensions.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <br><a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createFieldMatrix(T[][])">createFieldMatrix</a></strong>(T[][] data)</code> |
| <div class="block">Returns a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> whose entries are the the values in the |
| the input array.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <br><a href="../../../../../org/apache/commons/math3/linear/FieldVector.html" title="interface in org.apache.commons.math3.linear">FieldVector</a><T></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createFieldVector(T[])">createFieldVector</a></strong>(T[] data)</code> |
| <div class="block">Creates a <a href="../../../../../org/apache/commons/math3/linear/FieldVector.html" title="interface in org.apache.commons.math3.linear"><code>FieldVector</code></a> using the data from the input array.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRealDiagonalMatrix(double[])">createRealDiagonalMatrix</a></strong>(double[] diagonal)</code> |
| <div class="block">Returns a diagonal matrix with specified elements.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRealIdentityMatrix(int)">createRealIdentityMatrix</a></strong>(int dimension)</code> |
| <div class="block">Returns <code>dimension x dimension</code> identity matrix.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRealMatrix(double[][])">createRealMatrix</a></strong>(double[][] data)</code> |
| <div class="block">Returns a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> whose entries are the the values in the |
| the input array.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRealMatrix(int, int)">createRealMatrix</a></strong>(int rows, |
| int columns)</code> |
| <div class="block">Returns a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> with specified dimensions.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRealVector(double[])">createRealVector</a></strong>(double[] data)</code> |
| <div class="block">Creates a <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> using the data from the input array.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <br><a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRowFieldMatrix(T[])">createRowFieldMatrix</a></strong>(T[] rowData)</code> |
| <div class="block">Create a row <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> using the data from the input |
| array.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRowRealMatrix(double[])">createRowRealMatrix</a></strong>(double[] rowData)</code> |
| <div class="block">Create a row <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> using the data from the input |
| array.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#deserializeRealMatrix(java.lang.Object, java.lang.String, java.io.ObjectInputStream)">deserializeRealMatrix</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> instance, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fieldName, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a> ois)</code> |
| <div class="block">Deserialize a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> field in a class.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#deserializeRealVector(java.lang.Object, java.lang.String, java.io.ObjectInputStream)">deserializeRealVector</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> instance, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fieldName, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a> ois)</code> |
| <div class="block">Deserialize a <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> field in a class.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/Array2DRowRealMatrix.html" title="class in org.apache.commons.math3.linear">Array2DRowRealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#fractionMatrixToRealMatrix(org.apache.commons.math3.linear.FieldMatrix)">fractionMatrixToRealMatrix</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><<a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction">Fraction</a>> m)</code> |
| <div class="block">Convert a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a>/<a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction"><code>Fraction</code></a> matrix to a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#inverse(org.apache.commons.math3.linear.RealMatrix)">inverse</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix)</code> |
| <div class="block">Computes the inverse of the given matrix.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#inverse(org.apache.commons.math3.linear.RealMatrix, double)">inverse</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix, |
| double threshold)</code> |
| <div class="block">Computes the inverse of the given matrix.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#isSymmetric(org.apache.commons.math3.linear.RealMatrix, double)">isSymmetric</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix, |
| double eps)</code> |
| <div class="block">Checks whether a matrix is symmetric.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#serializeRealMatrix(org.apache.commons.math3.linear.RealMatrix, java.io.ObjectOutputStream)">serializeRealMatrix</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a> oos)</code> |
| <div class="block">Serialize a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#serializeRealVector(org.apache.commons.math3.linear.RealVector, java.io.ObjectOutputStream)">serializeRealVector</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> vector, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a> oos)</code> |
| <div class="block">Serialize a <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#solveLowerTriangularSystem(org.apache.commons.math3.linear.RealMatrix, org.apache.commons.math3.linear.RealVector)">solveLowerTriangularSystem</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> rm, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> b)</code> |
| <div class="block">Solve a system of composed of a Lower Triangular Matrix |
| <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#solveUpperTriangularSystem(org.apache.commons.math3.linear.RealMatrix, org.apache.commons.math3.linear.RealVector)">solveUpperTriangularSystem</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> rm, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> b)</code> |
| <div class="block">Solver a system composed of an Upper Triangular Matrix |
| <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="DEFAULT_FORMAT"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_FORMAT</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/linear/RealMatrixFormat.html" title="class in org.apache.commons.math3.linear">RealMatrixFormat</a> DEFAULT_FORMAT</pre> |
| <div class="block">The default format for <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> objects.</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="OCTAVE_FORMAT"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>OCTAVE_FORMAT</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/linear/RealMatrixFormat.html" title="class in org.apache.commons.math3.linear">RealMatrixFormat</a> OCTAVE_FORMAT</pre> |
| <div class="block">A format for <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> objects compatible with octave.</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="createRealMatrix(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createRealMatrix</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> createRealMatrix(int rows, |
| int columns)</pre> |
| <div class="block">Returns a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> with specified dimensions. |
| <p>The type of matrix returned depends on the dimension. Below |
| 2<sup>12</sup> elements (i.e. 4096 elements or 64×64 for a |
| square matrix) which can be stored in a 32kB array, a <a href="../../../../../org/apache/commons/math3/linear/Array2DRowRealMatrix.html" title="class in org.apache.commons.math3.linear"><code>Array2DRowRealMatrix</code></a> instance is built. Above this threshold a <a href="../../../../../org/apache/commons/math3/linear/BlockRealMatrix.html" title="class in org.apache.commons.math3.linear"><code>BlockRealMatrix</code></a> instance is built.</p> |
| <p>The matrix elements are all set to 0.0.</p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>rows</code> - number of rows of the matrix</dd><dd><code>columns</code> - number of columns of the matrix</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>RealMatrix with specified dimensions</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRealMatrix(double[][])"><code>createRealMatrix(double[][])</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="createFieldMatrix(org.apache.commons.math3.Field, int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createFieldMatrix</h4> |
| <pre>public static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T> createFieldMatrix(<a href="../../../../../org/apache/commons/math3/Field.html" title="interface in org.apache.commons.math3">Field</a><T> field, |
| int rows, |
| int columns)</pre> |
| <div class="block">Returns a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> with specified dimensions. |
| <p>The type of matrix returned depends on the dimension. Below |
| 2<sup>12</sup> elements (i.e. 4096 elements or 64×64 for a |
| square matrix), a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> instance is built. Above |
| this threshold a <a href="../../../../../org/apache/commons/math3/linear/BlockFieldMatrix.html" title="class in org.apache.commons.math3.linear"><code>BlockFieldMatrix</code></a> instance is built.</p> |
| <p>The matrix elements are all set to field.getZero().</p></div> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the type of the field elements</dd><dt><span class="strong">Parameters:</span></dt><dd><code>field</code> - field to which the matrix elements belong</dd><dd><code>rows</code> - number of rows of the matrix</dd><dd><code>columns</code> - number of columns of the matrix</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>FieldMatrix with specified dimensions</dd><dt><span class="strong">Since:</span></dt> |
| <dd>2.0</dd> |
| <dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createFieldMatrix(T[][])"><code>createFieldMatrix(FieldElement[][])</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="createRealMatrix(double[][])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createRealMatrix</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> createRealMatrix(double[][] data) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></pre> |
| <div class="block">Returns a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> whose entries are the the values in the |
| the input array. |
| <p>The type of matrix returned depends on the dimension. Below |
| 2<sup>12</sup> elements (i.e. 4096 elements or 64×64 for a |
| square matrix) which can be stored in a 32kB array, a <a href="../../../../../org/apache/commons/math3/linear/Array2DRowRealMatrix.html" title="class in org.apache.commons.math3.linear"><code>Array2DRowRealMatrix</code></a> instance is built. Above this threshold a <a href="../../../../../org/apache/commons/math3/linear/BlockRealMatrix.html" title="class in org.apache.commons.math3.linear"><code>BlockRealMatrix</code></a> instance is built.</p> |
| <p>The input array is copied, not referenced.</p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - input array</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>RealMatrix containing the values of the array</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>data</code> is not rectangular (not all rows have the same length).</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if a row or column is empty.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if either <code>data</code> or <code>data[0]</code> |
| is <code>null</code>.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>data</code> is not rectangular.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createRealMatrix(int, int)"><code>createRealMatrix(int, int)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="createFieldMatrix(org.apache.commons.math3.FieldElement[][])"> |
| <!-- --> |
| </a><a name="createFieldMatrix(T[][])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createFieldMatrix</h4> |
| <pre>public static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T> createFieldMatrix(T[][] data) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre> |
| <div class="block">Returns a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> whose entries are the the values in the |
| the input array. |
| <p>The type of matrix returned depends on the dimension. Below |
| 2<sup>12</sup> elements (i.e. 4096 elements or 64×64 for a |
| square matrix), a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> instance is built. Above |
| this threshold a <a href="../../../../../org/apache/commons/math3/linear/BlockFieldMatrix.html" title="class in org.apache.commons.math3.linear"><code>BlockFieldMatrix</code></a> instance is built.</p> |
| <p>The input array is copied, not referenced.</p></div> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the type of the field elements</dd><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - input array</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a matrix containing the values of the array.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if <code>data</code> is not rectangular (not all rows have the same length).</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if a row or column is empty.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if either <code>data</code> or <code>data[0]</code> |
| is <code>null</code>.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>2.0</dd> |
| <dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#createFieldMatrix(org.apache.commons.math3.Field, int, int)"><code>createFieldMatrix(Field, int, int)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="createRealIdentityMatrix(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createRealIdentityMatrix</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> createRealIdentityMatrix(int dimension)</pre> |
| <div class="block">Returns <code>dimension x dimension</code> identity matrix.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dimension</code> - dimension of identity matrix to generate</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>identity matrix</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if dimension is not positive</dd><dt><span class="strong">Since:</span></dt> |
| <dd>1.1</dd></dl> |
| </li> |
| </ul> |
| <a name="createFieldIdentityMatrix(org.apache.commons.math3.Field, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createFieldIdentityMatrix</h4> |
| <pre>public static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T> createFieldIdentityMatrix(<a href="../../../../../org/apache/commons/math3/Field.html" title="interface in org.apache.commons.math3">Field</a><T> field, |
| int dimension)</pre> |
| <div class="block">Returns <code>dimension x dimension</code> identity matrix.</div> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the type of the field elements</dd><dt><span class="strong">Parameters:</span></dt><dd><code>field</code> - field to which the elements belong</dd><dd><code>dimension</code> - dimension of identity matrix to generate</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>identity matrix</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if dimension is not positive</dd><dt><span class="strong">Since:</span></dt> |
| <dd>2.0</dd></dl> |
| </li> |
| </ul> |
| <a name="createRealDiagonalMatrix(double[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createRealDiagonalMatrix</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> createRealDiagonalMatrix(double[] diagonal)</pre> |
| <div class="block">Returns a diagonal matrix with specified elements.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>diagonal</code> - diagonal elements of the matrix (the array elements |
| will be copied)</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>diagonal matrix</dd><dt><span class="strong">Since:</span></dt> |
| <dd>2.0</dd></dl> |
| </li> |
| </ul> |
| <a name="createFieldDiagonalMatrix(org.apache.commons.math3.FieldElement[])"> |
| <!-- --> |
| </a><a name="createFieldDiagonalMatrix(T[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createFieldDiagonalMatrix</h4> |
| <pre>public static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T> createFieldDiagonalMatrix(T[] diagonal)</pre> |
| <div class="block">Returns a diagonal matrix with specified elements.</div> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the type of the field elements</dd><dt><span class="strong">Parameters:</span></dt><dd><code>diagonal</code> - diagonal elements of the matrix (the array elements |
| will be copied)</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>diagonal matrix</dd><dt><span class="strong">Since:</span></dt> |
| <dd>2.0</dd></dl> |
| </li> |
| </ul> |
| <a name="createRealVector(double[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createRealVector</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> createRealVector(double[] data) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre> |
| <div class="block">Creates a <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> using the data from the input array.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - the input data</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a data.length RealVector</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if <code>data</code> is empty.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>data</code> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="createFieldVector(org.apache.commons.math3.FieldElement[])"> |
| <!-- --> |
| </a><a name="createFieldVector(T[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createFieldVector</h4> |
| <pre>public static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <a href="../../../../../org/apache/commons/math3/linear/FieldVector.html" title="interface in org.apache.commons.math3.linear">FieldVector</a><T> createFieldVector(T[] data) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/ZeroException.html" title="class in org.apache.commons.math3.exception">ZeroException</a></pre> |
| <div class="block">Creates a <a href="../../../../../org/apache/commons/math3/linear/FieldVector.html" title="interface in org.apache.commons.math3.linear"><code>FieldVector</code></a> using the data from the input array.</div> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the type of the field elements</dd><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - the input data</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a data.length FieldVector</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if <code>data</code> is empty.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>data</code> is <code>null</code>.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/ZeroException.html" title="class in org.apache.commons.math3.exception">ZeroException</a></code> - if <code>data</code> has 0 elements</dd></dl> |
| </li> |
| </ul> |
| <a name="createRowRealMatrix(double[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createRowRealMatrix</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> createRowRealMatrix(double[] rowData) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre> |
| <div class="block">Create a row <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> using the data from the input |
| array.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>rowData</code> - the input row data</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a 1 x rowData.length RealMatrix</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if <code>rowData</code> is empty.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>rowData</code> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="createRowFieldMatrix(org.apache.commons.math3.FieldElement[])"> |
| <!-- --> |
| </a><a name="createRowFieldMatrix(T[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createRowFieldMatrix</h4> |
| <pre>public static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T> createRowFieldMatrix(T[] rowData) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre> |
| <div class="block">Create a row <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> using the data from the input |
| array.</div> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the type of the field elements</dd><dt><span class="strong">Parameters:</span></dt><dd><code>rowData</code> - the input row data</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a 1 x rowData.length FieldMatrix</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if <code>rowData</code> is empty.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>rowData</code> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="createColumnRealMatrix(double[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createColumnRealMatrix</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> createColumnRealMatrix(double[] columnData) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre> |
| <div class="block">Creates a column <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> using the data from the input |
| array.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>columnData</code> - the input column data</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a columnData x 1 RealMatrix</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if <code>columnData</code> is empty.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>columnData</code> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="createColumnFieldMatrix(org.apache.commons.math3.FieldElement[])"> |
| <!-- --> |
| </a><a name="createColumnFieldMatrix(T[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createColumnFieldMatrix</h4> |
| <pre>public static <T extends <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><T>> <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><T> createColumnFieldMatrix(T[] columnData) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre> |
| <div class="block">Creates a column <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a> using the data from the input |
| array.</div> |
| <dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the type of the field elements</dd><dt><span class="strong">Parameters:</span></dt><dd><code>columnData</code> - the input column data</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a columnData x 1 FieldMatrix</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if <code>data</code> is empty.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>columnData</code> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkSymmetric(org.apache.commons.math3.linear.RealMatrix, double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkSymmetric</h4> |
| <pre>public static void checkSymmetric(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix, |
| double eps)</pre> |
| <div class="block">Checks whether a matrix is symmetric.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>matrix</code> - Matrix to check.</dd><dd><code>eps</code> - Relative tolerance.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></code> - if the matrix is not square.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/NonSymmetricMatrixException.html" title="class in org.apache.commons.math3.linear">NonSymmetricMatrixException</a></code> - if the matrix is not symmetric.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="isSymmetric(org.apache.commons.math3.linear.RealMatrix, double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSymmetric</h4> |
| <pre>public static boolean isSymmetric(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix, |
| double eps)</pre> |
| <div class="block">Checks whether a matrix is symmetric.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>matrix</code> - Matrix to check.</dd><dd><code>eps</code> - Relative tolerance.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> if <code>matrix</code> is symmetric.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.1</dd></dl> |
| </li> |
| </ul> |
| <a name="checkMatrixIndex(org.apache.commons.math3.linear.AnyMatrix, int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkMatrixIndex</h4> |
| <pre>public static void checkMatrixIndex(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int row, |
| int column) |
| throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Check if matrix indices are valid.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix.</dd><dd><code>row</code> - Row index to check.</dd><dd><code>column</code> - Column index to check.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if <code>row</code> or <code>column</code> is not |
| a valid index.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkRowIndex(org.apache.commons.math3.linear.AnyMatrix, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkRowIndex</h4> |
| <pre>public static void checkRowIndex(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int row) |
| throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Check if a row index is valid.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix.</dd><dd><code>row</code> - Row index to check.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if <code>row</code> is not a valid index.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkColumnIndex(org.apache.commons.math3.linear.AnyMatrix, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkColumnIndex</h4> |
| <pre>public static void checkColumnIndex(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int column) |
| throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Check if a column index is valid.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix.</dd><dd><code>column</code> - Column index to check.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if <code>column</code> is not a valid index.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkSubMatrixIndex(org.apache.commons.math3.linear.AnyMatrix, int, int, int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkSubMatrixIndex</h4> |
| <pre>public static void checkSubMatrixIndex(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int startRow, |
| int endRow, |
| int startColumn, |
| int endColumn) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Check if submatrix ranges indices are valid. |
| Rows and columns are indicated counting from 0 to <code>n - 1</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix.</dd><dd><code>startRow</code> - Initial row index.</dd><dd><code>endRow</code> - Final row index.</dd><dd><code>startColumn</code> - Initial column index.</dd><dd><code>endColumn</code> - Final column index.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the indices are invalid.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html" title="class in org.apache.commons.math3.exception">NumberIsTooSmallException</a></code> - if <code>endRow < startRow</code> or |
| <code>endColumn < startColumn</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkSubMatrixIndex(org.apache.commons.math3.linear.AnyMatrix, int[], int[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkSubMatrixIndex</h4> |
| <pre>public static void checkSubMatrixIndex(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> m, |
| int[] selectedRows, |
| int[] selectedColumns) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre> |
| <div class="block">Check if submatrix ranges indices are valid. |
| Rows and columns are indicated counting from 0 to n-1.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix.</dd><dd><code>selectedRows</code> - Array of row indices.</dd><dd><code>selectedColumns</code> - Array of column indices.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>selectedRows</code> or |
| <code>selectedColumns</code> are <code>null</code>.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</a></code> - if the row or column selections are empty (zero |
| length).</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if row or column selections are not valid.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkAdditionCompatible(org.apache.commons.math3.linear.AnyMatrix, org.apache.commons.math3.linear.AnyMatrix)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkAdditionCompatible</h4> |
| <pre>public static void checkAdditionCompatible(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> left, |
| <a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> right) |
| throws <a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear">MatrixDimensionMismatchException</a></pre> |
| <div class="block">Check if matrices are addition compatible.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>left</code> - Left hand side matrix.</dd><dd><code>right</code> - Right hand side matrix.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear">MatrixDimensionMismatchException</a></code> - if the matrices are not addition |
| compatible.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkSubtractionCompatible(org.apache.commons.math3.linear.AnyMatrix, org.apache.commons.math3.linear.AnyMatrix)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkSubtractionCompatible</h4> |
| <pre>public static void checkSubtractionCompatible(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> left, |
| <a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> right) |
| throws <a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear">MatrixDimensionMismatchException</a></pre> |
| <div class="block">Check if matrices are subtraction compatible</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>left</code> - Left hand side matrix.</dd><dd><code>right</code> - Right hand side matrix.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear">MatrixDimensionMismatchException</a></code> - if the matrices are not addition |
| compatible.</dd></dl> |
| </li> |
| </ul> |
| <a name="checkMultiplicationCompatible(org.apache.commons.math3.linear.AnyMatrix, org.apache.commons.math3.linear.AnyMatrix)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkMultiplicationCompatible</h4> |
| <pre>public static void checkMultiplicationCompatible(<a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> left, |
| <a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a> right) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre> |
| <div class="block">Check if matrices are multiplication compatible</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>left</code> - Left hand side matrix.</dd><dd><code>right</code> - Right hand side matrix.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if matrices are not multiplication |
| compatible.</dd></dl> |
| </li> |
| </ul> |
| <a name="fractionMatrixToRealMatrix(org.apache.commons.math3.linear.FieldMatrix)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fractionMatrixToRealMatrix</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/Array2DRowRealMatrix.html" title="class in org.apache.commons.math3.linear">Array2DRowRealMatrix</a> fractionMatrixToRealMatrix(<a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><<a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction">Fraction</a>> m)</pre> |
| <div class="block">Convert a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a>/<a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction"><code>Fraction</code></a> matrix to a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix to convert.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the converted matrix.</dd></dl> |
| </li> |
| </ul> |
| <a name="bigFractionMatrixToRealMatrix(org.apache.commons.math3.linear.FieldMatrix)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bigFractionMatrixToRealMatrix</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/Array2DRowRealMatrix.html" title="class in org.apache.commons.math3.linear">Array2DRowRealMatrix</a> bigFractionMatrixToRealMatrix(<a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear">FieldMatrix</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>> m)</pre> |
| <div class="block">Convert a <a href="../../../../../org/apache/commons/math3/linear/FieldMatrix.html" title="interface in org.apache.commons.math3.linear"><code>FieldMatrix</code></a>/<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> matrix to a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix to convert.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the converted matrix.</dd></dl> |
| </li> |
| </ul> |
| <a name="serializeRealVector(org.apache.commons.math3.linear.RealVector, java.io.ObjectOutputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serializeRealVector</h4> |
| <pre>public static void serializeRealVector(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> vector, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a> oos) |
| throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Serialize a <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a>. |
| <p> |
| This method is intended to be called from within a private |
| <code>writeObject</code> method (after a call to |
| <code>oos.defaultWriteObject()</code>) in a class that has a |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> field, which should be declared <code>transient</code>. |
| This way, the default handling does not serialize the vector (the <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> interface is not serializable by default) but this method does |
| serialize it specifically. |
| </p> |
| <p> |
| The following example shows how a simple class with a name and a real vector |
| should be written: |
| <pre><code> |
| public class NamedVector implements Serializable { |
| |
| private final String name; |
| private final transient RealVector coefficients; |
| |
| // omitted constructors, getters ... |
| |
| private void writeObject(ObjectOutputStream oos) throws IOException { |
| oos.defaultWriteObject(); // takes care of name field |
| MatrixUtils.serializeRealVector(coefficients, oos); |
| } |
| |
| private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { |
| ois.defaultReadObject(); // takes care of name field |
| MatrixUtils.deserializeRealVector(this, "coefficients", ois); |
| } |
| |
| } |
| </code></pre> |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>vector</code> - real vector to serialize</dd><dd><code>oos</code> - stream where the real vector should be written</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if object cannot be written to stream</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#deserializeRealVector(java.lang.Object, java.lang.String, java.io.ObjectInputStream)"><code>deserializeRealVector(Object, String, ObjectInputStream)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="deserializeRealVector(java.lang.Object, java.lang.String, java.io.ObjectInputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deserializeRealVector</h4> |
| <pre>public static void deserializeRealVector(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> instance, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fieldName, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a> ois) |
| throws <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a>, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Deserialize a <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> field in a class. |
| <p> |
| This method is intended to be called from within a private |
| <code>readObject</code> method (after a call to |
| <code>ois.defaultReadObject()</code>) in a class that has a |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> field, which should be declared <code>transient</code>. |
| This way, the default handling does not deserialize the vector (the <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> interface is not serializable by default) but this method does |
| deserialize it specifically. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>instance</code> - instance in which the field must be set up</dd><dd><code>fieldName</code> - name of the field within the class (may be private and final)</dd><dd><code>ois</code> - stream from which the real vector should be read</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code> - if a class in the stream cannot be found</dd> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if object cannot be read from the stream</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#serializeRealVector(org.apache.commons.math3.linear.RealVector, java.io.ObjectOutputStream)"><code>serializeRealVector(RealVector, ObjectOutputStream)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="serializeRealMatrix(org.apache.commons.math3.linear.RealMatrix, java.io.ObjectOutputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serializeRealMatrix</h4> |
| <pre>public static void serializeRealMatrix(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a> oos) |
| throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Serialize a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>. |
| <p> |
| This method is intended to be called from within a private |
| <code>writeObject</code> method (after a call to |
| <code>oos.defaultWriteObject()</code>) in a class that has a |
| <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> field, which should be declared <code>transient</code>. |
| This way, the default handling does not serialize the matrix (the <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> interface is not serializable by default) but this method does |
| serialize it specifically. |
| </p> |
| <p> |
| The following example shows how a simple class with a name and a real matrix |
| should be written: |
| <pre><code> |
| public class NamedMatrix implements Serializable { |
| |
| private final String name; |
| private final transient RealMatrix coefficients; |
| |
| // omitted constructors, getters ... |
| |
| private void writeObject(ObjectOutputStream oos) throws IOException { |
| oos.defaultWriteObject(); // takes care of name field |
| MatrixUtils.serializeRealMatrix(coefficients, oos); |
| } |
| |
| private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { |
| ois.defaultReadObject(); // takes care of name field |
| MatrixUtils.deserializeRealMatrix(this, "coefficients", ois); |
| } |
| |
| } |
| </code></pre> |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>matrix</code> - real matrix to serialize</dd><dd><code>oos</code> - stream where the real matrix should be written</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if object cannot be written to stream</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#deserializeRealMatrix(java.lang.Object, java.lang.String, java.io.ObjectInputStream)"><code>deserializeRealMatrix(Object, String, ObjectInputStream)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="deserializeRealMatrix(java.lang.Object, java.lang.String, java.io.ObjectInputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deserializeRealMatrix</h4> |
| <pre>public static void deserializeRealMatrix(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> instance, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fieldName, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a> ois) |
| throws <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a>, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Deserialize a <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> field in a class. |
| <p> |
| This method is intended to be called from within a private |
| <code>readObject</code> method (after a call to |
| <code>ois.defaultReadObject()</code>) in a class that has a |
| <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> field, which should be declared <code>transient</code>. |
| This way, the default handling does not deserialize the matrix (the <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> interface is not serializable by default) but this method does |
| deserialize it specifically. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>instance</code> - instance in which the field must be set up</dd><dd><code>fieldName</code> - name of the field within the class (may be private and final)</dd><dd><code>ois</code> - stream from which the real matrix should be read</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code> - if a class in the stream cannot be found</dd> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if object cannot be read from the stream</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#serializeRealMatrix(org.apache.commons.math3.linear.RealMatrix, java.io.ObjectOutputStream)"><code>serializeRealMatrix(RealMatrix, ObjectOutputStream)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="solveLowerTriangularSystem(org.apache.commons.math3.linear.RealMatrix, org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>solveLowerTriangularSystem</h4> |
| <pre>public static void solveLowerTriangularSystem(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> rm, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> b) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a>, |
| <a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></pre> |
| <div class="block">Solve a system of composed of a Lower Triangular Matrix |
| <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>. |
| <p> |
| This method is called to solve systems of equations which are |
| of the lower triangular form. The matrix <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> |
| is assumed, though not checked, to be in lower triangular form. |
| The vector <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> is overwritten with the solution. |
| The matrix is checked that it is square and its dimensions match |
| the length of the vector. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>rm</code> - RealMatrix which is lower triangular</dd><dd><code>b</code> - RealVector this is overwritten</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the matrix and vector are not |
| conformable</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></code> - if the matrix <code>rm</code> is not square</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if the absolute value of one of the diagonal |
| coefficient of <code>rm</code> is lower than <a href="../../../../../org/apache/commons/math3/util/Precision.html#SAFE_MIN"><code>Precision.SAFE_MIN</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="solveUpperTriangularSystem(org.apache.commons.math3.linear.RealMatrix, org.apache.commons.math3.linear.RealVector)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>solveUpperTriangularSystem</h4> |
| <pre>public static void solveUpperTriangularSystem(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> rm, |
| <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a> b) |
| throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a>, |
| <a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a>, |
| <a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></pre> |
| <div class="block">Solver a system composed of an Upper Triangular Matrix |
| <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a>. |
| <p> |
| This method is called to solve systems of equations which are |
| of the lower triangular form. The matrix <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear"><code>RealMatrix</code></a> |
| is assumed, though not checked, to be in upper triangular form. |
| The vector <a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear"><code>RealVector</code></a> is overwritten with the solution. |
| The matrix is checked that it is square and its dimensions match |
| the length of the vector. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>rm</code> - RealMatrix which is upper triangular</dd><dd><code>b</code> - RealVector this is overwritten</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the matrix and vector are not |
| conformable</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></code> - if the matrix <code>rm</code> is not |
| square</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if the absolute value of one of the diagonal |
| coefficient of <code>rm</code> is lower than <a href="../../../../../org/apache/commons/math3/util/Precision.html#SAFE_MIN"><code>Precision.SAFE_MIN</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="blockInverse(org.apache.commons.math3.linear.RealMatrix, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>blockInverse</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> blockInverse(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> m, |
| int splitIndex)</pre> |
| <div class="block">Computes the inverse of the given matrix by splitting it into |
| 4 sub-matrices.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix whose inverse must be computed.</dd><dd><code>splitIndex</code> - Index that determines the "split" line and |
| column. |
| The element corresponding to this index will part of the |
| upper-left sub-matrix.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the inverse of <code>m</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></code> - if <code>m</code> is not square.</dd></dl> |
| </li> |
| </ul> |
| <a name="inverse(org.apache.commons.math3.linear.RealMatrix)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>inverse</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> inverse(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a>, |
| <a href="../../../../../org/apache/commons/math3/linear/SingularMatrixException.html" title="class in org.apache.commons.math3.linear">SingularMatrixException</a>, |
| <a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></pre> |
| <div class="block">Computes the inverse of the given matrix. |
| <p> |
| By default, the inverse of the matrix is computed using the QR-decomposition, |
| unless a more efficient method can be determined for the input matrix. |
| <p> |
| Note: this method will use a singularity threshold of 0, |
| use <a href="../../../../../org/apache/commons/math3/linear/MatrixUtils.html#inverse(org.apache.commons.math3.linear.RealMatrix, double)"><code>inverse(RealMatrix, double)</code></a> if a different threshold is needed.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>matrix</code> - Matrix whose inverse shall be computed</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the inverse of <code>matrix</code></dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>matrix</code> is <code>null</code></dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/SingularMatrixException.html" title="class in org.apache.commons.math3.linear">SingularMatrixException</a></code> - if m is singular</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></code> - if matrix is not square</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.3</dd></dl> |
| </li> |
| </ul> |
| <a name="inverse(org.apache.commons.math3.linear.RealMatrix, double)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>inverse</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> inverse(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a> matrix, |
| double threshold) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a>, |
| <a href="../../../../../org/apache/commons/math3/linear/SingularMatrixException.html" title="class in org.apache.commons.math3.linear">SingularMatrixException</a>, |
| <a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></pre> |
| <div class="block">Computes the inverse of the given matrix. |
| <p> |
| By default, the inverse of the matrix is computed using the QR-decomposition, |
| unless a more efficient method can be determined for the input matrix.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>matrix</code> - Matrix whose inverse shall be computed</dd><dd><code>threshold</code> - Singularity threshold</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the inverse of <code>m</code></dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>matrix</code> is <code>null</code></dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/SingularMatrixException.html" title="class in org.apache.commons.math3.linear">SingularMatrixException</a></code> - if matrix is singular</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/linear/NonSquareMatrixException.html" title="class in org.apache.commons.math3.linear">NonSquareMatrixException</a></code> - if matrix is not square</dd><dt><span class="strong">Since:</span></dt> |
| <dd>3.3</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MatrixUtils.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/commons/math3/linear/NonPositiveDefiniteMatrixException.html" title="class in org.apache.commons.math3.linear"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/commons/math3/linear/MatrixUtils.html" target="_top">Frames</a></li> |
| <li><a href="MatrixUtils.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2003–2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |