View source: R/eval_over_grid_with_batch.R
eval_over_grid_with_batch | R Documentation |
'batchmax' gives how many can be evaluated at a time. If more than 1, then the input is given to the function as rows of a matrix.
eval_over_grid_with_batch(x, y, fn, batchmax)
x |
Vector of x values to evaluate |
y |
Vector of y values to evaluate |
fn |
Function that takes in a length two vector if 'batchmax' is 1 or a matrix with two columns if greater than 1. |
batchmax |
Number of points that can evaluated simultaneously. If 1, points are passed to 'fn' as a vector of length two. If greater than 1, points are passed to 'fn' as rows of a matrix. |
Matrix of size 'length(x)' by 'length(y)'
eval_over_grid_with_batch(c(0,.5,1), c(10,20,30), function(a)a[1]+a[2], batchmax=1)
eval_over_grid_with_batch(c(0,.5,1), c(10,20,30), function(a)a[,1]+a[,2], batchmax=Inf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.