Learn R Programming

spray (version 1.0-26)

spraycross: Cross product for spray objects

Description

Provides a natural cross product for spray objects, useful for tensors and \(k\)-forms

Usage

spraycross(S, ...)
spraycross2(S1,S2)

Value

Returns a spray object

Arguments

S,S1,S2,...

spray objects

Author

Robin K. S. Hankin

Details

Tensor products for sprays. This is not an algebraic product of sprays interpreted as multivariate polynomials. The function is used in the stokes package.

Function spraycross2() is a helper function that takes exactly two arguments. Function spraycross() is a more general function that takes any number of arguments.

Examples

Run this code
a <- spray(matrix(1:4,2,2),c(2,5))
b <- spray(matrix(c(10,11,12,13),2,2),c(7,11))
a
b
spraycross2(a,b)
spraycross2(b,a)

spraycross(a,b,b)

Run the code above in your browser using DataLab