Skip to content

Commit f24052d

Browse files
committed
* r/man/macros/macros.Rd (HTMLVignette): New macro.
* r/R/generate.R: Use it. * r/R/hv_approx.R: Likewise.
1 parent 13efcad commit f24052d

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

r/R/generate.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#' [normalise()]. Otherwise, points are scaled to a non-negative integer range
1010
#' that keeps the points mutually nondominated.
1111
#'
12+
#' See the visualisations in the vignette \HTMLVignette{generate}{Sampling Random Nondominated Sets}.
13+
#'
1214
#' @param n `integer(1)`\cr Number of rows in the output.
1315
#' @param d `integer(1)`\cr Number of columns in the output.
1416
#' @param method `character(1)`\cr Method used to generate the random nondominated set.

r/R/hv_approx.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#' `method="DZ2019-HW"` is deterministic and ignores the parameter `seed`,
66
#' while `method="DZ2019-MC"` relies on Monte-Carlo sampling
77
#' \citep{DenZha2019approxhv}. Both methods tend to get more accurate with
8-
#' higher values of `nsamples`, but the increase in accuracy is not monotonic.
9-
# FIXME: Link to vignette like the Python docs.
8+
#' higher values of `nsamples`, but the increase in accuracy is not monotonic,
9+
#' as shown in the vignette \HTMLVignette{hv_approx}{Approximating the hypervolume}.
1010
#'
1111
#' @author Manuel \enc{López-Ibáñez}{Lopez-Ibanez}
1212
#'

r/man/generate_ndset.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

r/man/hv_approx.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

r/man/macros/macros.Rd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
\newcommand{\citep}{\insertCite{#1}{moocore}}%
22
\newcommand{\citet}{\insertCite{#1;textual}{moocore}}%
3+
4+
% Macro to create link to an HTML vignette from a help page.
5+
% arg 1 is the name of the vignette (without .html)
6+
% arg 2 is the text to show on the link.
7+
%% See also:
8+
%% https://github.com/dmurdoch/rgl/blob/ec1e6cf237f91064a3e00b4627c6e39005779f83/man/macros/macros.Rd#L10
9+
\newcommand{\HTMLVignette}{\href{https://multi-objective.github.io/moocore/r/articles/#1.html}{#2}}

0 commit comments

Comments
 (0)