\n\n\n\nLUDecomposition\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n
\n
\n
\n\n\n\n
\n
org.jscience.mathematics.vector
\n

## Class LUDecomposition<F extends Field<F>>

\n
\n
\n
\n
• java.lang.Object
• \n
• \n
\n
• org.jscience.mathematics.vector.LUDecomposition<F>
• \n
\n
• \n
\n
\n
\n
• \n
\n
\n
`public final class LUDecomposition<F extends Field<F>>\nextends Object`
\n

This class represents the decomposition of a `matrix` \n `A` into a product of a `lower` \n and `upper` triangular matrices, `L`\n and `U` respectively, such as `A = P\xc2\xb7L\xc2\xb7U with \n P a permutation matrix.`

`\n \n This decomposition is typically used to resolve linear systems\n of equations (Gaussian elimination) or to calculate the determinant\n of a square Matrix (O(m\xc2\xb3)).\n \n Numerical stability is guaranteed through pivoting if the\n Field elements are numbers\n For others elements types, numerical stability can be ensured by setting\n the context-local pivot \n comparator (see setPivotComparator(java.util.Comparator<org.jscience.mathematics.structure.Field>)).\n \n Pivoting can be disabled by setting the pivot comparator to null (P \n is then the matrix identity).`
`\nSee Also:\n Wikipedia: LU decomposition\n`
• `\n`
`\n`
`\n\n\n\n\n\n\n\n\nField Summary\n\n\n\n\n\n\n\n\n\n\nFields Modifier and TypeField and Descriptionstatic Comparator<Field>NUMERIC_COMPARATOR\nHolds the default comparator for pivoting.\n\n\n\n\n\n\n\n\nMethod Summary\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nMethods Modifier and TypeMethod and DescriptionFdeterminant()\nReturns the determinant of the Matrix having this\n decomposition.\nDenseMatrix<F>getLower(F zero,\n F one)\nReturns the lower matrix decomposition (L) with diagonal\n elements equal to the multiplicative identity for F.\nDenseMatrix<F>getLU()\nReturns the lower/upper decomposition in one single matrix.\nSparseMatrix<F>getPermutation(F zero,\n F one)\nReturns the permutation matrix (P).\nstatic Comparator<Field>getPivotComparator()\nReturns the local \n comparator used for pivoting or null if pivoting \n is not performed (default NUMERIC_COMPARATOR).\njavolution.util.FastTable<javolution.util.Index>getPivots()\nReturns the pivots elements of this decomposition.\nDenseMatrix<F>getUpper(F zero)\nReturns the upper matrix decomposition (U).\nDenseMatrix<F>inverse()\nReturns the solution X of the equation: A * X = Identity with\n this = A.lu() using back and forward substitutions.\nstatic voidsetPivotComparator(Comparator<Field> cmp)\nSets the local comparator used \n for pivoting or null to disable pivoting.\nDenseMatrix<F>solve(Matrix<F> B)\nReturns the solution X of the equation: A * X = B with\n this = A.lu() using back and forward substitutions.\nstatic <F extends Field<F>> LUDecomposition<F>valueOf(Matrix<F> source)\nReturns the lower/upper decomposition of the specified matrix.\n\n\n\n\n\nMethods inherited from class java.lang.Object\nequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nField Detail\n\n\n\n\n\nNUMERIC_COMPARATOR\npublic static final Comparator<Field> NUMERIC_COMPARATOR\nHolds the default comparator for pivoting.\n\n\n\n\n\n\n\n\n\nMethod Detail\n\n\n\n\n\nvalueOf\npublic static <F extends Field<F>> LUDecomposition<F> valueOf(Matrix<F> source)\nReturns the lower/upper decomposition of the specified matrix.\nParameters:source - the matrix for which the decomposition is calculated.\nReturns:the lower/upper decomposition of the specified matrix.\nThrows:\nDimensionException - if the specified matrix is not square.\n\n\n\n\n\n\n\nsetPivotComparator\npublic static void setPivotComparator(Comparator<Field> cmp)\nSets the local comparator used \n for pivoting or null to disable pivoting.\nParameters:cmp - the comparator for pivoting or null.\n\n\n\n\n\n\n\ngetPivotComparator\npublic static Comparator<Field> getPivotComparator()\nReturns the local \n comparator used for pivoting or null if pivoting \n is not performed (default NUMERIC_COMPARATOR).\nReturns:the comparator for pivoting or null.\n\n\n\n\n\n\n\nsolve\npublic DenseMatrix<F> solve(Matrix<F> B)\nReturns the solution X of the equation: A * X = B with\n this = A.lu() using back and forward substitutions.\nParameters:B - the input matrix.\nReturns:the solution X = (1 / A) * B.\nThrows:\nDimensionException - if the dimensions do not match.\n\n\n\n\n\n\n\ninverse\npublic DenseMatrix<F> inverse()\nReturns the solution X of the equation: A * X = Identity with\n this = A.lu() using back and forward substitutions.\nReturns:this.solve(Identity)\n\n\n\n\n\n\n\ndeterminant\npublic F determinant()\nReturns the determinant of the Matrix having this\n decomposition.\nReturns:the determinant of the matrix source.\n\n\n\n\n\n\n\n\n\ngetLower\npublic DenseMatrix<F> getLower(F zero,\n F one)\nReturns the lower matrix decomposition (L) with diagonal\n elements equal to the multiplicative identity for F.\nParameters:zero - the additive identity for F.one - the multiplicative identity for F.\nReturns:the lower matrix.\n\n\n\n\n\n\n\n\n\ngetUpper\npublic DenseMatrix<F> getUpper(F zero)\nReturns the upper matrix decomposition (U).\nParameters:zero - the additive identity for F.\nReturns:the upper matrix.\n\n\n\n\n\n\n\n\n\ngetPermutation\npublic SparseMatrix<F> getPermutation(F zero,\n F one)\nReturns the permutation matrix (P).\nParameters:zero - the additive identity for F.one - the multiplicative identity for F.\nReturns:the permutation matrix.\n\n\n\n\n\n\n\ngetLU\npublic DenseMatrix<F> getLU()\nReturns the lower/upper decomposition in one single matrix.\nReturns:the lower/upper matrix merged in a single matrix.\n\n\n\n\n\n\n\ngetPivots\npublic javolution.util.FastTable<javolution.util.Index> getPivots()\nReturns the pivots elements of this decomposition.\nReturns:the row indices after permutation.\n\n\n\n\n\n\n\n`
```\n\n\n\n\n\n\n\n\nOverview\nPackage\nClass\nTree\nIndex\nHelp\n\n\n\n\n\nPrev Class\nNext Class\n\n\nFrames\nNo Frames\n\n\nAll Classes\n\n\n<!--\n allClassesLink = document.getElementById("allclasses_navbar_bottom");\n if(window==top) {\n allClassesLink.style.display = "block";\n }\n else {\n allClassesLink.style.display = "none";\n }\n //-->\n\n\n\n\nSummary: \nNested | \nField | \nConstr | \nMethod\n\n\nDetail: \nField | \nConstr | \nMethod\n\n\n\n\n\n\nSCaVis 1.0 © jWork.org\n\n\n ```
``` © 2013 Powered by Doc2SQL Page generated in 0.358321905136 seconds and 221 kB ```