Re {onion}R Documentation

Octonion components

Description

Get or set each component of an onionic vector

Usage

## S3 method for class 'octonion'
Re(z)
## S3 method for class 'octonion'
Im(z)
## S3 method for class 'octonion'
i(x)
## S3 method for class 'octonion'
j(x)
## S3 method for class 'octonion'
k(x)
## S3 method for class 'octonion'
l(x)
## S3 method for class 'octonion'
il(x)
## S3 method for class 'octonion'
jl(x)
## S3 method for class 'octonion'
kl(x)
## S3 replacement method for class 'octonion'
Re(x) <- value
## S3 replacement method for class 'octonion'
Im(x) <- value
## S3 replacement method for class 'octonion'
i(x) <- value
## S3 replacement method for class 'octonion'
j(x) <- value
## S3 replacement method for class 'octonion'
k(x) <- value
## S3 replacement method for class 'octonion'
l(x) <- value
## S3 replacement method for class 'octonion'
il(x) <- value
## S3 replacement method for class 'octonion'
jl(x) <- value
## S3 replacement method for class 'octonion'
kl(x) <- value
## S3 method for class 'quaternion'
Re(z)
## S3 method for class 'quaternion'
Im(z)
## S3 method for class 'quaternion'
i(x)
## S3 method for class 'quaternion'
j(x)
## S3 method for class 'quaternion'
k(x)
## S3 replacement method for class 'quaternion'
Re(x) <- value
## S3 replacement method for class 'quaternion'
Im(x) <- value
## S3 replacement method for class 'quaternion'
i(x) <- value
## S3 replacement method for class 'quaternion'
j(x) <- value
## S3 replacement method for class 'quaternion'
k(x) <- value
## S3 method for class 'onion'
get.comp(x,i)
## S3 replacement method for class 'onion'
set.comp(x,i) <- value

Arguments

x,z

An onionic vector

value

A real vector (or, in the case of Im<-() and set.comp<-(), an appropriately sized matrix)

i

In functions get.comp() and set.comp<-(), an integer between 1 and 2^n where n depends on the type of onion

Value

All return an onion of the appropriate class.

Note

In the case of Im<- methods, if value has the special value 0, then all the imaginary parts will be set to zero, as though one had typed Im(a) <- Im(a)*0. Note that setting value to rep(0,length(x)) will not work; neither will Im(x) <- 3 (say).

These functions are all specific to their algebra; there is no onionic generalization. This is because the code is more structured. It also makes it easier to change the names of the bases.

Functions get.comp() and the various methods for set.comp<-() are not really intended for the end-user. It is better to use idioms such as il(x) and i(x) <- 4

Author(s)

Robin K. S. Hankin

See Also

octonion

Examples

x <- octonion(Re=1,il=1:3,j=3:1)
Re(x)
kl(x) <- 1000

[Package onion version 1.2-7 Index]