zero: Zero tensors and zero forms

Description Usage Arguments Note Author(s) See Also Examples

Description

Correct idiom for generating zero k-tensors and k-forms

Usage

1
2

Arguments

n

Arity of the k-form or k-tensor

Note

Idiom such as as.ktensor(rep(1,n),0) and as.kform(rep(1,5),0) and indeed as.kform(1:5,0) is incorrect as the arity of the tensor is lost.

A 0-form is not the same thing as a zero tensor. A 0-form maps V^0 to the reals; a scalar. A zero tensor maps V^k to zero.

Author(s)

Robin K. S. Hankin

See Also

scalar

Examples

1
2
3
4
5
6
7
8
as.ktensor(1+diag(5)) + zerotensor(5)
as.kform(matrix(1:6,2,3)) + zeroform(3)

## Not run:  
as.ktensor(1+diag(5)) +  as.ktensor(rep(1,5),0)   # fails
as.kform(matrix(1:6,2,3)) + as.kform(1:3,0)   # also fails

## End(Not run)

wedge documentation built on Sept. 4, 2019, 9:02 a.m.