wInProd: Weighted inner product

View source: R/wInProd.R

wInProdR Documentation

Weighted inner product

Description

Computes weighted inner products.

Usage

wInProd(A1, A2, weight = NULL)

Arguments

A1

The input matrix 1.

A2

The input matrix 2.

weight

The weighting vector.

Value

inP The weighted inner product.

Examples

############
#Example 1 #
############
A1 = c(0,1,2,0,1,3)
A2 = c(1,2,0,0,4,1)
wInProd(A1, A2)

############
#Example 2 #
############
A1 = c(0,1,2,0,1,3)
A2 = c(1,2,0,0,4,1)
w = c(0,0,0,1,1,1)
wInProd(A1, A2, weight = w)


GPoM documentation built on July 9, 2023, 6:23 p.m.