diff --git a/src/PolyhedralGeometry/iterators.jl b/src/PolyhedralGeometry/iterators.jl index d7b56e32544..646a24f0d7c 100644 --- a/src/PolyhedralGeometry/iterators.jl +++ b/src/PolyhedralGeometry/iterators.jl @@ -106,6 +106,8 @@ Base.:(==)(::PointVector, ::RayVector) = Base.:(==)(::RayVector, ::PointVector) = throw(ArgumentError("Cannot compare PointVector to RayVector")) +Base.hash(x::RayVector, h::UInt) = hash(collect(sign.(x)), hash(coefficient_field(x), h)) + ################################################################################ ######## Halfspaces and Hyperplanes ################################################################################ diff --git a/test/PolyhedralGeometry/cone.jl b/test/PolyhedralGeometry/cone.jl index 8adcfc125b9..80f50d4eb56 100644 --- a/test/PolyhedralGeometry/cone.jl +++ b/test/PolyhedralGeometry/cone.jl @@ -28,7 +28,7 @@ if T == QQFieldElem @test hilbert_basis(Cone1) isa SubObjectIterator{PointVector{ZZRingElem}} @test length(hilbert_basis(Cone1)) == 2 - @test issetequal(hilbert_basis(Cone1), ray_vector.(Ref(ZZ), [[1, 0], [0, 1]])) + @test issetequal(hilbert_basis(Cone1), point_vector.(Ref(ZZ), [[1, 0], [0, 1]])) @test generator_matrix(hilbert_basis(Cone1)) == _oscar_matrix_from_property(ZZ, hilbert_basis(Cone1)) end @test n_rays(Cone1) == 2