Skip to contents

Symbolic weighted squared norm of a LazyTensor binary operation for LazyTensor objects.

Usage

weightedsqnorm(x, s)

Arguments

x

a vector of numeric values or a scalar value.

s

a LazyTensor, a ComplexLazyTensor, a vector of numeric values, or a scalar value.

Value

An object of class LazyTensor.

Details

weightedsqnorm(x, s) returns a LazyTensor that encodes, symbolically, the weighted squared norm of a vector x with weights stored in the LazyTensor s.

Note: x, and s should have the same inner dimension.

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

Author

Chloe Serre-Combe, Amelie Vernay

Examples

if (FALSE) {
x <- matrix(runif(100 * 3), 100, 3) # arbitrary R matrix, 100 rows, 3 columns
s <- matrix(runif(100 * 3), 100, 3) # arbitrary R matrix, 100 rows, 3 columns
x_i <- LazyTensor(x, index = 'i')   # creating LazyTensor from matrix x, 
                                    # indexed by 'i'
s_j <- LazyTensor(s, index = 'j')   # creating LazyTensor from matrix s, 
                                    # indexed by 'j'
wsqn_xy <- weightedsqnorm(x_i, s_j) # symbolic matrix, 100 rows,1 columns
}