print: Print clifford objects

printR Documentation

Print clifford objects

Description

Print methods for Clifford algebra

Usage

## S3 method for class 'clifford'
print(x,...)
## S3 method for class 'clifford'
as.character(x,...)
catterm(a)

Arguments

x

Object of class clifford in the print method

...

Further arguments, currently ignored

a

Integer vector representing a term

Note

The print method does not change the internal representation of a clifford object, which is a two-element list, the first of which is a list of integer vectors representing terms, and the second is a numeric vector of coefficients.

The print method is sensitive to the value of option separate. If FALSE (the default), the method prints in a compact form, as in e_134. The indices of the basis vectors are separated with option basissep which is usually NULL but if n>9, then setting options("basissep" = ",") might look good as it will print e_10,11,12 instead of e_101112. If separate is TRUE, the method prints the basis vectors separately, as in e1 e3 e4.

Function as.character.clifford() is also sensitive to these options. The print method has special dispensation for length-zero clifford objects. Function catterm() is a low-level helper function.

Author(s)

Robin K. S. Hankin

See Also

clifford

Examples


a <- rcliff(d=15,g=9)
a   # incomprehensible

options("separate" = TRUE)
a    # marginally better


options("separate" = FALSE)
options(basissep=",")
a    #  clearer; YMMV

options(basissep = NULL)  # restore default




clifford documentation built on Aug. 14, 2022, 1:05 a.m.