Min-ArgMin reduction for LazyTensor objects.
Arguments
- x
a
LazyTensoror aComplexLazyTensor.- index
a
charactercorresponding to the wanted reduction dimension, either"i"or"j", to specify whether if the Min-ArgMin reduction is done along the indexiorj.
Details
If x is a LazyTensor, min_argmin(x, index) will :
if
index = "i", return the Min-ArgMin reduction ofx, i.e. the minimal values and its position, over theiindexes.if
index = "j", return the Min-ArgMin reduction ofx, i.e. the minimal values and its position, over thejindexes.
Note: Run browseVignettes("rkeops") to access the vignettes and find
details about this function in the "RKeOps LazyTensor" vignette, at
section "Reductions".
Examples
if (FALSE) {
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
x_i <- LazyTensor(x, index = 'i') # creating LazyTensor from matrix x,
# indexed by 'i'
min_argmin_xi <- min_argmin(x_i, "i") # min argmin reduction indexed by 'i'
}
if (FALSE) {
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
x_i <- LazyTensor(x, index = 'i') # creating LazyTensor from matrix x,
# indexed by 'i'
min_argmin_red <- min_argmin_reduction(x_i, "i") # min reduction indexed by 'i'
}