roct {onion} | R Documentation |
Random onionic vectors
Description
Random quaternion or octonion vectors and matrices
Usage
rquat(n=5)
roct(n=5)
rsquat(n=11,s=12)
rsoct(n=11,s=12)
romat(type="quaternion", nrow=5, ncol=6, ...)
rsomat(type="quaternion", nrow=5, ncol=6, ...)
Arguments
n |
Length of random vector returned |
nrow , ncol , ... |
Further arguments specifying properties of the returned matrix |
s |
In the sparse functions |
type |
string specifying type of elements |
Details
Function rquat()
returns a quaternionic vector, roct()
returns an octonionic vector, and romat()
a quaternionic
matrix.
Functions rquat()
and roct()
give a quick “get
you going” random onion to play with. Function romat()
gives a
simple onionmat, although arguably matrix(roct(4),2,2)
is as
convenient.
The “sparse” functions rsquat()
and rsoct()
and
rsomat()
return onions that have many zero entries; non-zero
entries are small integers. They showcase the print method for the
case when show_onions_compactly
is set.
Author(s)
Robin K. S. Hankin
References
K. Shoemake 1992. “Uniform random rotations”. In D. Kirk, editor, Graphics Gems III pages 129-130. Academic, New York.
Examples
rquat(3)
roct(3)
plot(roct(30))
romat()
rsquat()
rsoct()