-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultivariatePolynomial interface #132
Comments
A-priori I am in favor; what do we need to do? |
Related to JuliaIntervals/TaylorModels.jl#19. |
I tried converting a julia> dx[3]
1.9620000000000002 xu₂ + 1.0 xu₅ - 1.7004000000000001 xu₂³ - 0.2 xu₂² xu₅ + 0.1 xu₂ xu₄² + 0.73248 xu₂⁵ + 0.10666666666666667 xu₂⁴ xu₅ - 0.036666666666666674 xu₂³ xu₄² + 𝒪(‖x‖⁶)
julia> typetree(dx[3])
TaylorN{Float64} <:
AbstractSeries{Float64} <:
Number <:
Any
julia> dx[3]
1.9620000000000002 xu₂ + 1.0 xu₅ - 1.7004000000000001 xu₂³ - 0.2 xu₂² xu₅ + 0.1 xu₂ xu₄² + 0.73248 xu₂⁵ + 0.10666666666666667 xu₂⁴ xu₅ - 0.036666666666666674 xu₂³ xu₄² + 𝒪(‖x‖⁶)
julia> typeof(dx[3])
TaylorN{Float64}
julia> @polyvar x[1:4] u[1:1];
julia> xu = [x; u]
5-element Vector{PolyVar{true}}:
x₁
x₂
x₃
x₄
u₁
julia> dx[3](xu)
ERROR: StackOverflowError:
Stacktrace:
[1] evaluate(a::HomogeneousPolynomial{Float64}, v::Vector{PolyVar{true}}) (repeats 43253 times)
@ TaylorSeries ~/.julia/packages/TaylorSeries/YHybm/src/evaluate.jl:191
[2] evaluate
@ ~/.julia/packages/TaylorSeries/YHybm/src/evaluate.jl:191 [inlined]
[3] evaluate(a::HomogeneousPolynomial{Float64}, v::NTuple{5, PolyVar{true}})
@ TaylorSeries ~/.julia/packages/TaylorSeries/YHybm/src/evaluate.jl:191
[4] _evaluate(a::TaylorN{Float64}, vals::NTuple{5, PolyVar{true}})
@ TaylorSeries ~/.julia/packages/TaylorSeries/YHybm/src/evaluate.jl:233
[5] _evaluate(a::TaylorN{Float64}, vals::NTuple{5, PolyVar{true}}, #unused#::Val{true})
@ TaylorSeries ~/.julia/packages/TaylorSeries/YHybm/src/evaluate.jl:239
[6] evaluate(a::TaylorN{Float64}, vals::Vector{PolyVar{true}}; sorting::Bool)
@ TaylorSeries ~/.julia/packages/TaylorSeries/YHybm/src/evaluate.jl:222
[7] evaluate
@ ~/.julia/packages/TaylorSeries/YHybm/src/evaluate.jl:222 [inlined]
[8] (::TaylorN{Float64})(x::Vector{PolyVar{true}})
@ TaylorSeries ~/.julia/packages/TaylorSeries/YHybm/src/evaluate.jl:327
[9] top-level scope
@ REPL[289]:1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A general interface for multivariate polynomials is being developed:
https://github.com/JuliaAlgebra/MultivariatePolynomials.jl
TaylorSeries.jl should probably implement this interface, and in particular be a subtype of the corresponding abstract type.
Related to #130
The text was updated successfully, but these errors were encountered: