R Documentation |
Print methods for Clifford algebra
## S3 method for class 'clifford' print(x,...) ## S3 method for class 'clifford' as.character(x,...) catterm(a)
x |
Object of class |
... |
Further arguments, currently ignored |
a |
Integer vector representing a term |
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.
Robin K. S. Hankin
clifford
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.