grapes-inner-grapes: Numerical and Symbolic Inner Product

%inner%R Documentation

Numerical and Symbolic Inner Product

Description

Computes the inner product of two numeric or character arrays.

Usage

x %inner% y

Arguments

x

numeric or character array.

y

numeric or character array.

Details

The inner product between two arrays A and B is computed as:

C = ∑_{j_1… j_n} A_{j_1… j_n}B_{j_1… j_n}

Value

numeric or character.

References

Guidotti E (2022). "calculus: High-Dimensional Numerical and Symbolic Calculus in R." Journal of Statistical Software, 104(5), 1-37. doi: 10.18637/jss.v104.i05

See Also

Other basic arithmetic: %diff%(), %div%(), %dot%(), %kronecker%(), %outer%(), %prod%(), %sum%()

Examples

### numeric inner product 
x <- array(1:4, dim = c(2,2))
x %inner% x

### symbolic inner product 
x <- array(letters[1:4], dim = c(2,2))
x %inner% x


eguidotti/calculus documentation built on March 17, 2023, 5:18 a.m.