diff --git a/previews/PR351/.documenter-siteinfo.json b/previews/PR351/.documenter-siteinfo.json index be79c7c..9da9a2a 100644 --- a/previews/PR351/.documenter-siteinfo.json +++ b/previews/PR351/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-16T23:01:59","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-16T23:02:25","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/previews/PR351/index.html b/previews/PR351/index.html index 5160fdb..9325d8f 100644 --- a/previews/PR351/index.html +++ b/previews/PR351/index.html @@ -4,8 +4,8 @@ A = rand(5,5) opA = LinearOperator(A) A[:,1] * 3 isa Vector
true
opA[:,1] * 3 isa LinearOperator
true
opA[:,1] * [3] isa Vector
true

However, the following returns an error

A[:,1] * [3]

This is also true for A[i,:], which would return a vector and for the scalar A[i,j]. Similarly, opA[1,1] is an operator of size (1,1):"

(opA[1,1] * [3])[1] - A[1,1] * 3
0.0

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

Matrix(opA[:,1])
5×1 Matrix{Float64}:
- 0.45204029278593383
- 0.8522006435505273
- 0.4730669148582347
- 0.8138138058191658
- 0.37645768127519086

Other Operators

Testing

julia> Pkg.test("LinearOperators")

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.

+ 0.3328433695035269 + 0.651793238276469 + 0.544437850689098 + 0.4379314059060816 + 0.8127603344970119

Other Operators

Testing

julia> Pkg.test("LinearOperators")

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.

diff --git a/previews/PR351/reference/index.html b/previews/PR351/reference/index.html index f561388..9c65323 100644 --- a/previews/PR351/reference/index.html +++ b/previews/PR351/reference/index.html @@ -1,5 +1,5 @@ -Reference · LinearOperators.jl

Reference

Contents

Index

Base.MatrixMethod
A = Matrix(op)

Materialize an operator as a dense array using op.ncol products.

source
LinearOperators.DiagonalAndreiType
DiagonalAndrei(d)

Construct a linear operator that represents a diagonal quasi-Newton approximation as described in

Andrei, N. A diagonal quasi-Newton updating method for unconstrained optimization. https://doi.org/10.1007/s11075-018-0562-7

The approximation satisfies the weak secant equation and is not guaranteed to be positive definite.

Arguments

  • d::AbstractVector: initial diagonal approximation.
source
LinearOperators.DiagonalAndreiMethod
DiagonalAndrei(d)

Construct a linear operator that represents a diagonal quasi-Newton approximation as described in

Andrei, N. A diagonal quasi-Newton updating method for unconstrained optimization. https://doi.org/10.1007/s11075-018-0562-7

The approximation satisfies the weak secant equation and is not guaranteed to be positive definite.

Arguments

  • d::AbstractVector: initial diagonal approximation.
source
LinearOperators.DiagonalPSBType
DiagonalPSB(d)

Construct a linear operator that represents a diagonal PSB quasi-Newton approximation as described in

M. Zhu, J. L. Nazareth and H. Wolkowicz The Quasi-Cauchy Relation and Diagonal Updating. SIAM Journal on Optimization, vol. 9, number 4, pp. 1192-1204, 1999. https://doi.org/10.1137/S1052623498331793.

The approximation satisfies the weak secant equation and is not guaranteed to be positive definite.

Arguments

  • d::AbstractVector: initial diagonal approximation.
source
LinearOperators.DiagonalPSBMethod
DiagonalPSB(d)

Construct a linear operator that represents a diagonal PSB quasi-Newton approximation as described in

M. Zhu, J. L. Nazareth and H. Wolkowicz The Quasi-Cauchy Relation and Diagonal Updating. SIAM Journal on Optimization, vol. 9, number 4, pp. 1192-1204, 1999. https://doi.org/10.1137/S1052623498331793.

The approximation satisfies the weak secant equation and is not guaranteed to be positive definite.

Arguments

  • d::AbstractVector: initial diagonal approximation.
source
LinearOperators.LBFGSOperatorMethod
LBFGSOperator(T, n; [mem=5, scaling=true])
+Reference · LinearOperators.jl

Reference

Contents

Index

Base.MatrixMethod
A = Matrix(op)

Materialize an operator as a dense array using op.ncol products.

source
LinearOperators.DiagonalAndreiType
DiagonalAndrei(d)

Construct a linear operator that represents a diagonal quasi-Newton approximation as described in

Andrei, N. A diagonal quasi-Newton updating method for unconstrained optimization. https://doi.org/10.1007/s11075-018-0562-7

The approximation satisfies the weak secant equation and is not guaranteed to be positive definite.

Arguments

  • d::AbstractVector: initial diagonal approximation.
source
LinearOperators.DiagonalAndreiMethod
DiagonalAndrei(d)

Construct a linear operator that represents a diagonal quasi-Newton approximation as described in

Andrei, N. A diagonal quasi-Newton updating method for unconstrained optimization. https://doi.org/10.1007/s11075-018-0562-7

The approximation satisfies the weak secant equation and is not guaranteed to be positive definite.

Arguments

  • d::AbstractVector: initial diagonal approximation.
source
LinearOperators.DiagonalPSBType
DiagonalPSB(d)

Construct a linear operator that represents a diagonal PSB quasi-Newton approximation as described in

M. Zhu, J. L. Nazareth and H. Wolkowicz The Quasi-Cauchy Relation and Diagonal Updating. SIAM Journal on Optimization, vol. 9, number 4, pp. 1192-1204, 1999. https://doi.org/10.1137/S1052623498331793.

The approximation satisfies the weak secant equation and is not guaranteed to be positive definite.

Arguments

  • d::AbstractVector: initial diagonal approximation.
source
LinearOperators.DiagonalPSBMethod
DiagonalPSB(d)

Construct a linear operator that represents a diagonal PSB quasi-Newton approximation as described in

M. Zhu, J. L. Nazareth and H. Wolkowicz The Quasi-Cauchy Relation and Diagonal Updating. SIAM Journal on Optimization, vol. 9, number 4, pp. 1192-1204, 1999. https://doi.org/10.1137/S1052623498331793.

The approximation satisfies the weak secant equation and is not guaranteed to be positive definite.

Arguments

  • d::AbstractVector: initial diagonal approximation.
source
LinearOperators.LBFGSOperatorMethod
LBFGSOperator(T, n; [mem=5, scaling=true])
 LBFGSOperator(n; [mem=5, scaling=true])

Construct a limited-memory BFGS approximation in forward form. If the type T is omitted, then Float64 is used.

source
LinearOperators.LSR1OperatorMethod
LSR1Operator(T, n; [mem=5, scaling=false)
 LSR1Operator(n; [mem=5, scaling=false)

Construct a limited-memory SR1 approximation in forward form. If the type T is omitted, then Float64 is used.

source
LinearOperators.LinearOperatorType

Base type to represent a linear operator. The usual arithmetic operations may be applied to operators to combine or otherwise alter them. They can be combined with other operators, with matrices and with scalars. Operators may be transposed and conjugate-transposed using the usual Julia syntax.

source
LinearOperators.LinearOperatorMethod
LinearOperator(M::AbstractMatrix{T}; symmetric=false, hermitian=false, S = Vector{T}) where {T}

Construct a linear operator from a dense or sparse matrix. Use the optional keyword arguments to indicate whether the operator is symmetric and/or hermitian. Change S to use LinearOperators on GPU.

source
LinearOperators.LinearOperatorMethod
LinearOperator(type::Type{T}, nrow, ncol, symmetric, hermitian, prod!,
                 [tprod!=nothing, ctprod!=nothing],
@@ -68,4 +68,4 @@
 result = solve_shifted_system!(x, B, b, σ)
 
 # Check that the solution is close enough (residual test)
-@assert norm(B * x + σ * x - b) / norm(b) < 1e-8

References

Erway, J. B., Jain, V., & Marcia, R. F. Shifted L-BFGS Systems. Optimization Methods and Software, 29(5), pp. 992-1004, 2014.

source
+@assert norm(B * x + σ * x - b) / norm(b) < 1e-8

References

Erway, J. B., Jain, V., & Marcia, R. F. Shifted L-BFGS Systems. Optimization Methods and Software, 29(5), pp. 992-1004, 2014.

source
diff --git a/previews/PR351/tutorial/index.html b/previews/PR351/tutorial/index.html index 9d3507e..c1d3a19 100644 --- a/previews/PR351/tutorial/index.html +++ b/previews/PR351/tutorial/index.html @@ -1,2 +1,2 @@ -Tutorial · LinearOperators.jl
+Tutorial · LinearOperators.jl