Skip to content

Commit

Permalink
add length for svector (oscar-system#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes14 authored Sep 26, 2024
1 parent 89c0757 commit 77d0943
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/module/vector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ function Base.iterate(p::svector{spluralg{T}}, state) where T
end

Base.IteratorSize(::svector{spoly{T}}) where {T} = Base.SizeUnknown()

length(p::svector) = Int(libSingular.pLength(p.ptr))

###############################################################################
#
# Vector constructors
Expand Down
1 change: 1 addition & 0 deletions test/module/svector-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
@test gen(M,1) == gens(M)[1]
@test_throws ErrorException gen(M,0)
@test_throws ErrorException gen(M,ngens(M)+1)
@test length(v2) == 5
end

@testset "svector.jet" begin
Expand Down

0 comments on commit 77d0943

Please sign in to comment.