Description Usage Arguments Details Value Note Examples

Allows arithmetic operators to be used for octonion calculations, such as addition, multiplication, division, integer powers, etc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |

`e1,e2, A, B` |
Objects of class “ |

`oct1,oct2` |
Octonionic vectors |

`quat1,quat2` |
Quaternionic vectors |

`scalar` |
Scalar vector |

`ur` |
In function |

The function `Ops.onion()`

passes unary and binary arithmetic
operators (“`+`

”, “`-`

”, “`*`

”, and
“`/`

”) to the appropriate specialist function.

The most interesting operator is “`*`

”, which is passed to
`AprodA()`

. This function is sensitive to the value of option
`use.R`

. If this is `TRUE`

, then arguments are passed, via
`Amassage()`

, to either `R_HprodH()`

(for quaternions), or
`R_OprodO()`

(for octonions). If option `use.R`

is
anything other than `TRUE`

(including being unset, which is the
default), the massaged arguments are passed to
`HprodH()`

or `OprodO()`

. This is what the user usually
wants: it is much faster than using the `R_`

functions.

The relative performance of, say, `OprodO()`

vs
`R_OprodO()`

, will be system dependent but on my little Linux
system (Fedora; 256MB) `OprodO()`

runs more than three hundred
times faster than `R_OprodO()`

. Your mileage may vary; see
examples section for using `options()`

to set argument `ur`

.

An object of the appropriate (ie biggest) class as went in,
as per `harmonize()`

.

The only non obvious ones are `Amassage()`

, which is used by the
other functions to massage the two arguments into being the same
length, thus emulating recycling.

The other one is `harmonize()`

that coerces scalars into
quaternions and quaternions into octonions if necessary, returning a
list of two octonions or two quaternions of the same length, for
passing to functions like `AprodA()`

.

None of these functions are really intended for the end user: use the ops as shown in the examples section.

The “`A`

” at the beginning of a function name means
**A**ny onion. Thus `Ainv()`

takes quaternionic or
octonionic arguments, but `OprodO()`

takes only octonions.

1 2 3 4 5 6 7 |

onion documentation built on July 11, 2017, 9:04 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.