General inteface for solving interval linear systems
CommonSolve.solve — Functionsolve(A::AbstractMatrix{T},
b::AbstractVector{T},
solver::AbstractIterativeSolver,
[precondition]::AbstractPrecondition=_default_precondition(A, solver),
[X]::AbstractVector{T}=enclose(A, b)) where {T<:Interval}Solves the square interval system $Ax=b$ using the given algorithm, preconditioner and initial enclosure
Input
A– square interval matrixb– interval vectorsolver– algorithm used to solve the linear systemprecondition– preconditioner used. If not given, it is automatically computed based on the matrixAand the solver.X– initial enclosure. if not given, it is automatically computed usingenclose
Examples
julia> A = [2..4 -1..1;-1..1 2..4]
2×2 Matrix{Interval{Float64}}:
[2, 4] [-1, 1]
[-1, 1] [2, 4]
julia> b = [-2..2, -1..1]
2-element Vector{Interval{Float64}}:
[-2, 2]
[-1, 1]
julia> solve(A, b, GaussSeidel(), NoPrecondition(), [-10..10, -10..10])
2-element Vector{Interval{Float64}}:
[-1.66668, 1.66668]
[-1.33334, 1.33334]
julia> solve(A, b, GaussSeidel())
2-element Vector{Interval{Float64}}:
[-1.66667, 1.66667]
[-1.33334, 1.33334]solve(A::AbstractMatrix{T},
b::AbstractVector{T},
solver::AbstractDirectSolver,
[precondition]::AbstractPrecondition=_default_precondition(A, solver)) where
{T<:Interval}Solves the square interval system $Ax=b$ using the given algorithm, preconditioner and initial enclosure
Input
A– square interval matrixb– interval vectorsolver– algorithm used to solve the linear systemprecondition– preconditioner used. If not given, it is automatically computed based on the matrixAand the solver.
Examples
julia> A = [2..4 -1..1;-1..1 2..4]
2×2 Matrix{Interval{Float64}}:
[2, 4] [-1, 1]
[-1, 1] [2, 4]
julia> b = [-2..2, -1..1]
2-element Vector{Interval{Float64}}:
[-2, 2]
[-1, 1]
julia> solve(A, b, HansenBliekRohn(), InverseMidpoint())
2-element Vector{Interval{Float64}}:
[-1.66667, 1.66667]
[-1.33334, 1.33334]
julia> solve(A, b, HansenBliekRohn())
2-element Vector{Interval{Float64}}:
[-1.66667, 1.66667]
[-1.33334, 1.33334]solve(A::AbstractMatrix{T},
b::AbstractVector{T},
[solver]::AbstractLinearSolver,
[precondition]::AbstractPrecondition=_default_precondition(A, solver)) where
{T<:Interval}Solves the square interval system $Ax=b$ using the given algorithm, preconditioner and initial enclosure
Input
A– square interval matrixb– interval vectorsolver– algorithm used to solve the linear system. If not given,GaussianEliminationis used.precondition– preconditioner used. If not given, it is automatically computed based on the matrixAand the solver.
Examples
julia> A = [2..4 -1..1;-1..1 2..4]
2×2 Matrix{Interval{Float64}}:
[2, 4] [-1, 1]
[-1, 1] [2, 4]
julia> b = [-2..2, -1..1]
2-element Vector{Interval{Float64}}:
[-2, 2]
[-1, 1]
julia> solve(A, b)
2-element Vector{Interval{Float64}}:
[-1.66667, 1.66667]
[-1.33334, 1.33334]