Skip to content

Commit ea6c6a9

Browse files
committed
no dim computation if already known
1 parent f721360 commit ea6c6a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/algorithms/dimension.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ julia> dimension(I)
1919
"""
2020
function dimension(I::Ideal{T}) where T <: MPolyRingElem
2121

22+
!isnothing(I.dim) && return I.dim
2223
gb = get!(I.gb, 0) do
2324
groebner_basis(I, complete_reduction = true)
2425
end
2526
R = parent(first(gb))
27+
2628
res = Set([trues(ngens(R))])
2729
lead_exps = (_drl_lead_exp).(gb)
2830
for lexp in lead_exps

0 commit comments

Comments
 (0)