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 @@
end

function Base.hash(a::AbsProjectiveRationalPoint, u::UInt=UInt(123432))
if isweighted(codomain(a))
if is_weighted(codomain(a))

Check warning on line 211 in src/AlgebraicGeometry/RationalPoint/ProjectiveRationalPoint.jl

View check run for this annotation

Codecov / codecov/patch

src/AlgebraicGeometry/RationalPoint/ProjectiveRationalPoint.jl#L211

Added line #L211 was not covered by tests
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_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 @@
return z
end

function isweighted(ord::Symbol)
function _is_weighted(ord::Symbol)

Check warning on line 127 in src/Rings/orderings.jl

View check run for this annotation

Codecov / codecov/patch

src/Rings/orderings.jl#L127

Added line #L127 was not covered by tests
return ord == :wdeglex || ord == :wdegrevlex ||
ord == :negwdeglex || ord == :negwdegrevlex
end
Expand Down
Loading