marktensor: Marks the names of a tensor with a mark

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This modifies the names of the dimensions in a simple and reversible way by adding a mark.

Usage

1
2
3
4
5
6
7
mark(X,mark,...)
## S3 method for class 'tensor'
mark(X,mark="'",i=1:level.tensor(X),...,by=NULL)
## S3 method for class 'numeric'
mark(X,mark="'",i=1:length(X),...,by=NULL)
## S3 method for class 'character'
mark(X,mark="'",i=1:length(X),...,by=NULL)

Arguments

X

A tensor or dimension to be marked

mark

a character giving the mark

i

the dimensions to be marked

...

generic arguments

by

Dimensions not to be marked. Wins in case of conflicts.

Details

The concept is very important in tensor algebra since it allows to keep dimensions connected without but still distinguishable. Eventually later a function for the Riemann summing rule will make use of marks to distinguish covariate and contravariate dimensions.

Value

A object similar to X but with marked dimensions.

Author(s)

K. Gerald van den Boogaart

See Also

delta.tensor, diag.tensor

Examples

1
2
3
# The outer product
A <- to.tensor(1:4,c(a=2,b=2))
A 

tensorA documentation built on Nov. 20, 2020, 9:07 a.m.

Related to marktensor in tensorA...