tensorA (version 0.36.1)

power.tensor: Compute the power of a symmetric tensor

Description

A tensor can be seen as a linear mapping of a tensor to a tensor. If domain and image are the same and the tensor is definite, we can define powers.

Usage

power.tensor(X,i,j,p=0.5,by=NULL)

Arguments

X

The tensor to be decomposed

i

The image dimensions of the linear mapping

j

The domain dimensions of the linear mapping

p

the power of the tensor to be computed

by

the operation is done in parallel for these dimensions

Value

a tensor

Details

A tensor can be seen as a linear mapping of a tensor to a tensor. Let denote \(R_i\) the space of real tensors with dimensions \(i_1...i_d\).

To compute a power dim(X)[i] and dim(X)[j] need to be equal and the tensor symmetric between these dimension. Some exponents are only valid with positive definite mappings. None of these conditions is checked.

See Also

svd.tensor,

Examples

Run this code
# NOT RUN {
A <- to.tensor(rnorm(120),c(a=2,b=2,c=5,d=3,e=2))
AAt <- A %e% mark(A,"'",c("a","b"))
AAt

power.tensor(AAt,c("a","b"),c("a'","b'"),-1)

inv.tensor(AAt,c("a","b"))

power.tensor(AAt,c("a","b"),c("a'","b'"),2)
mul.tensor(AAt,c("a","b"),AAt,c("a'","b'"))

power.tensor(power.tensor(AAt,c("a","b"),c("a'","b'"),1/pi),
                     c("a","b"),c("a'","b'"),pi)


AAt <- einstein.tensor(A , mark(A,"'",c("a","b")),by="e")

power.tensor(AAt,c("a","b"),c("a'","b'"),-1,by="e")

inv.tensor(AAt,c("a","b"),by="e")

power.tensor(AAt,c("a","b"),c("a'","b'"),2,by="e")
mul.tensor(AAt,c("a","b"),AAt,c("a'","b'"),by="e")

power.tensor(power.tensor(AAt,c("a","b"),c("a'","b'"),1/pi,by="e"),
c("a","b"),c("a'","b'"),pi,by="e")


# }

Run the code above in your browser using DataLab