Add hv_approx_fpras() in R (FPRAS hypervolume approximation) - #77
Closed
MLopez-Ibanez with Copilot wants to merge 3 commits into
Closed
Add hv_approx_fpras() in R (FPRAS hypervolume approximation)#77MLopez-Ibanez with Copilot wants to merge 3 commits into
MLopez-Ibanez with Copilot wants to merge 3 commits into
Conversation
…n, and NEWS update Co-authored-by: MLopez-Ibanez <2620021+MLopez-Ibanez@users.noreply.github.com>
Co-authored-by: MLopez-Ibanez <2620021+MLopez-Ibanez@users.noreply.github.com>
Copilot
AI
changed the title
Add hv_approx_fpras() R function (FPRAS hypervolume approximation)
Add hv_approx_fpras() in R (FPRAS hypervolume approximation)
Aug 11, 2026
Copilot created this pull request from a session on behalf of
MLopez-Ibanez
August 11, 2026 08:01
View session
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
+ Coverage 77.13% 77.32% +0.18%
==========================================
Files 69 70 +1
Lines 7195 7364 +169
Branches 1434 1465 +31
==========================================
+ Hits 5550 5694 +144
- Misses 1277 1298 +21
- Partials 368 372 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
|
@copilot You need to run roxygen2 and doctest to generate the appropriate .Rd documentation and .R test file. Otherwise the CI tests will fail. |
Co-authored-by: MLopez-Ibanez <2620021+MLopez-Ibanez@users.noreply.github.com>
Contributor
Author
Done in commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports
hv_approx_fpras()from PR #70 to R. The function implements Bringmann & Friedrich's FPRAS algorithm, returning with probability(1-δ)anε-approximation of the hypervolume — unlike the Monte-Carlo methods inhv_approx(), which take a fixed sample count.Runtime scales as O(nm/ε² · log(1/δ)) — halving
epsilonquadruples runtime.Changes
r/R/hv_approx.R—hv_approx_fpras()with roxygen2 docs (math,@warning,@seealso,@references, doctests)r/src/Rmoocore.c+r/src/init.h— C wrapperhv_approx_fpras_C(seed, epsilon, delta)r/NAMESPACE— export new functionr/tests/testthat/test-hv_approx.R— error tests and accuracy loop over dims 3–10r/vignettes/articles/hv_approx.Rmd— new FPRAS section: error vs. epsilon boxplot and CPU time vs. epsilon line plot (ported fromplot_hv_approx.py)r/inst/REFERENCES.bib— addVose1991alias(Walker-Vose alias method)r/NEWS.md— entry for new functionc/hvapprox.c— addm == 0guard before division to prevent undefined behaviour when budget is exhausted before any dominating pair is foundc/rng.h— fix DOI (10.1145/3230636)c/hvapprox.h— fix spurious comma in comment