• Stars
    star
    146
  • Rank 244,184 (Top 5 %)
  • Language
    Julia
  • License
    Other
  • Created almost 10 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Linear Operators for Julia

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.

More Repositories

1

Krylov.jl

A Julia Basket of Hand-Picked Krylov Methods
Julia
304
star
2

NLPModels.jl

Data Structures for Optimization Models
Julia
145
star
3

OptimizationProblems.jl

Optimization Problems for Julia
Julia
77
star
4

JSOSolvers.jl

Julia
58
star
5

Percival.jl

Implementation of a Augmented Lagrangian method
Julia
50
star
6

HSL.jl

Julia interface to the HSL Mathematical Software Library
Julia
40
star
7

MUMPS.jl

A Julia Interface to MUMPS
Julia
40
star
8

LDLFactorizations.jl

Factorization of Symmetric Matrices
Julia
32
star
9

CUTEst.jl

Julia's CUTEst Interface
Julia
32
star
10

RipQP.jl

Julia
29
star
11

NLPModelsJuMP.jl

Create NLPModels with JuMP
Julia
29
star
12

BenchmarkProfiles.jl

Performance and data profiles
Julia
26
star
13

SolverTools.jl

Tools for developing nonlinear optimization solvers.
Julia
25
star
14

ADNLPModels.jl

Julia
25
star
15

LimitedLDLFactorizations.jl

Limited-Memory Factorization of Symmetric Matrices
Julia
22
star
16

CaNNOLeS.jl

Constrained and NoNlinear Optimizer of Least Squares
Julia
22
star
17

SolverBenchmark.jl

Benchmark tools for solvers
Julia
21
star
18

AMD.jl

Approximate Minimum Degree Ordering in Julia
Julia
19
star
19

AmplNLReader.jl

Julia AMPL Models Conforming to NLPModels.jl
Julia
18
star
20

PDENLPModels.jl

A NLPModel API for optimization problems with PDE-constraints
Julia
18
star
21

QPSReader.jl

A reader for MPS and QPS files
Julia
17
star
22

JSOSuite.jl

One stop solutions for all things optimization
Julia
16
star
23

NLPModelsIpopt.jl

A thin IPOPT wrapper for NLPModels
Julia
16
star
24

PROPACK.jl

Julia wrapper of the PROPACK sparse SVD library
Julia
15
star
25

DCISolver.jl

Julia
15
star
26

QuadraticModels.jl

Data structures for linear and quadratic optimization problems based on NLPModels.jl
Julia
15
star
27

QRMumps.jl

Interface to multicore QR factorization qr_mumps
Julia
12
star
28

NLPModelsKnitro.jl

A thin KNITRO wrapper for NLPModels
Julia
11
star
29

BasicLU.jl

A Julia Interface to BasicLU
Julia
10
star
30

ExpressionTreeForge.jl

Julia
10
star
31

PartitionedStructures.jl

Partitioned derivatives storage and partitioned quasi-Newton updates
Julia
10
star
32

SuiteSparseMatrixCollection.jl

A straightforward interface to the SuiteSparse Matrix Collection
Julia
9
star
33

PartiallySeparableNLPModels.jl

A three-way bridge between ExpressionTreeForge.jl, PartitionedStructures.jl and PartiallySeparableSolvers.jl
Julia
9
star
34

RegularizedOptimization.jl

Algorithms for regularized optimization
Julia
9
star
35

FletcherPenaltySolver.jl

Fletcher's penalty method for nonlinear optimization models
Julia
9
star
36

KnetNLPModels.jl

An NLPModels Interface to Knet
Julia
8
star
37

NLSProblems.jl

Nonlinear Least Squares problems
Julia
8
star
38

PartitionedVectors.jl

Julia
8
star
39

BundleAdjustmentModels.jl

Julia repository of bundle adjustment problems
Julia
8
star
40

PartiallySeparableSolvers.jl

Trust-region methods with partitioned quasi-Newton approximations
Julia
8
star
41

JSOTemplate.jl

Template for JSO packages
Julia
7
star
42

NLPModelsTest.jl

Julia
7
star
43

SparseMatricesCOO.jl

Sparse matrices in coordinate format for Julia
Julia
7
star
44

NCL.jl

A nonlinearly-constrained augmented-Lagrangian method
Julia
6
star
45

FluxNLPModels.jl

Julia
6
star
46

LLSModels.jl

Julia
6
star
47

DerivativeFreeSolvers.jl

Julia
6
star
48

AdaptiveRegularization.jl

Julia
6
star
49

SolverCore.jl

Julia
6
star
50

DiffKrylov.jl

Julia
6
star
51

NLPModelsModifiers.jl

Julia
6
star
52

JSOTutorials.jl

Julia
5
star
53

RegularizedProblems.jl

Test Cases for Regularized Optimization
Julia
5
star
54

ShiftedProximalOperators.jl

Proximal operators for use with RegularizedOptimization
Julia
5
star
55

JuliaSmoothOptimizers.github.io

Organization website
JavaScript
5
star
56

KrylovPreconditioners.jl

The ultimate collection of preconditioners
Julia
5
star
57

Organization

Organization
Julia
4
star
58

SolverTest.jl

Julia
4
star
59

ADNLPModelProblems.jl

A list of optimization problems in ADNLPModel format
Julia
4
star
60

OperatorScaling.jl

Julia
3
star
61

QuadraticModelsGurobi.jl

Julia
3
star
62

ManualNLPModels.jl

NLPModel where all functions are defined by the user
Julia
3
star
63

QuadraticModelsXpress.jl

Julia
2
star
64

OptSolver.jl

Julia
2
star
65

SolverLogger.jl

Julia
2
star
66

QuadraticModelsCPLEX.jl

Julia
2
star
67

LinAlgSolver.jl

Julia
2
star
68

SolverParameters.jl

Julia
2
star
69

PartitionedKnetNLPModels.jl

Julia
2
star
70

MultiPrecisionR2

Mutli-Precision extension of Quadratic Regularization (R2) optimization algorithm to finite precision computations.
Julia
1
star
71

SymCOOSolverInterface.jl

Julia
1
star
72

RegularizationModel.jl

Example of an NLPModel
Julia
1
star