We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea6c6a9 commit b7ac329Copy full SHA for b7ac329
src/algorithms/dimension.jl
@@ -32,7 +32,7 @@ function dimension(I::Ideal{T}) where T <: MPolyRingElem
32
nz_exps_ind = findall(nz_exps)
33
next_res = Set{BitVector}()
34
for mis in res
35
- if nz_exps <= mis
+ if all_lesseq(nz_exps, mis)
36
@inbounds for j in nz_exps_ind
37
new_mis = copy(mis)
38
new_mis[j] = false
@@ -49,6 +49,15 @@ function dimension(I::Ideal{T}) where T <: MPolyRingElem
49
return I.dim
50
end
51
52
+function all_lesseq(a::BitVector, b::BitVector)::Bool
53
+ @inbounds for i in eachindex(a)
54
+ if a[i] && !b[i]
55
+ return false
56
+ end
57
58
+ return true
59
+end
60
+
61
function _drl_exp_vector(u::Vector{Int})
62
return [sum(u), -reverse(u)...]
63
0 commit comments