Version history
What's new in v3.2
- In-place left-multiplication
mul!(Y, X, A::LinearMap)
is now allowed forX::AbstractMatrix
and implemented via the adjoint equationY' = A'X'
.
What's new in v3.1
- In Julia v1.3 and above,
LinearMap
-typed objects are callable onAbstractVector
s: ForL::LinearMap
andx::AbstractVector
,L(x) = L*x
.
What's new in v3.0
- BREAKING change: Internally, any dependence on former
A*_mul_B!
methods is abandonned. For customLinearMap
subtypes, there are now two options:- In case your type is invariant under adjoint/transposition (i.e.,
adjoint(L::MyLinearMap)::MyLinearMap
similar to, for instance,LinearCombination
s orCompositeMap
s,At_mul_B!
andAc_mul_B!
do not require any replacement! Rather, multiplication byL'
is, in this case, handled bymul!(y, L::MyLinearMap, x[, α, β])
. - Otherwise, you will need to define
mul!
methods with the signaturemul!(y, L::TransposeMap{<:Any,MyLinearMap}, x[, α, β])
andmul!(y, L::AdjointMap{<:Any,MyLinearMap}, x[, α, β])
.
- In case your type is invariant under adjoint/transposition (i.e.,
- Left multiplying by a transpose or adjoint vector (e.g.,
y'*A
) produces a transpose or adjoint vector output, rather than a compositeLinearMap
. - Block concatenation now handles matrices and vectors directly by internal promotion to
LinearMap
s. For[h/v/hc]cat
it suffices to have aLinearMap
object anywhere in the list of arguments. For the block-diagonal concatenation viaSparseArrays.blockdiag
, aLinearMap
object has to appear among the first 8 arguments. This restriction, however, does not apply to block-diagonal concatenation viaBase.cat(As...; dims=(1,2))
. - Introduction of more expressive and visually appealing
show
methods, replacing the fallback to the genericshow
.
What's new in v2.7
- Potential reduction of memory allocations in multiplication of
LinearCombination
s,BlockMap
s, and real- or complex-scaledLinearMap
s. For the latter, a new internal typeScaledMap
has been introduced. - Multiplication code for
CompositeMap
s has been refactored to facilitate to provide memory for storage of intermediate results by directly calling helper functions.
What's new in v2.6
- New feature: "lazy" Kronecker product, Kronecker sums, and powers thereof for
LinearMap
s.AbstractMatrix
objects are promoted toLinearMap
s if one of the first 8 Kronecker factors is aLinearMap
object. - Compatibility with the generic multiply-and-add interface (a.k.a. 5-arg
mul!
) introduced in julia v1.3
What's new in v2.5
- New feature: concatenation of
LinearMap
s objects withUniformScaling
s, consistent with (h-, v-, and hc-)concatenation of matrices. Note, matricesA
must be wrapped asLinearMap(A)
,UniformScaling
s are promoted toLinearMap
s automatically.
What's new in v2.4
- Support restricted to Julia v1.0+.
What's new in v2.3
- Fully Julia v0.7/v1.0/v1.1 compatible.
- Full support of noncommutative number types such as quaternions.
What's new in v2.2
- Fully Julia v0.7/v1.0 compatible.
- A
convert(SparseMatrixCSC, A::LinearMap)
function, that calls thesparse
matrix generating function.
What's new in v2.1
- Fully Julia v0.7 compatible; dropped compatibility for previous versions of Julia from LinearMaps.jl v2.0.0 on.
- A 5-argument version for
mul!(y, A::LinearMap, x, α=1, β=0)
, which computesy := α * A * x + β * y
and implements the usual 3-argumentmul!(y, A, x)
for the defaultα
andβ
. - Synonymous
convert(Matrix, A::LinearMap)
andconvert(Array, A::LinearMap)
functions, that call theMatrix
constructor and return the matrix representation ofA
. - Multiplication with matrices, interpreted as a block row vector of vectors:
mul!(Y::AbstractArray, A::LinearMap, X::AbstractArray, α=1, β=0)
: appliesA
to each column ofX
and stores the result in-place in the corresponding column ofY
;- for the out-of-place multiplication, the approach is to compute
convert(Matrix, A * X)
; this is equivalent to applyingA
to each column ofX
. In generic code which handles bothA::AbstractMatrix
andA::LinearMap
, the additional call toconvert
is a noop whenA
is a matrix.
- Full compatibility with Arpack.jl's
eigs
andsvds
; previously onlyeigs
was working. For more, nicely collaborating packages see the Example section.