@@ -54,12 +54,12 @@ printpolyfun(var) = (io, p, mimetype = MIME"text/plain"()) -> Polynomials.printp
54
54
# returned by LAPACK routines for eigenvalues.
55
55
function roots2real_poly_factors (roots:: Vector{cT} ) where cT <: Number
56
56
T = real (cT)
57
- poly_factors = Vector {Polynomial{T}} ()
57
+ poly_factors = Vector {Polynomial{T,:x }} ()
58
58
for k= 1 : length (roots)
59
59
r = roots[k]
60
60
61
61
if isreal (r)
62
- push! (poly_factors,Polynomial {T} ([- real (r),1 ]))
62
+ push! (poly_factors,Polynomial {T,:x } ([- real (r),1 ]))
63
63
else
64
64
if imag (r) < 0 # This roots was handled in the previous iteration # TODO : Fix better error handling
65
65
continue
@@ -69,7 +69,7 @@ function roots2real_poly_factors(roots::Vector{cT}) where cT <: Number
69
69
throw (ArgumentError (" Found pole without matching conjugate." ))
70
70
end
71
71
72
- push! (poly_factors,Polynomial {T} ([real (r)^ 2 + imag (r)^ 2 , - 2 * real (r), 1 ]))
72
+ push! (poly_factors,Polynomial {T,:x } ([real (r)^ 2 + imag (r)^ 2 , - 2 * real (r), 1 ]))
73
73
# k += 1 # Skip one iteration in the loop
74
74
end
75
75
end
@@ -78,7 +78,7 @@ function roots2real_poly_factors(roots::Vector{cT}) where cT <: Number
78
78
end
79
79
# This function should hande both Complex as well as symbolic types
80
80
function roots2poly_factors (roots:: Vector{T} ) where T <: Number
81
- return Polynomial{T}[Polynomial {T} ([- r, 1 ]) for r in roots]
81
+ return Polynomial{T, :x }[Polynomial {T,:x } ([- r, 1 ]) for r in roots]
82
82
end
83
83
84
84
0 commit comments