Skip to contents

Min-ArgMin reduction for LazyTensor objects.

Usage

min_argmin(x, index)

min_argmin_reduction(x, index)

Arguments

x

a LazyTensor or a ComplexLazyTensor.

index

a character corresponding to the wanted reduction dimension, either "i" or "j", to specify whether if the Min-ArgMin reduction is done along the index i or j.

Value

an array storing the result of the specified Min-ArgMin reduction otherwise.

Details

If x is a LazyTensor, min_argmin(x, index) will :

  • if index = "i", return the Min-ArgMin reduction of x, i.e. the minimal values and its position, over the i indexes.

  • if index = "j", return the Min-ArgMin reduction of x, i.e. the minimal values and its position, over the j indexes.

Note: Run browseVignettes("rkeops") to access the vignettes and find details about this function in the "RKeOps LazyTensor" vignette, at section "Reductions".

Author

Chloe Serre-Combe, Amelie Vernay

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'
}