Learn R Programming

wedge (version 1.0-3)

cross: Cross products of \(k\)-tensors

Description

Cross products of \(k\)-tensors

Usage

cross(U, ...)
cross2(U1,U2)

Arguments

U,U1,U2

Object of class ktensor

...

Further arguments, currently ignored

Details

Given a \(k\)-tensor object \(S\) and an \(l\)-tensor \(T\), we can form the cross product \(S\otimes T\), defined as

$$S\otimes T\left(v_1,\ldots,v_k,v_{k+1},\ldots, v_{k+l}\right)= S\left(v_1,\ldots v_k\right)\cdot T\left(v_{k+1},\ldots v_{k+l}\right).$$

Package idiom for this includes cross(S,T) and S %X% T; note that the cross product is not commutative. Function cross() can take any number of arguments (the result is well-defined because the cross product is associative); it uses cross2() as a low-level helper function.

References

Spivak 1961

See Also

ktensor

Examples

Run this code
# NOT RUN {
M <- cbind(1:4,2:5)
U1 <- as.ktensor(M,rnorm(4))
U2 <- as.ktensor(t(M),1:2)

cross(U1, U2)
cross(U2, U1)  # not the same!

U1 %X% U2 - U2 %X% U1


# }

Run the code above in your browser using DataLab