Coder Social home page Coder Social logo

ldufacts.jl's Introduction

LDUFacts

Build Status Coverage Status

Introduction

This package is dedicated to the L-D-Lt factorization of symmetric real and Hermitian matrices.

In contrast to Cholesky factorization, which is appropriate for most use cases, it has the following features:

  • handle also the indefinite case (Cholesky requires positive (semi)-definite)
  • square-root free algorithm
  • exact operation with real and complex rational types
  • exact operation with user-defined field types
  • option of full pivot search

Algorithm

Factors P, L, D of matrix A are found in a way, that P' * A * P = L * D * L'.

Here D is diagonal and real, L is lower unit triangular, and P is a 'simple' square matrix. With diagonal pivot search, P is a permutation matrix, with full pivot search up to n-1 nonzero additional matrix elements may occur. Without pivot search, P is the unit matrix.

When not a full pivot search is done, it is possible, that the algorithm fails before the factors are found.

For positive definite matrices, the no-pivot version is guaranteed to succeed. For positive semi-definite matrices, a diagonal pivot search always succeeds, for infefinite matrices, a full pivot search is required for that.

There are examples of regular matrices, (e.g. [0. 1; 1 0]), which do not have any factorization where P is a permutation. For those cases the full pivot search is required.

Usage

]add LDUFacts

using LDUFacts

A = Matrix(Symmetric(rand(5, 5)))
la = ldu(A, FullPivot())

issuccess(la)
rank(la)
la.L
la.d
la.P' * A * la.P - la.L * la.D * la.L' # should be close to zero

ldufacts.jl's People

Contributors

klausc avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.