Open
Description
Useful pieces of information about interpolation are stored in Interp
:
struct Interp{N,TS<:VecOrMat,TM<:AbstractMatrix,TL<:Factorization}
basis::Basis{N}
S::TS
Scoord::NTuple{N,Vector{Float64}}
length::Int
size::NTuple{N,Int}
lb::NTuple{N,Float64}
ub::NTuple{N,Float64}
Phi::TM
Phi_lu::TL
end
And ContinuousDP
keeps an instance of Interp
as one of its fields.
(1)
Conceptually, this is not part of a problem, but part of a solution algorithm.
(2)
One option is to include it in a "Solver
" type, like
struct CDPCollocationSolver{Algo<:DPAlgorithm} <: AbstractCDPCollocationSolver
interp::Interp
tol
max_iter
options # any options used in `solve`
end
solver = CDPCollocationSolver{PFI}(basis, tol, max_iter, ...)
res = solve(solver, cdp)
(3)
Interp
should not necessarily belong here. It seems to fit better in BasisMatrices.jl
. Any thoughts @sglyon?