diff --git a/man/compute_statistics.Rd b/man/compute_statistics.Rd index b2776c7a..de418d8b 100644 --- a/man/compute_statistics.Rd +++ b/man/compute_statistics.Rd @@ -4,18 +4,7 @@ \alias{compute_statistics} \title{compute_statistics} \usage{ -compute_statistics( - x, - y, - k, - xr, - yr, - w_statistics, - bw, - divisor, - kernel_arg, - rmax -) +compute_statistics(x, y, k, xr, yr, w_statistics, bw, divisor, kernel_arg, r) } \arguments{ \item{x, y}{x and y coordinates of the points from the reference point pattern.} @@ -28,7 +17,7 @@ compute_statistics( from the \code{spatstat} package to be included in the energy calculation. This may include Dk, K, Hs, pcf.} -\item{bw, divisor, kernel_arg, rmax}{Several parameters related to summary function.} +\item{bw, divisor, kernel_arg, r}{Several parameters related to summary function.} } \value{ list diff --git a/tests/testthat/test-reconstruct_pattern_multi.R b/tests/testthat/test-reconstruct_pattern_multi.R index e4ac0874..7ec619bf 100644 --- a/tests/testthat/test-reconstruct_pattern_multi.R +++ b/tests/testthat/test-reconstruct_pattern_multi.R @@ -24,6 +24,10 @@ multi_recon <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 3, max_ multi_recon_simple <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 1, max_steps = 100, verbose = FALSE) +multi_recon_fun <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 1, max_steps = 100, + verbose = FALSE, w_statistics = c("Dk" = 1, "K" = 0.5, "Hs" = 0.5, "pcf" = 1), + divisor = "d", kernel = "gaussian") + ################################################################################ testthat::test_that("Output is a long as n_random for reconstruct_pattern_multi", { @@ -51,3 +55,16 @@ testthat::test_that("Energy decresead for for reconstruct_pattern_multi", { testthat::expect_lt(object = multi_recon_simple$energy_current, expected = multi_recon_simple$energy_launch) }) + +testthat::test_that("Test additional arguments of reconstruct_pattern_multi", { + + expect_equal(object = multi_recon_fun$Parameter_setting$w_statistics, + expected = c("Dk" = 1, "K" = 0.5, "Hs" = 0.5, "pcf" = 1)) + + expect_equal(object = multi_recon_fun$Parameter_setting$divisor, + expected = "d") + + expect_equal(object = multi_recon_fun$Parameter_setting$kernel_arg, + expected = "gaussian") + +})