Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename isweighted -> is_weighted #2953

Merged
merged 2 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Comment on lines +48 to 49
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this method problematic -- why is a projective space in which all weights are 1 "not weighted" ?

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