Skip to content

Commit 249d805

Browse files
committed
Add zero and one methods for FormalPowerSeries
1 parent 4d4edda commit 249d805

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/FormalPowerSeries.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ end
3333
#Convenient abbreviation for floats
3434
fps = FormalPowerSeries{Float64}
3535

36+
zero{T}(P::FormalPowerSeries{T}) = FormalPowerSeries(T[])
37+
one{T}(P::FormalPowerSeries{T}) = FormalPowerSeries(T[1])
3638

3739
#Return truncated vector with c[i] = P[n[i]]
3840
function tovector{T,Index<:Integer}(P::FormalPowerSeries{T}, n :: Vector{Index})

0 commit comments

Comments
 (0)