Introduces n_batches = NULL by default in explain().
The larger n_batches is, the less memory is consumed, but the computation time also increases slightly.
Setting n_batches = NULL (the default) now chooses a reasonable default with a trade-off between computation speed and memory consumption. This default behavior will be updated later when a full performance comparison is ran, also including number of cores when parallelizing.
Note that n_batches is also used for parallelization and for progressbar.
Other edits
Fixed a problem with the empirical approach not releasing memory after repeated calls to the same Rcpp-function. For large n_batches this had a significant negative effect on the memory consumption (larger than for n_batches=1). Not sure why this happens, but forcing a delete with rm() + call to gc() solve the issue.
timing of each part of the code in explain (with new argument timing (T/F) which disables this (required for reproducibility when testing))
Checks that n_batches and n_combinations are compatible.
Introduces n_batches = NULL by default in explain(). The larger n_batches is, the less memory is consumed, but the computation time also increases slightly. Setting n_batches = NULL (the default) now chooses a reasonable default with a trade-off between computation speed and memory consumption. This default behavior will be updated later when a full performance comparison is ran, also including number of cores when parallelizing. Note that n_batches is also used for parallelization and for progressbar.
Other edits
TODO in this PR: