Skip to content

Commit

Permalink
Add order arguments to two functions. (#29)
Browse files Browse the repository at this point in the history
* Ignore the .github folder when building.

* Add order argument to is_maximal_proom signature.

* Add order parameter to unused_pairs signature.
  • Loading branch information
MHenderson authored Aug 20, 2024
1 parent d9c85f0 commit b32f658
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
^wallis.*\.tar\.gz$
^wallis.*\.tgz$
^LICENSE\.md$
^.github$
5 changes: 2 additions & 3 deletions R/room.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ is_room <- function(R) {
#' Is R a maximal partial Room square?
#'
#' @param R A partial Room square.
#' @param n Order of R.
#'
#' @return True if and only if R is a maximal partial Room square, False otherwise.
#' @export
is_maximal_proom <- function(R) {
is_maximal_proom <- function(R, n) {

result <- is_partial_room(R)

n <- max(R$col)

R <- R |>
dplyr::mutate(
see = purrr::map2(row, col, see2, R = R)
Expand Down
5 changes: 2 additions & 3 deletions R/unused-pairs.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#' Pairs not used in a partial Room square
#'
#' @param R A partial Room square.
#' @param n Order of R.
#'
#' @return A list of pairs not used in R.
#' @export
unused_pairs <- function(R) {
unused_pairs <- function(R, n) {

n <- max(R$row) + 1

used_pairs <- R |> dplyr::select(first, second)

x <- combn(0:(n - 1), 2)
Expand Down
4 changes: 3 additions & 1 deletion man/is_maximal_proom.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/unused_pairs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b32f658

Please sign in to comment.