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

Each index of a tensor can be covariate or contravariate. The `is.*`

routines check the state of the individual indices based on the
tensor, its dimension or its index names. `drag.tensor`

can
change the state for the tensor and contraname for the names of the tensor.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
drag.tensor(x,g,d)
contraname(x)
is.covariate(x,...)
## S3 method for class 'tensor'
is.covariate(x,...)
## S3 method for class 'numeric'
is.covariate(x,...)
## S3 method for class 'character'
is.covariate(x,...)
as.covariate(x,...)
## S3 method for class 'character'
as.covariate(x,...)
is.contravariate(x,...)
## S3 method for class 'numeric'
is.contravariate(x,...)
## S3 method for class 'character'
is.contravariate(x,...)
as.contravariate(x,...)
## S3 method for class 'character'
as.contravariate(x,...)
``` |

`x` |
the tensor, its dimension (for |

`g` |
The geometry tensor |

`d` |
a vector (or list) of indices that should be dragged,
i.e. multiplied with |

`...` |
only for generic use |

The covariate and contravariate state of a dimension corresponds to column and row vectors. The transformation between these type is done by a linear mapping give by the geometry tensor g, which is the identity matrix if the enclosing the geometry is represented by the orthonormal basis and ordinary scalar product.

`drag.tensor` |
returns a tensor like x but with the dimension |

`is.covariate` |
returns a boolean vector giving true for every covariate index |

`is.contravariate` |
returns a boolean vector giving true for every contravariate index |

`as.*` |
changes the state of the indices |

`contraname` |
returns the names with opposite the opposite covariate and contravariate state |

K. Gerald van den Boogaart

`riemann.tensor`

, `to.tensor`

, `Tensor`

1 2 3 4 5 6 7 8 9 10 | ```
g <- to.tensor(c(1,2,0,1),c(i=2,j=2))
A <- to.tensor(rnorm(8),c(a=2,b=2,c=2))
A2 <- drag.tensor(A,g,c("b","c"))
A2
names(A2)
as.covariate(names(A2))
as.contravariate(names(A2))
is.covariate(A2)
is.contravariate(A2)
riemann.tensor(A2,g)
``` |

tensorA documentation built on July 29, 2018, 5:01 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.