Skip to content

Commit

Permalink
Rename isweighted -> is_weighted (#2953)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored Oct 28, 2023
1 parent 103262f commit 2bed7c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/AlgebraicGeometry/Miscellaneous/basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function weights(P::ProjSpc)
return Int[x[1] for x = P.Rx.d]
end

function isweighted(P::ProjSpc)
function is_weighted(P::ProjSpc)
return !all(x->isone(x[1]), P.Rx.d)
end

Expand Down Expand Up @@ -173,7 +173,7 @@ function normalize!(a::ProjSpcElem{ZZRingElem})
end

function Base.hash(a::ProjSpcElem, u::UInt=UInt(123432))
if isweighted(parent(a))
if is_weighted(parent(a))
return u
end
normalize!(a)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function normalize!(a::AbsProjectiveRationalPoint{ZZRingElem})
end

function Base.hash(a::AbsProjectiveRationalPoint, u::UInt=UInt(123432))
if isweighted(codomain(a))
if is_weighted(codomain(a))
return u
end
normalize!(a)
Expand Down
4 changes: 2 additions & 2 deletions src/Rings/orderings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export is_global
export is_local
export is_mixed
export is_total
export isweighted
export _is_weighted
export lex
export matrix_ordering
export monomial_ordering
Expand Down Expand Up @@ -124,7 +124,7 @@ function _unique_var_indices(a::AbstractVector{<:MPolyRingElem})
return z
end

function isweighted(ord::Symbol)
function _is_weighted(ord::Symbol)
return ord == :wdeglex || ord == :wdegrevlex ||
ord == :negwdeglex || ord == :negwdegrevlex
end
Expand Down

0 comments on commit 2bed7c9

Please sign in to comment.