lufact
.. lufact(A [,pivot=Val{true}]) -> F
Compute the LU factorization of ``A``. The return type of ``F`` depends on the type of ``A``. In most cases, if ``A`` is a subtype ``S`` of AbstractMatrix with an element type ``T`` supporting ``+``, ``-``, ``*`` and ``/`` the return type is ``LU{T,S{T}}``. If pivoting is chosen (default) the element type should also support ``abs`` and ``<``. When ``A`` is sparse and have element of type ``Float32``, ``Float64``, ``Complex{Float32}``, or ``Complex{Float64}`` the return type is ``UmfpackLU``. Some examples are shown in the table below.
======================= ========================= ========================================
Type of input ``A`` Type of output ``F`` Relationship between ``F`` and ``A``
======================= ========================= ========================================
:func:`Matrix` ``LU`` ``F[:L]*F[:U] == A[F[:p], :]``
:func:`Tridiagonal` ``LU{T,Tridiagonal{T}}`` ``F[:L]*F[:U] == A[F[:p], :]``
:func:`SparseMatrixCSC` ``UmfpackLU`` ``F[:L]*F[:U] == (F[:Rs] .* A)[F[:p], F[:q]]``
======================= ========================= ========================================
The individual components of the factorization ``F`` can be accessed by indexing:
=========== ======================================= ====== ======================== =============
Component Description ``LU`` ``LU{T,Tridiagonal{T}}`` ``UmfpackLU``
=========== ======================================= ====== ======================== =============
``F[:L]`` ``L`` (lower triangular) part of ``LU`` ✓ ✓ ✓
``F[:U]`` ``U`` (upper triangular) part of ``LU`` ✓ ✓ ✓
``F[:p]`` (right) permutation ``Vector`` ✓ ✓ ✓
``F[:P]`` (right) permutation ``Matrix`` ✓ ✓
``F[:q]`` left permutation ``Vector`` ✓
``F[:Rs]`` ``Vector`` of scaling factors ✓
``F[:(:)]`` ``(L,U,p,q,Rs)`` components ✓
=========== ======================================= ====== ======================== =============
================== ====== ======================== =============
Supported function ``LU`` ``LU{T,Tridiagonal{T}}`` ``UmfpackLU``
================== ====== ======================== =============
``/`` ✓
``\`` ✓ ✓ ✓
``cond`` ✓ ✓
``det`` ✓ ✓ ✓
``logdet`` ✓ ✓
``logabsdet`` ✓ ✓
``size`` ✓ ✓
================== ====== ======================== =============
Examples
See Also
User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.