From e9520cbff0f479ff3f8cc87d479094b7b1c8b4cb Mon Sep 17 00:00:00 2001 From: Igor Makhlin <150450239+imkhln@users.noreply.github.com> Date: Tue, 20 Jan 2026 15:47:00 +0100 Subject: [PATCH 01/11] Update properties.jl --- src/PolyhedralGeometry/Cone/properties.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index 2741059c64c1..b2561177de36 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -340,7 +340,7 @@ julia> f_vector(square) function f_vector(C::Cone) pmc = pm_object(C) ldim = pmc.LINEALITY_DIM - return Vector{ZZRingElem}(vcat(fill(0, ldim), pmc.F_VECTOR)) + return Vector{ZZRingElem}(vcat([i == ldim for i in 1:ldim], pmc.F_VECTOR)) end @doc raw""" From 9945a85ebaff5d424a055ab278468e7228b60724 Mon Sep 17 00:00:00 2001 From: Igor Makhlin <150450239+imkhln@users.noreply.github.com> Date: Tue, 20 Jan 2026 16:51:55 +0100 Subject: [PATCH 02/11] Update properties.jl --- src/PolyhedralGeometry/Cone/properties.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index b2561177de36..04560e816b17 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -340,7 +340,8 @@ julia> f_vector(square) function f_vector(C::Cone) pmc = pm_object(C) ldim = pmc.LINEALITY_DIM - return Vector{ZZRingElem}(vcat([i == ldim for i in 1:ldim], pmc.F_VECTOR)) + prep = ldim == 0 ? ZZRingElem[] : [zeros(ZZRingElem, ldim - 1); [1]] + return [prep; fv] end @doc raw""" From 56355b2aada190eed706e6a4304093d03d2f9727 Mon Sep 17 00:00:00 2001 From: Igor Makhlin <150450239+imkhln@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:01:22 +0100 Subject: [PATCH 03/11] Update properties.jl --- src/PolyhedralGeometry/Cone/properties.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index 04560e816b17..e9258517af3c 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -341,7 +341,7 @@ function f_vector(C::Cone) pmc = pm_object(C) ldim = pmc.LINEALITY_DIM prep = ldim == 0 ? ZZRingElem[] : [zeros(ZZRingElem, ldim - 1); [1]] - return [prep; fv] + return [prep; pmc.F_VECTOR] end @doc raw""" From a37482ca0093031293e79ece78c157ba94c80f37 Mon Sep 17 00:00:00 2001 From: Igor Makhlin <150450239+imkhln@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:12:34 +0100 Subject: [PATCH 04/11] Update properties.jl --- src/PolyhedralGeometry/Cone/properties.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index e9258517af3c..00b8edda345a 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -341,7 +341,8 @@ function f_vector(C::Cone) pmc = pm_object(C) ldim = pmc.LINEALITY_DIM prep = ldim == 0 ? ZZRingElem[] : [zeros(ZZRingElem, ldim - 1); [1]] - return [prep; pmc.F_VECTOR] + res = [prep; pmc.F_VECTOR] + return res end @doc raw""" From 36df4ef5d2525db335a291b40ac574e03e48b449 Mon Sep 17 00:00:00 2001 From: Igor Makhlin <150450239+imkhln@users.noreply.github.com> Date: Tue, 20 Jan 2026 20:19:17 +0100 Subject: [PATCH 05/11] Update properties.jl --- src/PolyhedralGeometry/Cone/properties.jl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index 00b8edda345a..bf54a0ffb8a0 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -339,9 +339,13 @@ julia> f_vector(square) """ function f_vector(C::Cone) pmc = pm_object(C) - ldim = pmc.LINEALITY_DIM - prep = ldim == 0 ? ZZRingElem[] : [zeros(ZZRingElem, ldim - 1); [1]] - res = [prep; pmc.F_VECTOR] + ld = pmc.LINEALITY_DIM + fv = pmc.F_VECTOR + res = zeros(ZZRingElem, ld + length(fv)) + v[ld+1:end] = fv + if ld > 0 + res[ld] = 1 + end return res end From f1f4790fa833d2d54ebf62e93cf6cb5fba5d64d5 Mon Sep 17 00:00:00 2001 From: imkhln Date: Tue, 20 Jan 2026 21:18:54 +0100 Subject: [PATCH 06/11] fixed f_vector(C::Cone) --- src/PolyhedralGeometry/Cone/properties.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index bf54a0ffb8a0..79dba3b4f537 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -340,13 +340,13 @@ julia> f_vector(square) function f_vector(C::Cone) pmc = pm_object(C) ld = pmc.LINEALITY_DIM - fv = pmc.F_VECTOR - res = zeros(ZZRingElem, ld + length(fv)) + fv = ld == pmc.CONE_DIM ? ZZRingElem[] : pmc.F_VECTOR + v = zeros(ZZRingElem, ld + length(fv)) v[ld+1:end] = fv if ld > 0 - res[ld] = 1 + v[ld] = 1 end - return res + return v end @doc raw""" From 57e70473586b9c2beb08c2a6fa91cb7b1811b0e9 Mon Sep 17 00:00:00 2001 From: imkhln Date: Tue, 20 Jan 2026 21:56:43 +0100 Subject: [PATCH 07/11] fix for f_vector(C::Cone), formatting --- src/PolyhedralGeometry/Cone/properties.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index 79dba3b4f537..830fe4823612 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -342,7 +342,7 @@ function f_vector(C::Cone) ld = pmc.LINEALITY_DIM fv = ld == pmc.CONE_DIM ? ZZRingElem[] : pmc.F_VECTOR v = zeros(ZZRingElem, ld + length(fv)) - v[ld+1:end] = fv + v[(ld + 1):end] = fv if ld > 0 v[ld] = 1 end From 1029001bd75b25bd3c81e935d79fa0cda7694d5f Mon Sep 17 00:00:00 2001 From: Igor Makhlin <150450239+imkhln@users.noreply.github.com> Date: Tue, 20 Jan 2026 22:14:40 +0100 Subject: [PATCH 08/11] Update properties.jl --- src/PolyhedralGeometry/Cone/properties.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index 830fe4823612..f32b75ab9dfe 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -339,8 +339,8 @@ julia> f_vector(square) """ function f_vector(C::Cone) pmc = pm_object(C) - ld = pmc.LINEALITY_DIM - fv = ld == pmc.CONE_DIM ? ZZRingElem[] : pmc.F_VECTOR + ld = lineality_dim(C) + fv = ld == pmc.CONE_DIM ? ZZRingElem[] : pmc.F_VECTOR::Polymake.Vector{Polymake.Integer} v = zeros(ZZRingElem, ld + length(fv)) v[(ld + 1):end] = fv if ld > 0 From 983285dd0a5aaa968ec821b6aeeb746c3b39c204 Mon Sep 17 00:00:00 2001 From: Igor Makhlin <150450239+imkhln@users.noreply.github.com> Date: Tue, 20 Jan 2026 22:15:56 +0100 Subject: [PATCH 09/11] Update properties.jl --- src/PolyhedralGeometry/Cone/properties.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PolyhedralGeometry/Cone/properties.jl b/src/PolyhedralGeometry/Cone/properties.jl index f32b75ab9dfe..a0075d3bed8d 100644 --- a/src/PolyhedralGeometry/Cone/properties.jl +++ b/src/PolyhedralGeometry/Cone/properties.jl @@ -340,7 +340,7 @@ julia> f_vector(square) function f_vector(C::Cone) pmc = pm_object(C) ld = lineality_dim(C) - fv = ld == pmc.CONE_DIM ? ZZRingElem[] : pmc.F_VECTOR::Polymake.Vector{Polymake.Integer} + fv = ld == dim(C) ? ZZRingElem[] : pmc.F_VECTOR::Polymake.Vector{Polymake.Integer} v = zeros(ZZRingElem, ld + length(fv)) v[(ld + 1):end] = fv if ld > 0 From d30e22879411e48d4ab334899e2805294b6ef66e Mon Sep 17 00:00:00 2001 From: Igor Makhlin Date: Wed, 21 Jan 2026 16:09:20 +0100 Subject: [PATCH 10/11] fixed Cone2 f_vector test --- test/PolyhedralGeometry/cone.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/PolyhedralGeometry/cone.jl b/test/PolyhedralGeometry/cone.jl index 1aa5d2190ae8..37f0a08cbe8b 100644 --- a/test/PolyhedralGeometry/cone.jl +++ b/test/PolyhedralGeometry/cone.jl @@ -108,7 +108,7 @@ @test isnothing(faces(Cone2, 1)) @test f_vector(Cone5) == [4, 4] - @test f_vector(Cone2) == [0, 2] + @test f_vector(Cone2) == [1, 2] @test lineality_dim(Cone5) == 0 @test lineality_dim(Cone2) == 1 @test facet_degrees(Cone5) == fill(2, 4) From 2a752d1839f0b10603b2cade778f0f8a5b028560 Mon Sep 17 00:00:00 2001 From: Igor Makhlin Date: Thu, 29 Jan 2026 14:27:08 +0100 Subject: [PATCH 11/11] added test for f_vector of 0-dimensional cone (point) --- test/PolyhedralGeometry/cone.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/PolyhedralGeometry/cone.jl b/test/PolyhedralGeometry/cone.jl index 37f0a08cbe8b..0d72aebe0789 100644 --- a/test/PolyhedralGeometry/cone.jl +++ b/test/PolyhedralGeometry/cone.jl @@ -109,6 +109,7 @@ @test f_vector(Cone5) == [4, 4] @test f_vector(Cone2) == [1, 2] + @test f_vector(positive_hull([0, 0, 0])) == ZZRingElem[] @test lineality_dim(Cone5) == 0 @test lineality_dim(Cone2) == 1 @test facet_degrees(Cone5) == fill(2, 4)