[/macro definitions specific to octonions]
[def __R ['[*R]]]
[def __C ['[*C]]]
[def __H ['[*H]]]
[def __O ['[*O]]]
[def __R3 ['[*'''R3''']]]
[def __R4 ['[*'''R4''']]]
[def __octulple ('''α,β,γ,δ,ε,ζ,η,θ''')]
[def __oct_formula ['[^o = '''α + βi + γj + δk + εe' + ζi' + ηj' + θk' ''']]]
[def __oct_complex_formula ['[^o = ('''α + βi) + (γ + δi)j + (ε + ζi)e' + (η - θi)j' ''']]]
[def __oct_quat_formula ['[^o = ('''α + βi + γj + δk) + (ε + ζi + ηj - θj)e' ''']]]
[def __oct_not_equal ['[^x(yz) '''≠''' (xy)z]]]
[mathpart octonions Octonions]
[section:oct_overview Overview]
Octonions, like [link quaternions quaternions], are a relative of complex numbers.
Octonions see some use in theoretical physics.
In practical terms, an octonion is simply an octuple of real numbers __octulple,
which we can write in the form __oct_formula, where ['[^i]], ['[^j]] and ['[^k]]
are the same objects as for quaternions, and ['[^e']], ['[^i']], ['[^j']] and ['[^k']]
are distinct objects which play essentially the same kind of role as ['[^i]] (or ['[^j]] or ['[^k]]).
Addition and a multiplication is defined on the set of octonions,
which generalize their quaternionic counterparts. The main novelty this time
is that [*the multiplication is not only not commutative, is now not even
associative] (i.e. there are octonions ['[^x]], ['[^y]] and ['[^z]] such that __oct_not_equal).
A way of remembering things is by using the following multiplication table:
[$../octonion/graphics/octonion_blurb17.jpeg]
Octonions (and their kin) are described in far more details in this other
[@../quaternion/TQE.pdf document] (with [@../quaternion/TQE_EA.pdf errata and addenda]).
Some traditional constructs, such as the exponential, carry over without too
much change into the realms of octonions, but other, such as taking a square root,
do not (the fact that the exponential has a closed form is a result of the
author, but the fact that the exponential exists at all for octonions is known
since quite a long time ago).
[endsect] [/section:oct_overview Overview]
[section:oct_header Header File]
The interface and implementation are both supplied by the header file
[@../../../../boost/math/octonion.hpp octonion.hpp].
[endsect]
[section:oct_synopsis Synopsis]
namespace boost{ namespace math{
template class ``[link math_toolkit.octonion octonion]``;
template<> class ``[link math_toolkit.oct_specialization octonion]``;
template<> class ``[link math_octonion_double octonion]``;
template<> class ``[link math_octonion_long_double octonion]``;
// operators
template octonion ``[link math_toolkit.oct_non_mem.binary_addition_operators operator +]`` (T const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_addition_operators operator +]`` (octonion const & lhs, T const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_addition_operators operator +]`` (::std::complex const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_addition_operators operator +]`` (octonion const & lhs, ::std::complex const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_addition_operators operator +]`` (::boost::math::quaternion const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_addition_operators operator +]`` (octonion const & lhs, ::boost::math::quaternion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_addition_operators operator +]`` (octonion const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_subtraction_operators operator -]`` (T const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_subtraction_operators operator -]`` (octonion const & lhs, T const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_subtraction_operators operator -]`` (::std::complex const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_subtraction_operators operator -]`` (octonion const & lhs, ::std::complex const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_subtraction_operators operator -]`` (::boost::math::quaternion const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_subtraction_operators operator -]`` (octonion const & lhs, ::boost::math::quaternion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_subtraction_operators operator -]`` (octonion const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_multiplication_operators operator *]`` (T const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_multiplication_operators operator *]`` (octonion const & lhs, T const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_multiplication_operators operator *]`` (::std::complex const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_multiplication_operators operator *]`` (octonion const & lhs, ::std::complex const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_multiplication_operators operator *]`` (::boost::math::quaternion const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_multiplication_operators operator *]`` (octonion const & lhs, ::boost::math::quaternion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_multiplication_operators operator *]`` (octonion const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_division_operators operator /]`` (T const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_division_operators operator /]`` (octonion const & lhs, T const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_division_operators operator /]`` (::std::complex const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_division_operators operator /]`` (octonion const & lhs, ::std::complex const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_division_operators operator /]`` (::boost::math::quaternion const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_division_operators operator /]`` (octonion const & lhs, ::boost::math::quaternion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.binary_division_operators operator /]`` (octonion const & lhs, octonion const & rhs);
template octonion ``[link math_toolkit.oct_non_mem.unary_plus_and_minus_operators operator +]`` (octonion const & o);
template octonion ``[link math_toolkit.oct_non_mem.unary_plus_and_minus_operators operator -]`` (octonion const & o);
template bool ``[link math_toolkit.oct_non_mem.binary_equality_operators operator ==]`` (T const & lhs, octonion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_equality_operators operator ==]`` (octonion const & lhs, T const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_equality_operators operator ==]`` (::std::complex const & lhs, octonion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_equality_operators operator ==]`` (octonion const & lhs, ::std::complex const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_equality_operators operator ==]`` (::boost::math::quaternion const & lhs, octonion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_equality_operators operator ==]`` (octonion const & lhs, ::boost::math::quaternion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_equality_operators operator ==]`` (octonion const & lhs, octonion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_inequality_operators operator !=]`` (T const & lhs, octonion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_inequality_operators operator !=]`` (octonion const & lhs, T const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_inequality_operators operator !=]`` (::std::complex const & lhs, octonion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_inequality_operators operator !=]`` (octonion const & lhs, ::std::complex const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_inequality_operators operator !=]`` (::boost::math::quaternion const & lhs, octonion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_inequality_operators operator !=]`` (octonion const & lhs, ::boost::math::quaternion const & rhs);
template bool ``[link math_toolkit.oct_non_mem.binary_inequality_operators operator !=]`` (octonion const & lhs, octonion const & rhs);
template
::std::basic_istream & ``[link math_toolkit.oct_non_mem.stream_extractor operator >>]`` (::std::basic_istream & is, octonion & o);
template
::std::basic_ostream & ``[link math_toolkit.oct_non_mem.stream_inserter operator <<]`` (::std::basic_ostream & os, octonion const & o);
// values
template T ``[link math_toolkit.oct_value_ops.real_and_unreal real]``(octonion const & o);
template octonion ``[link math_toolkit.oct_value_ops.real_and_unreal unreal]``(octonion const & o);
template T ``[link math_toolkit.oct_value_ops.sup sup]``(octonion const & o);
template T ``[link math_toolkit.oct_value_ops.l1 l1]``(octonionconst & o);
template T ``[link math_toolkit.oct_value_ops.abs abs]``(octonion const & o);
template T ``[link math_toolkit.oct_value_ops.norm norm]``(octonionconst & o);
template octonion ``[link math_toolkit.oct_value_ops.conj conj]``(octonion const & o);
template octonion ``[link math_toolkit.oct_create spherical]``(T const & rho, T const & theta, T const & phi1, T const & phi2, T const & phi3, T const & phi4, T const & phi5, T const & phi6);
template octonion ``[link math_toolkit.oct_create multipolar]``(T const & rho1, T const & theta1, T const & rho2, T const & theta2, T const & rho3, T const & theta3, T const & rho4, T const & theta4);
template octonion ``[link math_toolkit.oct_create cylindrical]``(T const & r, T const & angle, T const & h1, T const & h2, T const & h3, T const & h4, T const & h5, T const & h6);
// transcendentals
template octonion ``[link math_toolkit.oct_trans.exp exp]``(octonion const & o);
template octonion ``[link math_toolkit.oct_trans.cos cos]``(octonion const & o);
template octonion ``[link math_toolkit.oct_trans.sin sin]``(octonion const & o);
template octonion ``[link math_toolkit.oct_trans.tan tan]``(octonion const & o);
template octonion ``[link math_toolkit.oct_trans.cosh cosh]``(octonion const & o);
template octonion ``[link math_toolkit.oct_trans.sinh sinh]``(octonion const & o);
template octonion ``[link math_toolkit.oct_trans.tanh tanh]``(octonion const & o);
template octonion ``[link math_toolkit.oct_trans.pow pow]``(octonion const & o, int n);
} } // namespaces
[endsect] [/section:oct_header Header File]
[section:octonion Template Class octonion]
namespace boost{ namespace math {
template
class octonion
{
public:
typedef T value_type;
explicit ``[link math_toolkit.oct_mem_fun.constructors octonion]``(T const & requested_a = T(), T const & requested_b = T(), T const & requested_c = T(), T const & requested_d = T(), T const & requested_e = T(), T const & requested_f = T(), T const & requested_g = T(), T const & requested_h = T());
explicit ``[link math_toolkit.oct_mem_fun.constructors octonion]``(::std::complex const & z0, ::std::complex const & z1 = ::std::complex(), ::std::complex const & z2 = ::std::complex(), ::std::complex const & z3 = ::std::complex());
explicit ``[link math_toolkit.oct_mem_fun.constructors octonion]``(::boost::math::quaternion const & q0, ::boost::math::quaternion const & q1 = ::boost::math::quaternion());
template
explicit ``[link math_toolkit.oct_mem_fun.constructors octonion]``(octonion const & a_recopier);
T ``[link math_toolkit.oct_mem_fun.real_and_unreal_parts real]``() const;
octonion ``[link math_toolkit.oct_mem_fun.real_and_unreal_parts unreal]``() const;
T ``[link math_toolkit.oct_mem_fun.individual_real_components R_component_1]``() const;
T ``[link math_toolkit.oct_mem_fun.individual_real_components R_component_2]``() const;
T ``[link math_toolkit.oct_mem_fun.individual_real_components R_component_3]``() const;
T ``[link math_toolkit.oct_mem_fun.individual_real_components R_component_4]``() const;
T ``[link math_toolkit.oct_mem_fun.individual_real_components R_component_5]``() const;
T ``[link math_toolkit.oct_mem_fun.individual_real_components R_component_6]``() const;
T ``[link math_toolkit.oct_mem_fun.individual_real_components R_component_7]``() const;
T ``[link math_toolkit.oct_mem_fun.individual_real_components R_component_8]``() const;
::std::complex ``[link math_toolkit.oct_mem_fun.individual_complex_components C_component_1]``() const;
::std::complex ``[link math_toolkit.oct_mem_fun.individual_complex_components C_component_2]``() const;
::std::complex ``[link math_toolkit.oct_mem_fun.individual_complex_components C_component_3]``() const;
::std::complex ``[link math_toolkit.oct_mem_fun.individual_complex_components C_component_4]``() const;
::boost::math::quaternion ``[link math_toolkit.oct_mem_fun.individual_quaternion_components H_component_1]``() const;
::boost::math::quaternion ``[link math_toolkit.oct_mem_fun.individual_quaternion_components H_component_2]``() const;
octonion & ``[link math_toolkit.oct_mem_fun.assignment_operators operator =]`` (octonion const & a_affecter);
template
octonion & ``[link math_toolkit.oct_mem_fun.assignment_operators operator =]`` (octonion const & a_affecter);
octonion & ``[link math_toolkit.oct_mem_fun.assignment_operators operator =]`` (T const & a_affecter);
octonion & ``[link math_toolkit.oct_mem_fun.assignment_operators operator =]`` (::std::complex const & a_affecter);
octonion & ``[link math_toolkit.oct_mem_fun.assignment_operators operator =]`` (::boost::math::quaternion const & a_affecter);
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator +=]`` (T const & rhs);
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator +=]`` (::std::complex const & rhs);
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator +=]`` (::boost::math::quaternion const & rhs);
template
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator +=]`` (octonion const & rhs);
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator -=]`` (T const & rhs);
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator -=]`` (::std::complex const & rhs);
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator -=]`` (::boost::math::quaternion const & rhs);
template
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator -=]`` (octonion const & rhs);
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator *=]`` (T const & rhs);
octonion & ``[link math_toolkit.oct_mem_fun.other_member_operators operator *=]`` (::std::complex