Class onion is a virtual S4 class extending classes
quaternion and octonion. In package documentation,
“onion” means an R object that behaves as a vector of
quaternions or octonions, stored as a four- or eight- row numeric
matrix.
Class onionmat is the S4 class for matrices whose
elements are quaternions or octonions. An onionmat is stored as a
two-element list, the first being an onion and the second an integer
matrix which holds structural matrix attributes such as dimensions and
dimnames. Most standard arithmetic R idiom for matrices should work
for onionmats.
Class index is taken from the excellent Matrix package and
is a setClassUnion()
of classes numeric
, logical
,
and character
, which mean that it is an arity-one matrix index.