Skip to content

Commit 039d22c

Browse files
update docs
1 parent 00cc6d8 commit 039d22c

3 files changed

Lines changed: 17 additions & 15 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Description: Implements the First Fit Decreasing algorithm to achieve one dimens
77
License: GPL (>= 3)
88
Encoding: UTF-8
99
Roxygen: list(markdown = TRUE)
10-
RoxygenNote: 7.2.3
10+
RoxygenNote: 7.3.3
1111
LinkingTo: cpp11
1212
Suggests:
1313
testthat (>= 3.0.0),

R/bin_pack.R

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
#' 1D bin packing "First Fit (Decreasing)" algorithm
22
#'
3-
#' @param x A numeric vector of item sizes to be fit into bins. Each value
3+
#' @param x [[numeric()]] A numeric vector of item sizes to be fit into bins. Each value
44
#' represents the size of an atomic item. If a value is `NA` it is
55
#' ignored and the corresponding result will also be `NA`.
6-
#' @param cap Bin capacity in units of values in `x`. A scalar value. If
7-
#' an individual item size is above `cap` a single bin is reserved
6+
#' @param cap \[`numeric(1)`\] A scalar value representing the bin capacity in units of values in `x`.
7+
#' If an individual item size is above `cap` a single bin is reserved
88
#' for this item.
9-
#' @param sort Determines whether the input vector should be sorted in
9+
#' @param sort \[`logical(1)`\] Determines whether the input vector should be sorted in
1010
#' decreasing order before applying the "First Fit" algorithm
1111
#' ("First Fit Decreasing").
12-
#' @returns An integer vector of labels of the same length as `x`. The integer
12+
#' @returns [[integer()]] An integer vector of labels of the same length as `x`. The integer
1313
#' label at position `i` determines the assignment of the `i`th item
1414
#' with size `x[i]` to a bin. If the value `x[i]` is `NA` the result
1515
#' label at position `i` will also be `NA`.
16-
#' @details See [Wikipedia](https://en.wikipedia.org/wiki/First-fit_bin_packing)
17-
#' for a concise introduction or
18-
#' "The Art of Computer Programming Vol. 1" by Donald E. Knuth
19-
#' (1997, ISBN: 0201896834) for more details.
16+
#'
17+
#' @details
18+
#' See [Wikipedia](https://en.wikipedia.org/wiki/First-fit_bin_packing)
19+
#' for a concise introduction or
20+
#' "The Art of Computer Programming Vol. 1" by Donald E. Knuth
21+
#' (1997, ISBN: 0201896834) for more details.
2022
#' @examples
2123
#' # Generate a vector of item sizes
2224
#' x <- sample(100, 1000, replace = TRUE)

man/bin_pack_ffd.Rd

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

0 commit comments

Comments
 (0)