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

implement sethrep for interval #267

Merged
merged 2 commits into from
Jul 28, 2021
Merged

Conversation

chachaleo
Copy link
Contributor

Refactors the constructors into helpers as suggested in the issue. And implementation of sethrep!

Closes #263

@codecov
Copy link

codecov bot commented Jul 27, 2021

Codecov Report

Merging #267 (23439ae) into master (e772525) will increase coverage by 9.77%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #267      +/-   ##
==========================================
+ Coverage   78.08%   87.86%   +9.77%     
==========================================
  Files          39       37       -2     
  Lines        3212     2867     -345     
==========================================
+ Hits         2508     2519      +11     
+ Misses        704      348     -356     
Impacted Files Coverage Δ
src/interval.jl 99.20% <100.00%> (+0.06%) ⬆️
src/vecrep.jl 100.00% <0.00%> (ø)
src/tmp.jl
src/doubledescription_debug.jl

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e772525...23439ae. Read the comment docs.

Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

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

Thanks a lot! Could you add a test ?

Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

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

Oops, missed clicked, I didn't mean to click on "Approve", still needs a test :)

src/interval.jl Outdated
Comment on lines 203 to 209
function sethrep!(p::Interval{T, AT}, h::HRep) where {T, AT}
hnew, v, volume = _hinterval(h, AT)
hrep = hnew
vrep = v
length = volume
return p
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the three lines in the middle have any effect? If not, then this method does not modify p (as probably intended).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you're right thank you! I'll change that

Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution!

@blegat blegat merged commit b04c4f1 into JuliaPolyhedra:master Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MethodError in sethrep! for intervals
3 participants