print: Print methods for k-tensors and k-forms

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

Description

\loadmathjax

Print methods for objects with options for printing in matrix form or multivariate polynomial form

Usage

1
2
3
4
## S3 method for class 'kform'
print(x, ...)
## S3 method for class 'ktensor'
print(x, ...)

Arguments

x \mjseqn

k-form or \mjseqnk-tensor

...

Further arguments (currently ignored)

Details

\loadmathjax

The print method is designed to tell the user that an object is a tensor or a \mjseqnk-form. It prints a message to this effect (with special dispensation for zero tensors), then calls the spray print method.

Value

Returns its argument invisibly.

Note

The print method asserts that its argument is a map from \mjseqnR^n to \mjseqnR, where \mjseqnn is the largest element in the index matrix. However, such a map naturally furnishes a map from \mjseqnR^m to \mjseqnR provided that \mjeqnm\geq nm>=n via the natural projection from \mjseqnR^n to \mjseqnR^m. Formally this would be \mjeqn\left(x_1,...,x_n\right)\mapsto\left(x_1,...,x_n,0,...,0\right)\in R^mequation omitted. In the case of the zero \mjseqnk-form or \mjseqnk-tensor, β€œn” is to be interpreted as β€œany \mjeqnn\geq 0n>=0”.

By default, the print method uses the spray print methods, and as such respects the polyform option.

However, the print method is sensitive to the stokes_symbolic_print option. If TRUE, it uses as.symbolic() to give an alternate way of displaying \mjseqnk-forms.

Author(s)

Robin K. S. Hankin

See Also

as.symbolic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rform()
rtensor()

## spray print options work:
options(polyform = TRUE)
rtensor()


## reset to default 
options(polyform = FALSE)

stokes documentation built on Jan. 18, 2022, 1:11 a.m.