Minimum operation or minimum reduction for LazyTensor
objects.
Usage
# S3 method for LazyTensor
min(x, index = NA, ...)
min_reduction(x, index)
Arguments
- x
a
LazyTensor
or aComplexLazyTensor
.- index
a
character
corresponding to the wanted reduction dimension, either"i"
or"j"
, to specify whether if the min reduction is done along the indexi
orj
. It can beNA
(default) when no reduction is desired.- ...
not used, only present for method compatibility with the corresponding generic function.
Value
a LazyTensor
if index = NA
or an array storing the result of
the specified min reduction otherwise.
Details
If x
is a LazyTensor
, min(x, index)
will :
if
index = "i"
, return the min reduction ofx
over thei
index.if
index = "j"
, return the min reduction ofx
over thej
index.if
index = NA
(default), return a newLazyTensor
object representing the symbolic min of the values along the inner dimension ofx
.
Note: Run browseVignettes("rkeops")
to access the vignettes and find
details about this function in the "RKeOps LazyTensor" vignette, at
section "Reductions".
Note: index
input argument cannot be NA
for the
min_reduction()
function.
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_x <- min(x_i) # LazyTensor object
min_red_x <- min(x_i, "i") # min 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_reduction(x_i, "i")
}