Skip to content

Commit

Permalink
Version 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
prdm0 committed Apr 23, 2024
1 parent c683837 commit 39335ff
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 62 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/test-parallel-windows.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions R/accept_reject.r
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,6 @@ accept_reject <-
FUN = one_step,
mc.cores = n_cores
)))
} else if(parallel && .Platform$OS.type == "windows"){
cl <- parallel::makeCluster(getOption("cl.cores", 1L))
capture.output(
r <- unlist(parallel::parLapply(
X = n_each_core,
fun = one_step
)))
parallel::stopCluster(cl)
} else {
r <- one_step(n)
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ case_1 <- accept_reject(
xlim = c(0, 10)
)
toc()
#> 7.294 sec elapsed
#> 0.491 sec elapsed

# Specifying the base probability density function
tic()
Expand All @@ -305,7 +305,7 @@ case_2 <- accept_reject(
c = 1.2
)
toc()
#> 2.633 sec elapsed
#> 0.153 sec elapsed

# Visualizing the results
p1 <- plot(case_1)
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/accept_reject.html

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

4 changes: 2 additions & 2 deletions docs/articles/inspect.html

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

4 changes: 2 additions & 2 deletions docs/index.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ pkgdown_sha: ~
articles:
accept_reject: accept_reject.html
inspect: inspect.html
last_built: 2024-04-23T11:53Z
last_built: 2024-04-23T17:24Z

Binary file modified docs/reference/figures/README-unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

Binary file modified man/figures/README-unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions tests/testthat/test-time-parallel.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ simulation <- function(n, parallel = FALSE){
parallel = parallel
)

# Calcular o tempo de execução
end_time <- Sys.time()
execution_time <- end_time - start_time

# Imprimir o tempo de execução
cat("Tempo de execução: ", execution_time, " segundos\n")

# Imprimir as primeiras observações
cat("Primeiras observações:\n")
print(head(x))

# Retornar o resultado
return(x)
}
simulation(n = 1000, parallel = FALSE)

simulation(n = 1000, parallel = TRUE)

0 comments on commit 39335ff

Please sign in to comment.