All Projects → JuliaSmoothOptimizers → LinearOperators.jl

JuliaSmoothOptimizers / LinearOperators.jl

Licence: other
Linear Operators for Julia

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to LinearOperators.jl

18s191
Course 18.S191 at MIT, Spring 2021 - Introduction to computational thinking with Julia:
Stars: ✭ 2,094 (+1561.9%)
Mutual labels:  julia-language
QSimulator.jl
Unitary and Lindbladian evolution in Julia
Stars: ✭ 19 (-84.92%)
Mutual labels:  julia-language
SpineOpt.jl
A highly adaptable modelling framework for multi-energy systems
Stars: ✭ 25 (-80.16%)
Mutual labels:  julia-language
TemporalGPs.jl
Fast inference for Gaussian processes in problems involving time. Partly built on results from https://proceedings.mlr.press/v161/tebbutt21a.html
Stars: ✭ 89 (-29.37%)
Mutual labels:  julia-language
NotebookToLaTeX.jl
A Julia package for converting your Pluto and Jupyter Notebooks into beautiful Latex.
Stars: ✭ 70 (-44.44%)
Mutual labels:  julia-language
DataFrames
Welcome to DataFrames.jl with Bogumił Kamiński
Stars: ✭ 106 (-15.87%)
Mutual labels:  julia-language
Julia
The Julia Programming Language
Stars: ✭ 37,497 (+29659.52%)
Mutual labels:  julia-language
JUDI.jl
Julia Devito inversion.
Stars: ✭ 71 (-43.65%)
Mutual labels:  linear-operators
bra-ket-vue
⟨𝜑|𝜓⟩.vue - a Vue-based visualization of quantum states and operations
Stars: ✭ 28 (-77.78%)
Mutual labels:  matrices
BenchmarksPythonJuliaAndCo
Benchmark(s) of numerical programs with Python (and Scipy, Pythran, Numba), Julia and C++.
Stars: ✭ 19 (-84.92%)
Mutual labels:  julia-language
learningjulia
A blog where I document my learning of the Julia programming language.
Stars: ✭ 15 (-88.1%)
Mutual labels:  julia-language
ComputationalMathematics
Lecture slides and homework assignments for MA5233 Computational Mathematics at the National University of Singapore.
Stars: ✭ 35 (-72.22%)
Mutual labels:  julia-language
mathcore
Advanced .NET math library (.NET Standard).
Stars: ✭ 24 (-80.95%)
Mutual labels:  matrices
GlobalSensitivity.jl
Robust, Fast, and Parallel Global Sensitivity Analysis (GSA) in Julia
Stars: ✭ 30 (-76.19%)
Mutual labels:  julia-language
Abacus
Advanced Combinatorics and Algebraic Number Theory Symbolic Computation library for JavaScript, Python
Stars: ✭ 16 (-87.3%)
Mutual labels:  matrices
Gen.jl
A general-purpose probabilistic programming system with programmable inference
Stars: ✭ 1,595 (+1165.87%)
Mutual labels:  julia-language
Machine-Learning
🌎 I created this repository for educational purposes. It will host a number of projects as part of the process .
Stars: ✭ 38 (-69.84%)
Mutual labels:  matrices
ECharts.jl
Julia package for the Apache ECharts v4 visualization library
Stars: ✭ 80 (-36.51%)
Mutual labels:  julia-language
Bonobo.jl
A general branch and bound framework
Stars: ✭ 26 (-79.37%)
Mutual labels:  julia-language
MachineLearning
An easy neural network for Java!
Stars: ✭ 125 (-0.79%)
Mutual labels:  matrices

A Julia Linear Operator Package

Documentation Linux/macOS/Windows/FreeBSD Coverage DOI
docs-stable docs-dev build-gh build-cirrus codecov doi

How to Cite

If you use LinearOperators.jl in your work, please cite using the format given in CITATION.bib.

Philosophy

Operators behave like matrices (with some exceptions - see below) but are defined by their effect when applied to a vector. They can be transposed, conjugated, or combined with other operators cheaply. The costly operation is deferred until multiplied with a vector.

Compatibility

Julia 1.3 and up.

How to Install

pkg> add LinearOperators
pkg> test LinearOperators

How to use

Check the tutorial.

Operators Available

Operator Description
LinearOperator Base class. Useful to define operators from functions
TimedLinearOperator Linear operator instrumented with timers from TimerOutputs
BlockDiagonalOperator Block-diagonal linear operator
opEye Identity operator
opOnes All ones operator
opZeros All zeros operator
opDiagonal Square (equivalent to diagm()) or rectangular diagonal operator
opInverse Equivalent to \
opCholesky More efficient than opInverse for symmetric positive definite matrices
opHouseholder Apply a Householder transformation I-2hh'
opHermitian Represent a symmetric/hermitian operator based on the diagonal and strict lower triangle
opRestriction Represent a selection of "rows" when composed on the left with an existing operator
opExtension Represent a selection of "columns" when composed on the right with an existing operator
LBFGSOperator Limited-memory BFGS approximation in operator form (damped or not)
InverseLBFGSOperator Inverse of a limited-memory BFGS approximation in operator form (damped or not)
LSR1Operator Limited-memory SR1 approximation in operator form

Utility Functions

Function Description
check_ctranspose Cheap check that A' is correctly implemented
check_hermitian Cheap check that A = A'
check_positive_definite Cheap check that an operator is positive (semi-)definite
diag Extract the diagonal of an operator
Matrix Convert an abstract operator to a dense array
hermitian Determine whether the operator is Hermitian
push! For L-BFGS or L-SR1 operators, push a new pair {s,y}
reset! For L-BFGS or L-SR1 operators, reset the data
shape Return the size of a linear operator
show Display basic information about an operator
size Return the size of a linear operator
symmetric Determine whether the operator is symmetric
normest Estimate the 2-norm

Other Operations on Operators

Operators can be transposed (transpose(A)), conjugated (conj(A)) and conjugate-transposed (A'). Operators can be sliced (A[:,3], A[2:4,1:5], A[1,1]), but unlike matrices, slices always return operators (see differences below).

Differences

Unlike matrices, an operator never reduces to a vector or a number.

A = rand(5,5)
opA = LinearOperator(A)
A[:,1] * 3 # Vector
opA[:,1] * 3 # LinearOperator
A[:,1] * [3] # ERROR
opA[:,1] * [3] # Vector

This is also true for A[i,J], which returns vectors on 0.5, and for the scalar A[i,j]. Similarly, opA[1,1] is an operator of size (1,1):"

opA[1,1] # LinearOperator
A[1,1] # Number

In the same spirit, the operator full always returns a matrix.

full(opA[:,1]) # nx1 matrix

Other Operators

  • LimitedLDLFactorizations features a limited-memory LDLT factorization operator that may be used as preconditioner in iterative methods
  • MUMPS.jl features a full distributed-memory factorization operator that may be used to represent the preconditioner in, e.g., constraint-preconditioned Krylov methods.

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers organization, so questions about any of our packages are welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].