From 3cc4cca7fc38efcb9a22a125e30f3ca0f5dd0dae Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 9 Oct 2007 17:25:30 +0000 Subject: [PATCH] Added refactored docs for existing Boost.Math libraries. [SVN r39852] --- doc/octonion/Jamfile.v2 | 74 ++ .../html/boost_octonions/octonions.html | 64 ++ .../octonions/acknowledgements.html | 46 + .../octonions/header_file.html | 42 + .../boost_octonions/octonions/history.html | 101 ++ .../boost_octonions/octonions/non_mem.html | 228 ++++ .../boost_octonions/octonions/oct_create.html | 79 ++ .../octonions/octonion_member_functions.html | 269 +++++ .../octonions/octonion_member_typedefs.html | 70 ++ .../octonions/octonion_specializations.html | 243 ++++ .../octonions/octonion_value_operations.html | 108 ++ .../octonions/octonions_transcendentals.html | 153 +++ .../boost_octonions/octonions/overview.html | 79 ++ .../boost_octonions/octonions/synopsis.html | 135 +++ .../octonions/template_class_octonion.html | 109 ++ .../octonions/test_program.html | 54 + .../html/boost_octonions/octonions/to_do.html | 49 + doc/octonion/html/index.html | 78 ++ doc/octonion/math-octonion.qbk | 1005 +++++++++++++++++ doc/quaternion/Jamfile.v2 | 73 ++ .../html/boost_quaternions/quaternions.html | 63 ++ .../quaternions/acknowledgements.html | 46 + .../boost_quaternions/quaternions/create.html | 113 ++ .../boost_quaternions/quaternions/exp.html | 49 + .../quaternions/header_file.html | 42 + .../quaternions/history.html | 103 ++ .../quaternions/mem_fun.html | 245 ++++ .../quaternions/mem_typedef.html | 70 ++ .../quaternions/non_mem.html | 227 ++++ .../quaternions/overview.html | 89 ++ .../boost_quaternions/quaternions/quat.html | 93 ++ .../boost_quaternions/quaternions/spec.html | 192 ++++ .../quaternions/synopsis.html | 122 ++ .../quaternions/test_program.html | 55 + .../boost_quaternions/quaternions/to_do.html | 53 + .../boost_quaternions/quaternions/trans.html | 148 +++ .../quaternions/value_op.html | 108 ++ doc/quaternion/html/index.html | 77 ++ doc/quaternion/math-quaternion.qbk | 931 +++++++++++++++ doc/sf_and_dist/Jamfile.v2 | 3 +- doc/{sf_and_dist => }/svg-admon/caution.svg | 0 doc/{sf_and_dist => }/svg-admon/home.svg | 0 doc/{sf_and_dist => }/svg-admon/important.svg | 0 doc/{sf_and_dist => }/svg-admon/next.svg | 0 doc/{sf_and_dist => }/svg-admon/note.svg | 0 doc/{sf_and_dist => }/svg-admon/prev.svg | 0 doc/{sf_and_dist => }/svg-admon/tip.svg | 0 doc/{sf_and_dist => }/svg-admon/up.svg | 0 doc/{sf_and_dist => }/svg-admon/warning.svg | 0 49 files changed, 5887 insertions(+), 1 deletion(-) create mode 100644 doc/octonion/Jamfile.v2 create mode 100644 doc/octonion/html/boost_octonions/octonions.html create mode 100644 doc/octonion/html/boost_octonions/octonions/acknowledgements.html create mode 100644 doc/octonion/html/boost_octonions/octonions/header_file.html create mode 100644 doc/octonion/html/boost_octonions/octonions/history.html create mode 100644 doc/octonion/html/boost_octonions/octonions/non_mem.html create mode 100644 doc/octonion/html/boost_octonions/octonions/oct_create.html create mode 100644 doc/octonion/html/boost_octonions/octonions/octonion_member_functions.html create mode 100644 doc/octonion/html/boost_octonions/octonions/octonion_member_typedefs.html create mode 100644 doc/octonion/html/boost_octonions/octonions/octonion_specializations.html create mode 100644 doc/octonion/html/boost_octonions/octonions/octonion_value_operations.html create mode 100644 doc/octonion/html/boost_octonions/octonions/octonions_transcendentals.html create mode 100644 doc/octonion/html/boost_octonions/octonions/overview.html create mode 100644 doc/octonion/html/boost_octonions/octonions/synopsis.html create mode 100644 doc/octonion/html/boost_octonions/octonions/template_class_octonion.html create mode 100644 doc/octonion/html/boost_octonions/octonions/test_program.html create mode 100644 doc/octonion/html/boost_octonions/octonions/to_do.html create mode 100644 doc/octonion/html/index.html create mode 100644 doc/octonion/math-octonion.qbk create mode 100644 doc/quaternion/Jamfile.v2 create mode 100644 doc/quaternion/html/boost_quaternions/quaternions.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/acknowledgements.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/create.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/exp.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/header_file.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/history.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/mem_fun.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/mem_typedef.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/non_mem.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/overview.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/quat.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/spec.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/synopsis.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/test_program.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/to_do.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/trans.html create mode 100644 doc/quaternion/html/boost_quaternions/quaternions/value_op.html create mode 100644 doc/quaternion/html/index.html create mode 100644 doc/quaternion/math-quaternion.qbk rename doc/{sf_and_dist => }/svg-admon/caution.svg (100%) rename doc/{sf_and_dist => }/svg-admon/home.svg (100%) rename doc/{sf_and_dist => }/svg-admon/important.svg (100%) rename doc/{sf_and_dist => }/svg-admon/next.svg (100%) rename doc/{sf_and_dist => }/svg-admon/note.svg (100%) rename doc/{sf_and_dist => }/svg-admon/prev.svg (100%) rename doc/{sf_and_dist => }/svg-admon/tip.svg (100%) rename doc/{sf_and_dist => }/svg-admon/up.svg (100%) rename doc/{sf_and_dist => }/svg-admon/warning.svg (100%) diff --git a/doc/octonion/Jamfile.v2 b/doc/octonion/Jamfile.v2 new file mode 100644 index 000000000..df31127c9 --- /dev/null +++ b/doc/octonion/Jamfile.v2 @@ -0,0 +1,74 @@ + +# Copyright John Maddock 2005. Use, modification, and distribution are +# subject to the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +using quickbook ; + +path-constant images_location : html ; + +xml octonion : math-octonion.qbk ; +boostbook standalone + : + octonion + : + # Path for links to Boost: + boost.root=../../../../.. + # Path for libraries index: + boost.libraries=../../../../../libs/libraries.htm + # Use the main Boost stylesheet: + html.stylesheet=../../../../../doc/html/boostbook.css + + # Some general style settings: + table.footnote.number.format=1 + footnote.number.format=1 + + # HTML options first: + # Use graphics not text for navigation: + navig.graphics=1 + # How far down we chunk nested sections, basically all of them: + chunk.section.depth=10 + # Don't put the first section on the same page as the TOC: + chunk.first.sections=1 + # How far down sections get TOC's + toc.section.depth=10 + # Max depth in each TOC: + toc.max.depth=4 + # How far down we go with TOC's + generate.section.toc.level=10 + #root.filename="sf_dist_and_tools" + + # PDF Options: + # TOC Generation: this is needed for FOP-0.9 and later: + # fop1.extensions=1 + pdf:xep.extensions=1 + # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9! + pdf:fop.extensions=0 + # No indent on body text: + pdf:body.start.indent=0pt + # Margin size: + pdf:page.margin.inner=0.5in + # Margin size: + pdf:page.margin.outer=0.5in + # Paper type = A4 + pdf:paper.type=A4 + # Yes, we want graphics for admonishments: + admon.graphics=1 + # Set this one for PDF generation *only*: + # default pnd graphics are awful in PDF form, + # better use SVG's instead: + pdf:admon.graphics.extension=".svg" + pdf:use.role.for.mediaobject=1 + pdf:preferred.mediaobject.role=print + pdf:img.src.path=$(images_location)/ + pdf:admon.graphics.path=$(images_location)/../../svg-admon/ + ; + + + + + + + + + diff --git a/doc/octonion/html/boost_octonions/octonions.html b/doc/octonion/html/boost_octonions/octonions.html new file mode 100644 index 000000000..0da4c989d --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions.html @@ -0,0 +1,64 @@ + + + +Octonions + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+ + + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/acknowledgements.html b/doc/octonion/html/boost_octonions/octonions/acknowledgements.html new file mode 100644 index 000000000..06fd3549b --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/acknowledgements.html @@ -0,0 +1,46 @@ + + + +Acknowledgements + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ The mathematical text has been typeset with Nisus + Writer. Jens Maurer has helped with portability and standard adherence, + and was the Review Manager for this library. More acknowledgements in the + History section. Thank you to all who contributed to the discussion about + this library. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/header_file.html b/doc/octonion/html/boost_octonions/octonions/header_file.html new file mode 100644 index 000000000..b170b7d89 --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/header_file.html @@ -0,0 +1,42 @@ + + + +Header File + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ The interface and implementation are both supplied by the header file octonion.hpp. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/history.html b/doc/octonion/html/boost_octonions/octonions/history.html new file mode 100644 index 000000000..f3771176a --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/history.html @@ -0,0 +1,101 @@ + + + +History + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
    +
  • + 1.5.8 - 17/12/2005: Converted documentation to Quickbook Format. +
  • +
  • + 1.5.7 - 25/02/2003: transitionned to the unit test framework; <boost/config.hpp> + now included by the library header (rather than the test files), via <boost/math/quaternion.hpp>. +
  • +
  • + 1.5.6 - 15/10/2002: Gcc2.95.x and stlport on linux compatibility by Alkis + Evlogimenos (alkis@routescience.com). +
  • +
  • + 1.5.5 - 27/09/2002: Microsoft VCPP 7 compatibility, by Michael Stevens + (michael@acfr.usyd.edu.au); requires the /Za compiler option. +
  • +
  • + 1.5.4 - 19/09/2002: fixed problem with multiple inclusion (in different + translation units); attempt at an improved compatibility with Microsoft + compilers, by Michael Stevens (michael@acfr.usyd.edu.au) and Fredrik Blomqvist; + other compatibility fixes. +
  • +
  • + 1.5.3 - 01/02/2002: bugfix and Gcc 2.95.3 compatibility by Douglas Gregor + (gregod@cs.rpi.edu). +
  • +
  • + 1.5.2 - 07/07/2001: introduced namespace math. +
  • +
  • + 1.5.1 - 07/06/2001: (end of Boost review) now includes <boost/math/special_functions/sinc.hpp> + and <boost/math/special_functions/sinhc.hpp> instead of <boost/special_functions.hpp>; + corrected bug in sin (Daryle Walker); removed check for self-assignment + (Gary Powel); made converting functions explicit (Gary Powel); added overflow + guards for division operators and abs (Peter Schmitteckert); added sup + and l1; used Vesa Karvonen's CPP metaprograming technique to simplify code. +
  • +
  • + 1.5.0 - 23/03/2001: boostification, inlining of all operators except input, + output and pow, fixed exception safety of some members (template version). +
  • +
  • + 1.4.0 - 09/01/2001: added tan and tanh. +
  • +
  • + 1.3.1 - 08/01/2001: cosmetic fixes. +
  • +
  • + 1.3.0 - 12/07/2000: pow now uses Maarten Hilferink's (mhilferink@tip.nl) + algorithm. +
  • +
  • + 1.2.0 - 25/05/2000: fixed the division operators and output; changed many + signatures. +
  • +
  • + 1.1.0 - 23/05/2000: changed sinc into sinc_pi; added sin, cos, sinh, cosh. +
  • +
  • + 1.0.0 - 10/08/1999: first public version. +
  • +
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/non_mem.html b/doc/octonion/html/boost_octonions/octonions/non_mem.html new file mode 100644 index 000000000..63847854d --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/non_mem.html @@ -0,0 +1,228 @@ + + + +Octonion Non-Member Operators + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+ + Unary + Plus and Minus Operators +
+
+template<typename T> octonion<T> operator + (octonion<T> const & o);
+
+

+ This unary operator simply returns o. +

+
+template<typename T> octonion<T> operator - (octonion<T> const & o);
+
+

+ This unary operator returns the opposite of o. +

+
+ + Binary + Addition Operators +
+
+template<typename T> octonion<T> operator + (T const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator + (octonion<T> const & lhs, T const & rhs);
+template<typename T> octonion<T> operator + (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator + (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> octonion<T> operator + (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator + (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> octonion<T> operator + (octonion<T> const & lhs, octonion<T> const & rhs);
+
+

+ These operators return octonion<T>(lhs) += + rhs. +

+
+ + Binary + Subtraction Operators +
+
+template<typename T> octonion<T> operator - (T const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator - (octonion<T> const & lhs, T const & rhs);
+template<typename T> octonion<T> operator - (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator - (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> octonion<T> operator - (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator - (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> octonion<T> operator - (octonion<T> const & lhs, octonion<T> const & rhs);
+
+

+ These operators return octonion<T>(lhs) -= + rhs. +

+
+ + Binary + Multiplication Operators +
+
+template<typename T> octonion<T> operator * (T const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator * (octonion<T> const & lhs, T const & rhs);
+template<typename T> octonion<T> operator * (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator * (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> octonion<T> operator * (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator * (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> octonion<T> operator * (octonion<T> const & lhs, octonion<T> const & rhs);
+
+

+ These operators return octonion<T>(lhs) *= + rhs. +

+
+ + Binary + Division Operators +
+
+template<typename T> octonion<T> operator / (T const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator / (octonion<T> const & lhs, T const & rhs);
+template<typename T> octonion<T> operator / (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator / (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> octonion<T> operator / (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator / (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> octonion<T> operator / (octonion<T> const & lhs, octonion<T> const & rhs);
+
+

+ These operators return octonion<T>(lhs) /= + rhs. It is of course still an error + to divide by zero... +

+
+ + Binary + Equality Operators +
+
+template<typename T> bool operator == (T const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator == (octonion<T> const & lhs, T const & rhs);
+template<typename T> bool operator == (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator == (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> bool operator == (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator == (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> bool operator == (octonion<T> const & lhs, octonion<T> const & rhs);
+
+

+ These return true if and only if the four components of octonion<T>(lhs) are + equal to their counterparts in octonion<T>(rhs). As + with any floating-type entity, this is essentially meaningless. +

+
+ + Binary + Inequality Operators +
+
+template<typename T> bool operator != (T const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator != (octonion<T> const & lhs, T const & rhs);
+template<typename T> bool operator != (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator != (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> bool operator != (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator != (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> bool operator != (octonion<T> const & lhs, octonion<T> const & rhs);
+
+

+ These return true if and only if octonion<T>(lhs) == + octonion<T>(rhs) is + false. As with any floating-type entity, this is essentially meaningless. +

+
+ + Stream + Extractor +
+
+template<typename T, typename charT, class traits>
+::std::basic_istream<charT,traits> & operator >> (::std::basic_istream<charT,traits> & is, octonion<T> & o);
+
+

+ Extracts an octonion o. We + accept any format which seems reasonable. However, since this leads to a + great many ambiguities, decisions were made to lift these. In case of doubt, + stick to lists of reals. +

+

+ The input values must be convertible to T. If bad input is encountered, calls + is.setstate(ios::failbit) (which may throw ios::failure + (27.4.5.3)). +

+

+ Returns is. +

+
+ + Stream + Inserter +
+
+template<typename T, typename charT, class traits>
+::std::basic_ostream<charT,traits> & operator << (::std::basic_ostream<charT,traits> & os, octonion<T> const & o);
+
+

+ Inserts the octonion o onto + the stream os as if it were + implemented as follows: +

+
+template<typename T, typename charT, class traits>
+::std::basic_ostream<charT,traits> & operator << ( ::std::basic_ostream<charT,traits> & os,
+octonion<T> const & o)
+{
+   ::std::basic_ostringstream<charT,traits> s;
+
+   s.flags(os.flags());
+   s.imbue(os.getloc());
+   s.precision(os.precision());
+
+   s << '(' << o.R_component_1() << ','
+      << o.R_component_2() << ','
+      << o.R_component_3() << ','
+      << o.R_component_4() << ','
+      << o.R_component_5() << ','
+      << o.R_component_6() << ','
+      << o.R_component_7() << ','
+      << o.R_component_8() << ')';
+
+   return os << s.str();
+}
+
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/oct_create.html b/doc/octonion/html/boost_octonions/octonions/oct_create.html new file mode 100644 index 000000000..acbb87de1 --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/oct_create.html @@ -0,0 +1,79 @@ + + + +Octonion Creation Functions + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+template<typename T> octonion<T> 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<typename T> octonion<T> 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<typename T> octonion<T> 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);
+
+

+ These build octonions in a way similar to the way polar builds complex numbers, + as there is no strict equivalent to polar coordinates for octonions. +

+

+ spherical is a simple transposition + of polar, it takes as inputs + a (positive) magnitude and a point on the hypersphere, given by three angles. + The first of these, theta has a natural range of -pi + to +pi, and the other two have natural ranges of -pi/2 to +pi/2 (as is the + case with the usual spherical coordinates in R3). + Due to the many symmetries and periodicities, nothing untoward happens if + the magnitude is negative or the angles are outside their natural ranges. + The expected degeneracies (a magnitude of zero ignores the angles settings...) + do happen however. +

+

+ cylindrical is likewise a + simple transposition of the usual cylindrical coordinates in R3, which in turn is another derivative of + planar polar coordinates. The first two inputs are the polar coordinates + of the first C component + of the octonion. The third and fourth inputs are placed into the third and + fourth R components + of the octonion, respectively. +

+

+ multipolar is yet another + simple generalization of polar coordinates. This time, both C components of the octonion are given + in polar coordinates. +

+

+ In this version of our implementation of octonions, there is no analogue + of the complex value operation arg as the situation is somewhat more complicated. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/octonion_member_functions.html b/doc/octonion/html/boost_octonions/octonions/octonion_member_functions.html new file mode 100644 index 000000000..b8de8d6b8 --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/octonion_member_functions.html @@ -0,0 +1,269 @@ + + + +Octonion Member Functions + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ + Constructors +

+

+ Template version: +

+
+explicit  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  octonion(::std::complex<T> const & z0, ::std::complex<T> const & z1 = ::std::complex<T>(), ::std::complex<T> const & z2 = ::std::complex<T>(), ::std::complex<T> const & z3 = ::std::complex<T>());
+explicit  octonion(::boost::math::quaternion<T> const & q0, ::boost::math::quaternion<T> const & q1 = ::boost::math::quaternion<T>());
+template<typename X> 
+explicit octonion(octonion<X> const & a_recopier);
+
+

+ Float specialization version: +

+
+explicit  octonion(float const & requested_a = 0.0f, float const & requested_b = 0.0f, float const & requested_c = 0.0f, float const & requested_d = 0.0f, float const & requested_e = 0.0f, float const & requested_f = 0.0f, float const & requested_g = 0.0f, float const & requested_h = 0.0f);
+explicit  octonion(::std::complex<float> const & z0, ::std::complex<float> const & z1 = ::std::complex<float>(), ::std::complex<float> const & z2 = ::std::complex<float>(), ::std::complex<float> const & z3 = ::std::complex<float>());
+explicit  octonion(::boost::math::quaternion<float> const & q0, ::boost::math::quaternion<float> const & q1 = ::boost::math::quaternion<float>());
+explicit  octonion(octonion<double> const & a_recopier); 
+explicit  octonion(octonion<long double> const & a_recopier);
+
+

+ Double specialization version: +

+
+explicit  octonion(double const & requested_a = 0.0, double const & requested_b = 0.0, double const & requested_c = 0.0, double const & requested_d = 0.0, double const & requested_e = 0.0, double const & requested_f = 0.0, double const & requested_g = 0.0, double const & requested_h = 0.0);
+explicit  octonion(::std::complex<double> const & z0, ::std::complex<double> const & z1 = ::std::complex<double>(), ::std::complex<double> const & z2 = ::std::complex<double>(), ::std::complex<double> const & z3 = ::std::complex<double>());
+explicit  octonion(::boost::math::quaternion<double> const & q0, ::boost::math::quaternion<double> const & q1 = ::boost::math::quaternion<double>());
+explicit  octonion(octonion<float> const & a_recopier);
+explicit  octonion(octonion<long double> const & a_recopier);
+
+

+ Long double specialization version: +

+
+explicit  octonion(long double const & requested_a = 0.0L, long double const & requested_b = 0.0L, long double const & requested_c = 0.0L, long double const & requested_d = 0.0L, long double const & requested_e = 0.0L, long double const & requested_f = 0.0L, long double const & requested_g = 0.0L, long double const & requested_h = 0.0L);
+explicit  octonion( ::std::complex<long double> const & z0, ::std::complex<long double> const & z1 = ::std::complex<long double>(), ::std::complex<long double> const & z2 = ::std::complex<long double>(), ::std::complex<long double> const & z3 = ::std::complex<long double>());
+explicit  octonion(::boost::math::quaternion<long double> const & q0, ::boost::math::quaternion<long double> const & q1 = ::boost::math::quaternion<long double>());
+explicit  octonion(octonion<float> const & a_recopier);
+explicit  octonion(octonion<double> const & a_recopier);
+
+

+ A default constructor is provided for each form, which initializes each component + to the default values for their type (i.e. zero for floating numbers). This + constructor can also accept one to eight base type arguments. A constructor + is also provided to build octonions from one to four complex numbers sharing + the same base type, and another taking one or two quaternions sharing the + same base type. The unspecialized template also sports a templarized copy + constructor, while the specialized forms have copy constructors from the + other two specializations, which are explicit when a risk of precision loss + exists. For the unspecialized form, the base type's constructors must not + throw. +

+

+ Destructors and untemplated copy constructors (from the same type) are provided + by the compiler. Converting copy constructors make use of a templated helper + function in a "detail" subnamespace. +

+

+ + Other + member functions +

+
+ + Real + and Unreal Parts +
+
+T            real()   const;
+octonion<T>  unreal() const;
+
+

+ Like complex number, octonions do have a meaningful notion of "real + part", but unlike them there is no meaningful notion of "imaginary + part". Instead there is an "unreal part" which itself is a + octonion, and usually nothing simpler (as opposed to the complex number case). + These are returned by the first two functions. +

+
+ + Individual + Real Components +
+
+T   R_component_1() const;
+T   R_component_2() const;
+T   R_component_3() const;
+T   R_component_4() const;
+T   R_component_5() const;
+T   R_component_6() const;
+T   R_component_7() const;
+T   R_component_8() const;
+
+

+ A octonion having eight real components, these are returned by these eight + functions. Hence real and R_component_1 return the same value. +

+
+ + Individual + Complex Components +
+
+::std::complex<T> C_component_1() const;
+::std::complex<T> C_component_2() const;
+::std::complex<T> C_component_3() const;
+::std::complex<T> C_component_4() const;
+
+

+ A octonion likewise has four complex components. Actually, octonions are + indeed a (left) vector field over the complexes, but beware, as for any octonion + o = α + βi + γj + δk + εe' + ζi' + ηj' + θk' we also have o + = (α + βi) + (γ + δi)j + (ε + ζi)e' + (η - θi)j' (note the minus + sign in the last factor). What the C_component_n functions return, however, + are the complexes which could be used to build the octonion using the constructor, + and not the components of the octonion on + the basis (1, j, e', j'). +

+
+ + Individual + Quaternion Components +
+
+::boost::math::quaternion<T> H_component_1() const;
+::boost::math::quaternion<T> H_component_2() const;
+
+

+ Likewise, for any octonion o = α + βi + γj + δk + εe' + ζi' + ηj' + θk' we + also have o = (α + βi + γj + δk) + (ε + ζi + ηj - θj)e', though there is + no meaningful vector-space-like structure based on the quaternions. What + the H_component_n functions return are the quaternions which could be used + to build the octonion using the constructor. +

+

+ + Octonion + Member Operators +

+
+ + Assignment + Operators +
+
+octonion<T> & operator = (octonion<T> const & a_affecter);
+template<typename X> 
+octonion<T> & operator = (octonion<X> const & a_affecter);
+octonion<T> & operator = (T const & a_affecter);
+octonion<T> & operator = (::std::complex<T> const & a_affecter);
+octonion<T> & operator = (::boost::math::quaternion<T> const & a_affecter);
+
+

+ These perform the expected assignment, with type modification if necessary + (for instance, assigning from a base type will set the real part to that + value, and all other components to zero). For the unspecialized form, the + base type's assignment operators must not throw. +

+
+ + Other + Member Operators +
+
+octonion<T> & operator += (T const & rhs)
+octonion<T> & operator += (::std::complex<T> const & rhs);
+octonion<T> & operator += (::boost::math::quaternion<T> const & rhs);
+template<typename X> 
+octonion<T> & operator += (octonion<X> const & rhs);
+
+

+ These perform the mathematical operation (*this)+rhs + and store the result in *this. + The unspecialized form has exception guards, which the specialized forms + do not, so as to insure exception safety. For the unspecialized form, the + base type's assignment operators must not throw. +

+
+octonion<T> & operator -= (T const & rhs)
+octonion<T> & operator -= (::std::complex<T> const & rhs);
+octonion<T> & operator -= (::boost::math::quaternion<T> const & rhs);
+template<typename X> 
+octonion<T> & operator -= (octonion<X> const & rhs);
+
+

+ These perform the mathematical operation (*this)-rhs + and store the result in *this. + The unspecialized form has exception guards, which the specialized forms + do not, so as to insure exception safety. For the unspecialized form, the + base type's assignment operators must not throw. +

+
+octonion<T> & operator *= (T const & rhs)
+octonion<T> & operator *= (::std::complex<T> const & rhs);
+octonion<T> & operator *= (::boost::math::quaternion<T> const & rhs);
+template<typename X> 
+octonion<T> & operator *= (octonion<X> const & rhs);
+
+

+ These perform the mathematical operation (*this)*rhs + in this order (order is important as multiplication is not commutative for + octonions) and store the result in *this. The unspecialized form has exception + guards, which the specialized forms do not, so as to insure exception safety. + For the unspecialized form, the base type's assignment operators must not + throw. Also, for clarity's sake, you should always group the factors in a + multiplication by groups of two, as the multiplication is not even associative + on the octonions (though there are of course cases where this does not matter, + it usually does). +

+
+octonion<T> & operator /= (T const & rhs)
+octonion<T> & operator /= (::std::complex<T> const & rhs);
+octonion<T> & operator /= (::boost::math::quaternion<T> const & rhs);
+template<typename X> 
+octonion<T> & operator /= (octonion<X> const & rhs);
+
+

+ These perform the mathematical operation (*this)*inverse_of(rhs) + in this order (order is important as multiplication is not commutative for + octonions) and store the result in *this. The unspecialized form has exception + guards, which the specialized forms do not, so as to insure exception safety. + For the unspecialized form, the base type's assignment operators must not + throw. As for the multiplication, remember to group any two factors using + parenthesis. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/octonion_member_typedefs.html b/doc/octonion/html/boost_octonions/octonions/octonion_member_typedefs.html new file mode 100644 index 000000000..00b271e3d --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/octonion_member_typedefs.html @@ -0,0 +1,70 @@ + + + +Octonion Member Typedefs + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ value_type +

+

+ Template version: +

+
+typedef T value_type;
+
+

+ Float specialization version: +

+
+typedef float value_type;
+
+

+ Double specialization version: +

+
+typedef double value_type;
+
+

+ Long double specialization version: +

+
+typedef long double value_type;
+
+

+ These provide easy acces to the type the template is built upon. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/octonion_specializations.html b/doc/octonion/html/boost_octonions/octonions/octonion_specializations.html new file mode 100644 index 000000000..54ab02bff --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/octonion_specializations.html @@ -0,0 +1,243 @@ + + + +Octonion Specializations + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+namespace boost{ namespace math{
+
+template<>
+class octonion<float>
+{
+public:
+   typedef float value_type;
+
+   explicit  octonion(float const & requested_a = 0.0f, float const & requested_b = 0.0f, float const & requested_c = 0.0f, float const & requested_d = 0.0f, float const & requested_e = 0.0f, float const & requested_f = 0.0f, float const & requested_g = 0.0f, float const & requested_h = 0.0f);
+   explicit  octonion(::std::complex<float> const & z0, ::std::complex<float> const & z1 = ::std::complex<float>(), ::std::complex<float> const & z2 = ::std::complex<float>(), ::std::complex<float> const & z3 = ::std::complex<float>());
+   explicit  octonion(::boost::math::quaternion<float> const & q0, ::boost::math::quaternion<float> const & q1 = ::boost::math::quaternion<float>());
+   explicit  octonion(octonion<double> const & a_recopier);
+   explicit  octonion(octonion<long double> const & a_recopier);
+
+   float                             real() const;
+   octonion<float>                   unreal() const;
+
+   float                             R_component_1() const;
+   float                             R_component_2() const;
+   float                             R_component_3() const;
+   float                             R_component_4() const;
+   float                             R_component_5() const;
+   float                             R_component_6() const;
+   float                             R_component_7() const;
+   float                             R_component_8() const;
+
+   ::std::complex<float>             C_component_1() const;
+   ::std::complex<float>             C_component_2() const;
+   ::std::complex<float>             C_component_3() const;
+   ::std::complex<float>             C_component_4() const;
+
+   ::boost::math::quaternion<float>  H_component_1() const;
+   ::boost::math::quaternion<float>  H_component_2() const;
+
+   octonion<float> & operator = (octonion<float> const  & a_affecter);
+   template<typename X> 
+   octonion<float> & operator = (octonion<X> const  & a_affecter);
+   octonion<float> & operator = (float const  & a_affecter);
+   octonion<float> & operator = (::std::complex<float> const & a_affecter);
+   octonion<float> & operator = (::boost::math::quaternion<float> const & a_affecter);
+
+   octonion<float> & operator += (float const & rhs);
+   octonion<float> & operator += (::std::complex<float> const & rhs);
+   octonion<float> & operator += (::boost::math::quaternion<float> const & rhs);
+   template<typename X> 
+   octonion<float> & operator += (octonion<X> const & rhs);
+
+   octonion<float> & operator -= (float const & rhs);
+   octonion<float> & operator -= (::std::complex<float> const & rhs);
+   octonion<float> & operator -= (::boost::math::quaternion<float> const & rhs);
+   template<typename X> 
+   octonion<float> & operator -= (octonion<X> const & rhs);
+
+   octonion<float> & operator *= (float const & rhs);
+   octonion<float> & operator *= (::std::complex<float> const & rhs);
+   octonion<float> & operator *= (::boost::math::quaternion<float> const & rhs);
+   template<typename X> 
+   octonion<float> & operator *= (octonion<X> const & rhs);
+
+   octonion<float> & operator /= (float const & rhs);
+   octonion<float> & operator /= (::std::complex<float> const & rhs);
+   octonion<float> & operator /= (::boost::math::quaternion<float> const & rhs);
+   template<typename X> 
+   octonion<float> & operator /= (octonion<X> const & rhs);
+};
+
+

+

+
+template<>
+class octonion<double>
+{
+public:
+   typedef double value_type;
+
+   explicit  octonion(double const & requested_a = 0.0, double const & requested_b = 0.0, double const & requested_c = 0.0, double const & requested_d = 0.0, double const & requested_e = 0.0, double const & requested_f = 0.0, double const & requested_g = 0.0, double const & requested_h = 0.0);
+   explicit  octonion(::std::complex<double> const & z0, ::std::complex<double> const & z1 = ::std::complex<double>(), ::std::complex<double> const & z2 = ::std::complex<double>(), ::std::complex<double> const & z3 = ::std::complex<double>());
+   explicit  octonion(::boost::math::quaternion<double> const & q0, ::boost::math::quaternion<double> const & q1 = ::boost::math::quaternion<double>());
+   explicit  octonion(octonion<float> const & a_recopier);
+   explicit  octonion(octonion<long double> const & a_recopier);
+
+   double                             real() const;
+   octonion<double>                   unreal() const;
+
+   double                             R_component_1() const;
+   double                             R_component_2() const;
+   double                             R_component_3() const;
+   double                             R_component_4() const;
+   double                             R_component_5() const;
+   double                             R_component_6() const;
+   double                             R_component_7() const;
+   double                             R_component_8() const;
+
+   ::std::complex<double>             C_component_1() const;
+   ::std::complex<double>             C_component_2() const;
+   ::std::complex<double>             C_component_3() const;
+   ::std::complex<double>             C_component_4() const;
+
+   ::boost::math::quaternion<double>  H_component_1() const;
+   ::boost::math::quaternion<double>  H_component_2() const;
+
+   octonion<double> & operator = (octonion<double> const  & a_affecter);
+   template<typename X> 
+   octonion<double> & operator = (octonion<X> const  & a_affecter);
+   octonion<double> & operator = (double const  & a_affecter);
+   octonion<double> & operator = (::std::complex<double> const & a_affecter);
+   octonion<double> & operator = (::boost::math::quaternion<double> const & a_affecter);
+
+   octonion<double> & operator += (double const & rhs);
+   octonion<double> & operator += (::std::complex<double> const & rhs);
+   octonion<double> & operator += (::boost::math::quaternion<double> const & rhs);
+   template<typename X> 
+   octonion<double> & operator += (octonion<X> const & rhs);
+
+   octonion<double> & operator -= (double const & rhs);
+   octonion<double> & operator -= (::std::complex<double> const & rhs);
+   octonion<double> & operator -= (::boost::math::quaternion<double> const & rhs);
+   template<typename X> 
+   octonion<double> & operator -= (octonion<X> const & rhs);
+
+   octonion<double> & operator *= (double const & rhs);
+   octonion<double> & operator *= (::std::complex<double> const & rhs);
+   octonion<double> & operator *= (::boost::math::quaternion<double> const & rhs);
+   template<typename X> 
+   octonion<double> & operator *= (octonion<X> const & rhs);
+
+   octonion<double> & operator /= (double const & rhs);
+   octonion<double> & operator /= (::std::complex<double> const & rhs);
+   octonion<double> & operator /= (::boost::math::quaternion<double> const & rhs);
+   template<typename X> 
+   octonion<double> & operator /= (octonion<X> const & rhs);
+};
+
+

+

+
+template<>
+class octonion<long double>
+{
+public:
+   typedef long double value_type;
+
+   explicit   octonion(long double const & requested_a = 0.0L, long double const & requested_b = 0.0L, long double const & requested_c = 0.0L, long double const & requested_d = 0.0L, long double const & requested_e = 0.0L, long double const & requested_f = 0.0L, long double const & requested_g = 0.0L, long double const & requested_h = 0.0L);
+   explicit   octonion( ::std::complex<long double> const & z0, ::std::complex<long double> const & z1 = ::std::complex<long double>(), ::std::complex<long double> const & z2 = ::std::complex<long double>(), ::std::complex<long double> const & z3 = ::std::complex<long double>());
+   explicit   octonion( ::boost::math::quaternion<long double> const & q0, ::boost::math::quaternion<long double> const & z1 = ::boost::math::quaternion<long double>());
+   explicit   octonion(octonion<float> const & a_recopier);
+   explicit   octonion(octonion<double> const & a_recopier);
+
+   long double                             real() const;
+   octonion<long double>                   unreal() const;
+
+   long double                             R_component_1() const;
+   long double                             R_component_2() const;
+   long double                             R_component_3() const;
+   long double                             R_component_4() const;
+   long double                             R_component_5() const;
+   long double                             R_component_6() const;
+   long double                             R_component_7() const;
+   long double                             R_component_8() const;
+
+   ::std::complex<long double>             C_component_1() const;
+   ::std::complex<long double>             C_component_2() const;
+   ::std::complex<long double>             C_component_3() const;
+   ::std::complex<long double>             C_component_4() const;
+
+   ::boost::math::quaternion<long double>  H_component_1() const;
+   ::boost::math::quaternion<long double>  H_component_2() const;
+
+   octonion<long double> & operator = (octonion<long double> const  & a_affecter);
+   template<typename X> 
+   octonion<long double> & operator = (octonion<X> const  & a_affecter);
+   octonion<long double> & operator = (long double const  & a_affecter);
+   octonion<long double> & operator = (::std::complex<long double> const & a_affecter);
+   octonion<long double> & operator = (::boost::math::quaternion<long double> const & a_affecter);
+
+   octonion<long double> & operator += (long double const & rhs);
+   octonion<long double> & operator += (::std::complex<long double> const & rhs);
+   octonion<long double> & operator += (::boost::math::quaternion<long double> const & rhs);
+   template<typename X> 
+   octonion<long double> & operator += (octonion<X> const & rhs);
+
+   octonion<long double> & operator -= (long double const & rhs);
+   octonion<long double> & operator -= (::std::complex<long double> const & rhs);
+   octonion<long double> & operator -= (::boost::math::quaternion<long double> const & rhs);
+   template<typename X> 
+   octonion<long double> & operator -= (octonion<X> const & rhs);
+
+   octonion<long double> & operator *= (long double const & rhs);
+   octonion<long double> & operator *= (::std::complex<long double> const & rhs);
+   octonion<long double> & operator *= (::boost::math::quaternion<long double> const & rhs);
+   template<typename X> 
+   octonion<long double> & operator *= (octonion<X> const & rhs);
+
+   octonion<long double> & operator /= (long double const & rhs);
+   octonion<long double> & operator /= (::std::complex<long double> const & rhs);
+   octonion<long double> & operator /= (::boost::math::quaternion<long double> const & rhs);
+   template<typename X> 
+   octonion<long double> & operator /= (octonion<X> const & rhs);
+};
+
+} } // namespaces
+
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/octonion_value_operations.html b/doc/octonion/html/boost_octonions/octonions/octonion_value_operations.html new file mode 100644 index 000000000..cf4f92de9 --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/octonion_value_operations.html @@ -0,0 +1,108 @@ + + + +Octonion Value Operations + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+ + Real + and Unreal +
+
+template<typename T> T  real(octonion<T> const & o);
+template<typename T> octonion<T> unreal(octonion<T> const & o);
+
+

+ These return o.real() + and o.unreal() + respectively. +

+
+ + conj +
+
+template<typename T> octonion<T> conj(octonion<T> const & o);
+
+

+ This returns the conjugate of the octonion. +

+
+ + sup +
+
+template<typename T> T   sup(octonion<T> const & o);
+
+

+ This return the sup norm (the greatest among abs(o.R_component_1())...abs(o.R_component_8())) of the octonion. +

+
+ + l1 +
+
+template<typename T> T   l1(octonion<T> const & o);
+
+

+ This return the l1 norm (abs(o.R_component_1())+...+abs(o.R_component_8())) of the octonion. +

+
+ + abs +
+
+template<typename T> T   abs(octonion<T> const & o);
+
+

+ This return the magnitude (Euclidian norm) of the octonion. +

+
+ + norm +
+
+template<typename T> T  norm(octonion<T>const  & o);
+
+

+ This return the (Cayley) norm of the octonion. The term "norm" + might be confusing, as most people associate it with the Euclidian norm (and + quadratic functionals). For this version of (the mathematical objects known + as) octonions, the Euclidian norm (also known as magnitude) is the square + root of the Cayley norm. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/octonions_transcendentals.html b/doc/octonion/html/boost_octonions/octonions/octonions_transcendentals.html new file mode 100644 index 000000000..8d462528c --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/octonions_transcendentals.html @@ -0,0 +1,153 @@ + + + +Octonions Transcendentals + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ There is no log or sqrt provided for octonions in this implementation, + and pow is likewise restricted + to integral powers of the exponent. There are several reasons to this: on + the one hand, the equivalent of analytic continuation for octonions ("branch + cuts") remains to be investigated thoroughly (by me, at any rate...), + and we wish to avoid the nonsense introduced in the standard by exponentiations + of complexes by complexes (which is well defined, but not in the standard...). + Talking of nonsense, saying that pow(0,0) is "implementation + defined" is just plain brain-dead... +

+

+ We do, however provide several transcendentals, chief among which is the + exponential. That it allows for a "closed formula" is a result + of the author (the existence and definition of the exponential, on the octonions + among others, on the other hand, is a few centuries old). Basically, any + converging power series with real coefficients which allows for a closed + formula in C can be + transposed to O. More + transcendentals of this type could be added in a further revision upon request. + It should be noted that it is these functions which force the dependency + upon the boost/math/special_functions/sinc.hpp + and the boost/math/special_functions/sinhc.hpp + headers. +

+
+ + exp +
+
+template<typename T> 
+octonion<T> exp(octonion<T> const & o);
+
+

+ Computes the exponential of the octonion. +

+
+ + cos +
+
+template<typename T> 
+octonion<T> cos(octonion<T> const & o);
+
+

+ Computes the cosine of the octonion +

+
+ + sin +
+
+template<typename T> 
+octonion<T> sin(octonion<T> const & o);
+
+

+ Computes the sine of the octonion. +

+
+ + tan +
+
+template<typename T> 
+octonion<T> tan(octonion<T> const & o);
+
+

+ Computes the tangent of the octonion. +

+
+ + cosh +
+
+template<typename T> 
+octonion<T> cosh(octonion<T> const & o);
+
+

+ Computes the hyperbolic cosine of the octonion. +

+
+ + sinh +
+
+template<typename T> 
+octonion<T> sinh(octonion<T> const & o);
+
+

+ Computes the hyperbolic sine of the octonion. +

+
+ + tanh +
+
+template<typename T> 
+octonion<T> tanh(octonion<T> const & o);
+
+

+ Computes the hyperbolic tangent of the octonion. +

+
+ + pow +
+
+template<typename T> 
+octonion<T>  pow(octonion<T> const & o, int n);
+
+

+ Computes the n-th power of the octonion q. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/overview.html b/doc/octonion/html/boost_octonions/octonions/overview.html new file mode 100644 index 000000000..1e8ae17cd --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/overview.html @@ -0,0 +1,79 @@ + + + +Overview + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ Octonions, like 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 (α,β,γ,δ,ε,ζ,η,θ), + which we can write in the form o = α + βi + γj + δk + εe' + ζi' + ηj' + θk', + 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 quaternions x, + y and z + such that x(yz) ≠ (xy)z). A way of + remembering things is by using the following multiplication table: +

+

+ octonion_blurb17 +

+

+ Octonions (and their kin) are described in far more details in this other + document (with 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). +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/synopsis.html b/doc/octonion/html/boost_octonions/octonions/synopsis.html new file mode 100644 index 000000000..fb8cc77ea --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/synopsis.html @@ -0,0 +1,135 @@ + + + +Synopsis + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+namespace boost{ namespace math{
+
+template<typename T> class octonion;
+template<>           class octonion<float>;
+template<>           class octonion<double>; 
+template<>           class octonion<long double>; 
+
+// operators
+
+template<typename T> octonion<T> operator + (T const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator + (octonion<T> const & lhs, T const & rhs);
+template<typename T> octonion<T> operator + (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator + (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> octonion<T> operator + (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator + (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> octonion<T> operator + (octonion<T> const & lhs, octonion<T> const & rhs);
+
+template<typename T> octonion<T> operator - (T const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator - (octonion<T> const & lhs, T const & rhs);
+template<typename T> octonion<T> operator - (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator - (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> octonion<T> operator - (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator - (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> octonion<T> operator - (octonion<T> const & lhs, octonion<T> const & rhs);
+
+template<typename T> octonion<T> operator * (T const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator * (octonion<T> const & lhs, T const & rhs);
+template<typename T> octonion<T> operator * (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator * (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> octonion<T> operator * (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator * (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> octonion<T> operator * (octonion<T> const & lhs, octonion<T> const & rhs);
+
+template<typename T> octonion<T> operator / (T const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator / (octonion<T> const & lhs, T const & rhs);
+template<typename T> octonion<T> operator / (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator / (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> octonion<T> operator / (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> octonion<T> operator / (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> octonion<T> operator / (octonion<T> const & lhs, octonion<T> const & rhs); 
+
+template<typename T> octonion<T> operator + (octonion<T> const & o);
+template<typename T> octonion<T> operator - (octonion<T> const & o); 
+
+template<typename T> bool operator == (T const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator == (octonion<T> const & lhs, T const & rhs);
+template<typename T> bool operator == (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator == (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> bool operator == (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator == (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> bool operator == (octonion<T> const & lhs, octonion<T> const & rhs);
+
+template<typename T> bool operator != (T const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator != (octonion<T> const & lhs, T const & rhs);
+template<typename T> bool operator != (::std::complex<T> const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator != (octonion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> bool operator != (::boost::math::quaternion<T> const & lhs, octonion<T> const & rhs);
+template<typename T> bool operator != (octonion<T> const & lhs, ::boost::math::quaternion<T> const & rhs);
+template<typename T> bool operator != (octonion<T> const & lhs, octonion<T> const & rhs); 
+
+template<typename T, typename charT, class traits>
+::std::basic_istream<charT,traits> & operator >> (::std::basic_istream<charT,traits> & is, octonion<T> & o);
+
+template<typename T, typename charT, class traits>
+::std::basic_ostream<charT,traits> & operator << (::std::basic_ostream<charT,traits> & os, octonion<T> const & o);
+
+// values
+
+template<typename T> T           real(octonion<T> const & o);
+template<typename T> octonion<T> unreal(octonion<T> const & o);
+
+template<typename T> T           sup(octonion<T> const & o);
+template<typename T> T           l1(octonion<T>const & o); 
+template<typename T> T           abs(octonion<T> const & o);
+template<typename T> T           norm(octonion<T>const  & o);
+template<typename T> octonion<T> conj(octonion<T> const & o);
+
+template<typename T> octonion<T> 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<typename T> octonion<T> 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<typename T> octonion<T> 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<typename T> octonion<T> exp(octonion<T> const & o);
+template<typename T> octonion<T> cos(octonion<T> const & o);
+template<typename T> octonion<T> sin(octonion<T> const & o);
+template<typename T> octonion<T> tan(octonion<T> const & o);
+template<typename T> octonion<T> cosh(octonion<T> const & o);
+template<typename T> octonion<T> sinh(octonion<T> const & o);
+template<typename T> octonion<T> tanh(octonion<T> const & o);
+
+template<typename T> octonion<T> pow(octonion<T> const & o, int n);
+
+}  } // namespaces
+
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/template_class_octonion.html b/doc/octonion/html/boost_octonions/octonions/template_class_octonion.html new file mode 100644 index 000000000..be9cb8da1 --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/template_class_octonion.html @@ -0,0 +1,109 @@ + + + +Template Class octonion + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+namespace boost{ namespace math {
+
+template<typename T>
+class octonion
+{
+public:
+   typedef T value_type;
+
+   explicit  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  octonion(::std::complex<T> const & z0, ::std::complex<T> const & z1 = ::std::complex<T>(), ::std::complex<T> const & z2 = ::std::complex<T>(), ::std::complex<T> const & z3 = ::std::complex<T>());
+   explicit  octonion(::boost::math::quaternion<T> const & q0, ::boost::math::quaternion<T> const & q1 = ::boost::math::quaternion<T>());
+   template<typename X> 
+   explicit  octonion(octonion<X> const & a_recopier);
+
+   T                             real() const;
+   octonion<T>                   unreal() const;
+
+   T                             R_component_1() const;
+   T                             R_component_2() const;
+   T                             R_component_3() const;
+   T                             R_component_4() const;
+   T                             R_component_5() const;
+   T                             R_component_6() const;
+   T                             R_component_7() const;
+   T                             R_component_8() const;
+
+   ::std::complex<T>             C_component_1() const;
+   ::std::complex<T>             C_component_2() const;
+   ::std::complex<T>             C_component_3() const;
+   ::std::complex<T>             C_component_4() const;
+
+   ::boost::math::quaternion<T>  H_component_1() const;
+   ::boost::math::quaternion<T>  H_component_2() const;
+
+   octonion<T> & operator = (octonion<T> const  & a_affecter);
+   template<typename X> 
+   octonion<T> & operator = (octonion<X> const  & a_affecter);
+   octonion<T> & operator = (T const  & a_affecter);
+   octonion<T> & operator = (::std::complex<T> const & a_affecter);
+   octonion<T> & operator = (::boost::math::quaternion<T> const & a_affecter);
+
+   octonion<T> & operator += (T const & rhs);
+   octonion<T> & operator += (::std::complex<T> const & rhs);
+   octonion<T> & operator += (::boost::math::quaternion<T> const & rhs);
+   template<typename X> 
+   octonion<T> & operator += (octonion<X> const & rhs);
+
+   octonion<T> & operator -= (T const & rhs);
+   octonion<T> & operator -= (::std::complex<T> const & rhs);
+   octonion<T> & operator -= (::boost::math::quaternion<T> const & rhs);
+   template<typename X> 
+   octonion<T> & operator -= (octonion<X> const & rhs);
+
+   octonion<T> & operator *= (T const & rhs);
+   octonion<T> & operator *= (::std::complex<T> const & rhs);
+   octonion<T> & operator *= (::boost::math::quaternion<T> const & rhs);
+   template<typename X> 
+   octonion<T> & operator *= (octonion<X> const & rhs);
+
+   octonion<T> & operator /= (T const & rhs);
+   octonion<T> & operator /= (::std::complex<T> const & rhs);
+   octonion<T> & operator /= (::boost::math::quaternion<T> const & rhs);
+   template<typename X> 
+   octonion<T> & operator /= (octonion<X> const & rhs);
+};
+
+} } // namespaces
+
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/test_program.html b/doc/octonion/html/boost_octonions/octonions/test_program.html new file mode 100644 index 000000000..911f4d4a4 --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/test_program.html @@ -0,0 +1,54 @@ + + + +Test Program + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ The octonion_test.cpp + test program tests octonions specialisations for float, double and long double + (sample output). +

+

+ If you define the symbol BOOST_OCTONION_TEST_VERBOSE, you will get additional + output (verbose output); + this will only be helpfull if you enable message output at the same time, + of course (by uncommenting the relevant line in the test or by adding --log_level=messages + to your command line,...). In that case, and if you are running interactively, + you may in addition define the symbol BOOST_INTERACTIVE_TEST_INPUT_ITERATOR + to interactively test the input operator with input of your choice from the + standard input (instead of hard-coding it in the test). +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/octonion/html/boost_octonions/octonions/to_do.html b/doc/octonion/html/boost_octonions/octonions/to_do.html new file mode 100644 index 000000000..23fa7528c --- /dev/null +++ b/doc/octonion/html/boost_octonions/octonions/to_do.html @@ -0,0 +1,49 @@ + + + +To Do + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHome +
+
+

+To Do +

+
    +
  • + Improve testing. +
  • +
  • + Rewrite input operatore using Spirit (creates a dependency). +
  • +
  • + Put in place an Expression Template mechanism (perhaps borrowing from uBlas). +
  • +
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHome +
+ + diff --git a/doc/octonion/html/index.html b/doc/octonion/html/index.html new file mode 100644 index 000000000..334eb52af --- /dev/null +++ b/doc/octonion/html/index.html @@ -0,0 +1,78 @@ + + + +Boost.Octonions + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
Next
+
+
+
+

+Boost.Octonions

+

+Hubert Holin +

+
+
+

+ Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +

+
+
+
+
+ +
+ + + +

Last revised: December 29, 2006 at 11:08:32 +0000

+
+
Next
+ + diff --git a/doc/octonion/math-octonion.qbk b/doc/octonion/math-octonion.qbk new file mode 100644 index 000000000..36e98f0b4 --- /dev/null +++ b/doc/octonion/math-octonion.qbk @@ -0,0 +1,1005 @@ +[article Boost.Octonions + [quickbook 1.3] + [copyright 2001-2003 Hubert Holin] + [purpose Octonions] + [license + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + [@http://www.boost.org/LICENSE_1_0.txt http://www.boost.org/LICENSE_1_0.txt]) + ] + [authors [Holin, Hubert]] + [category math] + [last-revision $Date: 2006-12-29 11:08:32 +0000 (Fri, 29 Dec 2006) $] +] + +[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]]] + +[def __asinh [link boost_quaternions.math_special_functions.asinh asinh]] +[def __acosh [link boost_quaternions.math_special_functions.acosh acosh]] +[def __atanh [link boost_quaternions.math_special_functions.atanh atanh]] +[def __sinc_pi [link boost_quaternions.math_special_functions.sinc_pi sinc_pi]] +[def __sinhc_pi [link boost_quaternions.math_special_functions.sinhc_pi sinhc_pi]] + +[def __log1p [link boost_quaternions.math_special_functions.log1p log1p]] +[def __expm1 [link boost_quaternions.math_special_functions.expm1 expm1]] +[def __hypot [link boost_quaternions.math_special_functions.hypot hypot]] + +[section Octonions] + +[section Overview] + +Octonions, like [@../../quaternions/html/index.html 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 quaternions ['[^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 Header File] + +The interface and implementation are both supplied by the header file +[@../../../../../boost/math/octonion.hpp octonion.hpp]. + +[endsect] + +[section Synopsis] + + namespace boost{ namespace math{ + + template class ``[link boost_octonions.octonions.template_class_octonion octonion]``; + template<> class ``[link boost_octonions.octonions.octonion_specializations octonion]``; + template<> class ``[link boost_octonions.octonion_double octonion]``; + template<> class ``[link boost_octonions.octonion_long_double octonion]``; + + // operators + + template octonion ``[link boost_octonions.octonions.non_mem.binary_addition_operators operator +]`` (T const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_addition_operators operator +]`` (octonion const & lhs, T const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_addition_operators operator +]`` (::std::complex const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_addition_operators operator +]`` (octonion const & lhs, ::std::complex const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_addition_operators operator +]`` (::boost::math::quaternion const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_addition_operators operator +]`` (octonion const & lhs, ::boost::math::quaternion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_addition_operators operator +]`` (octonion const & lhs, octonion const & rhs); + + template octonion ``[link boost_octonions.octonions.non_mem.binary_subtraction_operators operator -]`` (T const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_subtraction_operators operator -]`` (octonion const & lhs, T const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_subtraction_operators operator -]`` (::std::complex const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_subtraction_operators operator -]`` (octonion const & lhs, ::std::complex const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_subtraction_operators operator -]`` (::boost::math::quaternion const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_subtraction_operators operator -]`` (octonion const & lhs, ::boost::math::quaternion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_subtraction_operators operator -]`` (octonion const & lhs, octonion const & rhs); + + template octonion ``[link boost_octonions.octonions.non_mem.binary_multiplication_operators operator *]`` (T const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_multiplication_operators operator *]`` (octonion const & lhs, T const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_multiplication_operators operator *]`` (::std::complex const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_multiplication_operators operator *]`` (octonion const & lhs, ::std::complex const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_multiplication_operators operator *]`` (::boost::math::quaternion const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_multiplication_operators operator *]`` (octonion const & lhs, ::boost::math::quaternion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_multiplication_operators operator *]`` (octonion const & lhs, octonion const & rhs); + + template octonion ``[link boost_octonions.octonions.non_mem.binary_division_operators operator /]`` (T const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_division_operators operator /]`` (octonion const & lhs, T const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_division_operators operator /]`` (::std::complex const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_division_operators operator /]`` (octonion const & lhs, ::std::complex const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_division_operators operator /]`` (::boost::math::quaternion const & lhs, octonion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_division_operators operator /]`` (octonion const & lhs, ::boost::math::quaternion const & rhs); + template octonion ``[link boost_octonions.octonions.non_mem.binary_division_operators operator /]`` (octonion const & lhs, octonion const & rhs); + + template octonion ``[link boost_octonions.octonions.non_mem.unary_plus_and_minus_operators operator +]`` (octonion const & o); + template octonion ``[link boost_octonions.octonions.non_mem.unary_plus_and_minus_operators operator -]`` (octonion const & o); + + template bool ``[link boost_octonions.octonions.non_mem.binary_equality_operators operator ==]`` (T const & lhs, octonion const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_equality_operators operator ==]`` (octonion const & lhs, T const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_equality_operators operator ==]`` (::std::complex const & lhs, octonion const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_equality_operators operator ==]`` (octonion const & lhs, ::std::complex const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_equality_operators operator ==]`` (::boost::math::quaternion const & lhs, octonion const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_equality_operators operator ==]`` (octonion const & lhs, ::boost::math::quaternion const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_equality_operators operator ==]`` (octonion const & lhs, octonion const & rhs); + + template bool ``[link boost_octonions.octonions.non_mem.binary_inequality_operators operator !=]`` (T const & lhs, octonion const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_inequality_operators operator !=]`` (octonion const & lhs, T const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_inequality_operators operator !=]`` (::std::complex const & lhs, octonion const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_inequality_operators operator !=]`` (octonion const & lhs, ::std::complex const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_inequality_operators operator !=]`` (::boost::math::quaternion const & lhs, octonion const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_inequality_operators operator !=]`` (octonion const & lhs, ::boost::math::quaternion const & rhs); + template bool ``[link boost_octonions.octonions.non_mem.binary_inequality_operators operator !=]`` (octonion const & lhs, octonion const & rhs); + + template + ::std::basic_istream & ``[link boost_octonions.octonions.non_mem.stream_extractor operator >>]`` (::std::basic_istream & is, octonion & o); + + template + ::std::basic_ostream & ``[link boost_octonions.octonions.non_mem.stream_inserter operator <<]`` (::std::basic_ostream & os, octonion const & o); + + // values + + template T ``[link boost_octonions.octonions.octonion_value_operations.real_and_unreal real]``(octonion const & o); + template octonion ``[link boost_octonions.octonions.octonion_value_operations.real_and_unreal unreal]``(octonion const & o); + + template T ``[link boost_octonions.octonions.octonion_value_operations.sup sup]``(octonion const & o); + template T ``[link boost_octonions.octonions.octonion_value_operations.l1 l1]``(octonionconst & o); + template T ``[link boost_octonions.octonions.octonion_value_operations.abs abs]``(octonion const & o); + template T ``[link boost_octonions.octonions.octonion_value_operations.norm norm]``(octonionconst & o); + template octonion ``[link boost_octonions.octonions.octonion_value_operations.conj conj]``(octonion const & o); + + template octonion ``[link boost_octonions.octonions.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 boost_octonions.octonions.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 boost_octonions.octonions.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 boost_octonions.octonions.octonions_transcendentals.exp exp]``(octonion const & o); + template octonion ``[link boost_octonions.octonions.octonions_transcendentals.cos cos]``(octonion const & o); + template octonion ``[link boost_octonions.octonions.octonions_transcendentals.sin sin]``(octonion const & o); + template octonion ``[link boost_octonions.octonions.octonions_transcendentals.tan tan]``(octonion const & o); + template octonion ``[link boost_octonions.octonions.octonions_transcendentals.cosh cosh]``(octonion const & o); + template octonion ``[link boost_octonions.octonions.octonions_transcendentals.sinh sinh]``(octonion const & o); + template octonion ``[link boost_octonions.octonions.octonions_transcendentals.tanh tanh]``(octonion const & o); + + template octonion ``[link boost_octonions.octonions.octonions_transcendentals.pow pow]``(octonion const & o, int n); + + } } // namespaces + +[endsect] + +[section Template Class octonion] + + namespace boost{ namespace math { + + template + class octonion + { + public: + typedef T value_type; + + explicit ``[link boost_octonions.octonions.octonion_member_functions.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 boost_octonions.octonions.octonion_member_functions.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 boost_octonions.octonions.octonion_member_functions.constructors octonion]``(::boost::math::quaternion const & q0, ::boost::math::quaternion const & q1 = ::boost::math::quaternion()); + template + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(octonion const & a_recopier); + + T ``[link boost_octonions.octonions.octonion_member_functions.real_and_unreal_parts real]``() const; + octonion ``[link boost_octonions.octonions.octonion_member_functions.real_and_unreal_parts unreal]``() const; + + T ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_1]``() const; + T ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_2]``() const; + T ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_3]``() const; + T ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_4]``() const; + T ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_5]``() const; + T ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_6]``() const; + T ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_7]``() const; + T ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_8]``() const; + + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_1]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_2]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_3]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_4]``() const; + + ::boost::math::quaternion ``[link boost_octonions.octonions.octonion_member_functions.individual_quaternion_components H_component_1]``() const; + ::boost::math::quaternion ``[link boost_octonions.octonions.octonion_member_functions.individual_quaternion_components H_component_2]``() const; + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (octonion const & a_affecter); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (octonion const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (T const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (::std::complex const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (::boost::math::quaternion const & a_affecter); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (T const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (T const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (T const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (T const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (octonion const & rhs); + }; + + } } // namespaces + +[endsect] + +[section Octonion Specializations] + + namespace boost{ namespace math{ + + template<> + class octonion + { + public: + typedef float value_type; + + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(float const & requested_a = 0.0f, float const & requested_b = 0.0f, float const & requested_c = 0.0f, float const & requested_d = 0.0f, float const & requested_e = 0.0f, float const & requested_f = 0.0f, float const & requested_g = 0.0f, float const & requested_h = 0.0f); + explicit ``[link boost_octonions.octonions.octonion_member_functions.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 boost_octonions.octonions.octonion_member_functions.constructors octonion]``(::boost::math::quaternion const & q0, ::boost::math::quaternion const & q1 = ::boost::math::quaternion()); + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(octonion const & a_recopier); + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(octonion const & a_recopier); + + float ``[link boost_octonions.octonions.octonion_member_functions.real_and_unreal_parts real]``() const; + octonion ``[link boost_octonions.octonions.octonion_member_functions.real_and_unreal_parts unreal]``() const; + + float ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_1]``() const; + float ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_2]``() const; + float ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_3]``() const; + float ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_4]``() const; + float ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_5]``() const; + float ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_6]``() const; + float ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_7]``() const; + float ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_8]``() const; + + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_1]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_2]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_3]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_4]``() const; + + ::boost::math::quaternion ``[link boost_octonions.octonions.octonion_member_functions.individual_quaternion_components H_component_1]``() const; + ::boost::math::quaternion ``[link boost_octonions.octonions.octonion_member_functions.individual_quaternion_components H_component_2]``() const; + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (octonion const & a_affecter); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (octonion const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (float const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (::std::complex const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (::boost::math::quaternion const & a_affecter); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (float const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (float const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (float const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (float const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (octonion const & rhs); + }; + +[#boost_octonions.octonion_double] + + template<> + class octonion + { + public: + typedef double value_type; + + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(double const & requested_a = 0.0, double const & requested_b = 0.0, double const & requested_c = 0.0, double const & requested_d = 0.0, double const & requested_e = 0.0, double const & requested_f = 0.0, double const & requested_g = 0.0, double const & requested_h = 0.0); + explicit ``[link boost_octonions.octonions.octonion_member_functions.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 boost_octonions.octonions.octonion_member_functions.constructors octonion]``(::boost::math::quaternion const & q0, ::boost::math::quaternion const & q1 = ::boost::math::quaternion()); + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(octonion const & a_recopier); + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(octonion const & a_recopier); + + double ``[link boost_octonions.octonions.octonion_member_functions.real_and_unreal_parts real]``() const; + octonion ``[link boost_octonions.octonions.octonion_member_functions.real_and_unreal_parts unreal]``() const; + + double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_1]``() const; + double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_2]``() const; + double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_3]``() const; + double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_4]``() const; + double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_5]``() const; + double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_6]``() const; + double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_7]``() const; + double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_8]``() const; + + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_1]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_2]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_3]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_4]``() const; + + ::boost::math::quaternion ``[link boost_octonions.octonions.octonion_member_functions.individual_quaternion_components H_component_1]``() const; + ::boost::math::quaternion ``[link boost_octonions.octonions.octonion_member_functions.individual_quaternion_components H_component_2]``() const; + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (octonion const & a_affecter); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (octonion const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (double const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (::std::complex const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (::boost::math::quaternion const & a_affecter); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (double const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (double const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (double const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (double const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (octonion const & rhs); + }; + +[#boost_octonions.octonion_long_double] + + template<> + class octonion + { + public: + typedef long double value_type; + + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(long double const & requested_a = 0.0L, long double const & requested_b = 0.0L, long double const & requested_c = 0.0L, long double const & requested_d = 0.0L, long double const & requested_e = 0.0L, long double const & requested_f = 0.0L, long double const & requested_g = 0.0L, long double const & requested_h = 0.0L); + explicit ``[link boost_octonions.octonions.octonion_member_functions.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 boost_octonions.octonions.octonion_member_functions.constructors octonion]``( ::boost::math::quaternion const & q0, ::boost::math::quaternion const & z1 = ::boost::math::quaternion()); + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(octonion const & a_recopier); + explicit ``[link boost_octonions.octonions.octonion_member_functions.constructors octonion]``(octonion const & a_recopier); + + long double ``[link boost_octonions.octonions.octonion_member_functions.real_and_unreal_parts real]``() const; + octonion ``[link boost_octonions.octonions.octonion_member_functions.real_and_unreal_parts unreal]``() const; + + long double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_1]``() const; + long double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_2]``() const; + long double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_3]``() const; + long double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_4]``() const; + long double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_5]``() const; + long double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_6]``() const; + long double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_7]``() const; + long double ``[link boost_octonions.octonions.octonion_member_functions.individual_real_components R_component_8]``() const; + + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_1]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_2]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_3]``() const; + ::std::complex ``[link boost_octonions.octonions.octonion_member_functions.individual_complex_components C_component_4]``() const; + + ::boost::math::quaternion ``[link boost_octonions.octonions.octonion_member_functions.individual_quaternion_components H_component_1]``() const; + ::boost::math::quaternion ``[link boost_octonions.octonions.octonion_member_functions.individual_quaternion_components H_component_2]``() const; + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (octonion const & a_affecter); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (octonion const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (long double const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (::std::complex const & a_affecter); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.assignment_operators operator =]`` (::boost::math::quaternion const & a_affecter); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (long double const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator +=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (long double const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator -=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (long double const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator *=]`` (octonion const & rhs); + + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (long double const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (::std::complex const & rhs); + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (::boost::math::quaternion const & rhs); + template + octonion & ``[link boost_octonions.octonions.octonion_member_functions.other_member_operators operator /=]`` (octonion const & rhs); + }; + + } } // namespaces + +[endsect] + +[section Octonion Member Typedefs] + +[*value_type] + +Template version: + + typedef T value_type; + +Float specialization version: + + typedef float value_type; + +Double specialization version: + + typedef double value_type; + +Long double specialization version: + + typedef long double value_type; + +These provide easy acces to the type the template is built upon. + +[endsect] + +[section Octonion Member Functions] + +[h3 Constructors] + +Template version: + + explicit 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 octonion(::std::complex const & z0, ::std::complex const & z1 = ::std::complex(), ::std::complex const & z2 = ::std::complex(), ::std::complex const & z3 = ::std::complex()); + explicit octonion(::boost::math::quaternion const & q0, ::boost::math::quaternion const & q1 = ::boost::math::quaternion()); + template + explicit octonion(octonion const & a_recopier); + +Float specialization version: + + explicit octonion(float const & requested_a = 0.0f, float const & requested_b = 0.0f, float const & requested_c = 0.0f, float const & requested_d = 0.0f, float const & requested_e = 0.0f, float const & requested_f = 0.0f, float const & requested_g = 0.0f, float const & requested_h = 0.0f); + explicit octonion(::std::complex const & z0, ::std::complex const & z1 = ::std::complex(), ::std::complex const & z2 = ::std::complex(), ::std::complex const & z3 = ::std::complex()); + explicit octonion(::boost::math::quaternion const & q0, ::boost::math::quaternion const & q1 = ::boost::math::quaternion()); + explicit octonion(octonion const & a_recopier); + explicit octonion(octonion const & a_recopier); + +Double specialization version: + + explicit octonion(double const & requested_a = 0.0, double const & requested_b = 0.0, double const & requested_c = 0.0, double const & requested_d = 0.0, double const & requested_e = 0.0, double const & requested_f = 0.0, double const & requested_g = 0.0, double const & requested_h = 0.0); + explicit octonion(::std::complex const & z0, ::std::complex const & z1 = ::std::complex(), ::std::complex const & z2 = ::std::complex(), ::std::complex const & z3 = ::std::complex()); + explicit octonion(::boost::math::quaternion const & q0, ::boost::math::quaternion const & q1 = ::boost::math::quaternion()); + explicit octonion(octonion const & a_recopier); + explicit octonion(octonion const & a_recopier); + +Long double specialization version: + + explicit octonion(long double const & requested_a = 0.0L, long double const & requested_b = 0.0L, long double const & requested_c = 0.0L, long double const & requested_d = 0.0L, long double const & requested_e = 0.0L, long double const & requested_f = 0.0L, long double const & requested_g = 0.0L, long double const & requested_h = 0.0L); + explicit octonion( ::std::complex const & z0, ::std::complex const & z1 = ::std::complex(), ::std::complex const & z2 = ::std::complex(), ::std::complex const & z3 = ::std::complex()); + explicit octonion(::boost::math::quaternion const & q0, ::boost::math::quaternion const & q1 = ::boost::math::quaternion()); + explicit octonion(octonion const & a_recopier); + explicit octonion(octonion const & a_recopier); + +A default constructor is provided for each form, which initializes each component +to the default values for their type (i.e. zero for floating numbers). +This constructor can also accept one to eight base type arguments. +A constructor is also provided to build octonions from one to four complex numbers +sharing the same base type, and another taking one or two quaternions +sharing the same base type. The unspecialized template also sports a +templarized copy constructor, while the specialized forms have copy +constructors from the other two specializations, which are explicit +when a risk of precision loss exists. For the unspecialized form, +the base type's constructors must not throw. + +Destructors and untemplated copy constructors (from the same type) +are provided by the compiler. Converting copy constructors make use +of a templated helper function in a "detail" subnamespace. + +[h3 Other member functions] + +[h4 Real and Unreal Parts] + + T real() const; + octonion unreal() const; + +Like complex number, octonions do have a meaningful notion of "real part", +but unlike them there is no meaningful notion of "imaginary part". +Instead there is an "unreal part" which itself is a octonion, +and usually nothing simpler (as opposed to the complex number case). +These are returned by the first two functions. + +[h4 Individual Real Components] + + T R_component_1() const; + T R_component_2() const; + T R_component_3() const; + T R_component_4() const; + T R_component_5() const; + T R_component_6() const; + T R_component_7() const; + T R_component_8() const; + +A octonion having eight real components, these are returned by +these eight functions. Hence real and R_component_1 return the same value. + +[h4 Individual Complex Components] + + ::std::complex C_component_1() const; + ::std::complex C_component_2() const; + ::std::complex C_component_3() const; + ::std::complex C_component_4() const; + +A octonion likewise has four complex components. Actually, octonions +are indeed a (left) vector field over the complexes, but beware, as +for any octonion __oct_formula we also have __oct_complex_formula +(note the [*minus] sign in the last factor). +What the C_component_n functions return, however, are the complexes +which could be used to build the octonion using the constructor, and +[*not] the components of the octonion on the basis ['[^(1, j, e', j')]]. + +[h4 Individual Quaternion Components] + + ::boost::math::quaternion H_component_1() const; + ::boost::math::quaternion H_component_2() const; + +Likewise, for any octonion __oct_formula we also have __oct_quat_formula, though there +is no meaningful vector-space-like structure based on the quaternions. +What the H_component_n functions return are the quaternions which +could be used to build the octonion using the constructor. + +[h3 Octonion Member Operators] +[h4 Assignment Operators] + + octonion & operator = (octonion const & a_affecter); + template + octonion & operator = (octonion const & a_affecter); + octonion & operator = (T const & a_affecter); + octonion & operator = (::std::complex const & a_affecter); + octonion & operator = (::boost::math::quaternion const & a_affecter); + +These perform the expected assignment, with type modification if +necessary (for instance, assigning from a base type will set the +real part to that value, and all other components to zero). +For the unspecialized form, the base type's assignment operators must not throw. + +[h4 Other Member Operators] + + octonion & operator += (T const & rhs) + octonion & operator += (::std::complex const & rhs); + octonion & operator += (::boost::math::quaternion const & rhs); + template + octonion & operator += (octonion const & rhs); + +These perform the mathematical operation `(*this)+rhs` and store the result in +`*this`. The unspecialized form has exception guards, which the specialized +forms do not, so as to insure exception safety. For the unspecialized form, +the base type's assignment operators must not throw. + + octonion & operator -= (T const & rhs) + octonion & operator -= (::std::complex const & rhs); + octonion & operator -= (::boost::math::quaternion const & rhs); + template + octonion & operator -= (octonion const & rhs); + +These perform the mathematical operation `(*this)-rhs` and store the result +in `*this`. The unspecialized form has exception guards, which the +specialized forms do not, so as to insure exception safety. +For the unspecialized form, the base type's assignment operators must not throw. + + octonion & operator *= (T const & rhs) + octonion & operator *= (::std::complex const & rhs); + octonion & operator *= (::boost::math::quaternion const & rhs); + template + octonion & operator *= (octonion const & rhs); + +These perform the mathematical operation `(*this)*rhs` in this order +(order is important as multiplication is not commutative for octonions) +and store the result in `*this`. The unspecialized form has exception guards, +which the specialized forms do not, so as to insure exception safety. +For the unspecialized form, the base type's assignment operators must +not throw. Also, for clarity's sake, you should always group the +factors in a multiplication by groups of two, as the multiplication is +not even associative on the octonions (though there are of course cases +where this does not matter, it usually does). + + octonion & operator /= (T const & rhs) + octonion & operator /= (::std::complex const & rhs); + octonion & operator /= (::boost::math::quaternion const & rhs); + template + octonion & operator /= (octonion const & rhs); + +These perform the mathematical operation `(*this)*inverse_of(rhs)` +in this order (order is important as multiplication is not commutative +for octonions) and store the result in `*this`. The unspecialized form +has exception guards, which the specialized forms do not, so as to +insure exception safety. For the unspecialized form, the base +type's assignment operators must not throw. As for the multiplication, +remember to group any two factors using parenthesis. + +[endsect] + +[section:non_mem Octonion Non-Member Operators] + +[h4 Unary Plus and Minus Operators] + + template octonion operator + (octonion const & o); + +This unary operator simply returns o. + + template octonion operator - (octonion const & o); + +This unary operator returns the opposite of o. + +[h4 Binary Addition Operators] + + template octonion operator + (T const & lhs, octonion const & rhs); + template octonion operator + (octonion const & lhs, T const & rhs); + template octonion operator + (::std::complex const & lhs, octonion const & rhs); + template octonion operator + (octonion const & lhs, ::std::complex const & rhs); + template octonion operator + (::boost::math::quaternion const & lhs, octonion const & rhs); + template octonion operator + (octonion const & lhs, ::boost::math::quaternion const & rhs); + template octonion operator + (octonion const & lhs, octonion const & rhs); + +These operators return `octonion(lhs) += rhs`. + +[h4 Binary Subtraction Operators] + + template octonion operator - (T const & lhs, octonion const & rhs); + template octonion operator - (octonion const & lhs, T const & rhs); + template octonion operator - (::std::complex const & lhs, octonion const & rhs); + template octonion operator - (octonion const & lhs, ::std::complex const & rhs); + template octonion operator - (::boost::math::quaternion const & lhs, octonion const & rhs); + template octonion operator - (octonion const & lhs, ::boost::math::quaternion const & rhs); + template octonion operator - (octonion const & lhs, octonion const & rhs); + +These operators return `octonion(lhs) -= rhs`. + +[h4 Binary Multiplication Operators] + + template octonion operator * (T const & lhs, octonion const & rhs); + template octonion operator * (octonion const & lhs, T const & rhs); + template octonion operator * (::std::complex const & lhs, octonion const & rhs); + template octonion operator * (octonion const & lhs, ::std::complex const & rhs); + template octonion operator * (::boost::math::quaternion const & lhs, octonion const & rhs); + template octonion operator * (octonion const & lhs, ::boost::math::quaternion const & rhs); + template octonion operator * (octonion const & lhs, octonion const & rhs); + +These operators return `octonion(lhs) *= rhs`. + +[h4 Binary Division Operators] + + template octonion operator / (T const & lhs, octonion const & rhs); + template octonion operator / (octonion const & lhs, T const & rhs); + template octonion operator / (::std::complex const & lhs, octonion const & rhs); + template octonion operator / (octonion const & lhs, ::std::complex const & rhs); + template octonion operator / (::boost::math::quaternion const & lhs, octonion const & rhs); + template octonion operator / (octonion const & lhs, ::boost::math::quaternion const & rhs); + template octonion operator / (octonion const & lhs, octonion const & rhs); + +These operators return `octonion(lhs) /= rhs`. It is of course still an +error to divide by zero... + +[h4 Binary Equality Operators] + + template bool operator == (T const & lhs, octonion const & rhs); + template bool operator == (octonion const & lhs, T const & rhs); + template bool operator == (::std::complex const & lhs, octonion const & rhs); + template bool operator == (octonion const & lhs, ::std::complex const & rhs); + template bool operator == (::boost::math::quaternion const & lhs, octonion const & rhs); + template bool operator == (octonion const & lhs, ::boost::math::quaternion const & rhs); + template bool operator == (octonion const & lhs, octonion const & rhs); + +These return true if and only if the four components of `octonion(lhs)` +are equal to their counterparts in `octonion(rhs)`. As with any +floating-type entity, this is essentially meaningless. + +[h4 Binary Inequality Operators] + + template bool operator != (T const & lhs, octonion const & rhs); + template bool operator != (octonion const & lhs, T const & rhs); + template bool operator != (::std::complex const & lhs, octonion const & rhs); + template bool operator != (octonion const & lhs, ::std::complex const & rhs); + template bool operator != (::boost::math::quaternion const & lhs, octonion const & rhs); + template bool operator != (octonion const & lhs, ::boost::math::quaternion const & rhs); + template bool operator != (octonion const & lhs, octonion const & rhs); + +These return true if and only if `octonion(lhs) == octonion(rhs)` +is false. As with any floating-type entity, this is essentially meaningless. + +[h4 Stream Extractor] + + template + ::std::basic_istream & operator >> (::std::basic_istream & is, octonion & o); + +Extracts an octonion `o`. We accept any format which seems reasonable. +However, since this leads to a great many ambiguities, decisions were made +to lift these. In case of doubt, stick to lists of reals. + +The input values must be convertible to T. If bad input is encountered, +calls `is.setstate(ios::failbit)` (which may throw `ios::failure` (27.4.5.3)). + +Returns `is`. + +[h4 Stream Inserter] + + template + ::std::basic_ostream & operator << (::std::basic_ostream & os, octonion const & o); + +Inserts the octonion `o` onto the stream `os` as if it were implemented as follows: + + template + ::std::basic_ostream & operator << ( ::std::basic_ostream & os, + octonion const & o) + { + ::std::basic_ostringstream s; + + s.flags(os.flags()); + s.imbue(os.getloc()); + s.precision(os.precision()); + + s << '(' << o.R_component_1() << ',' + << o.R_component_2() << ',' + << o.R_component_3() << ',' + << o.R_component_4() << ',' + << o.R_component_5() << ',' + << o.R_component_6() << ',' + << o.R_component_7() << ',' + << o.R_component_8() << ')'; + + return os << s.str(); + } + +[endsect] + +[section Octonion Value Operations] + +[h4 Real and Unreal] + + template T real(octonion const & o); + template octonion unreal(octonion const & o); + +These return `o.real()` and `o.unreal()` respectively. + +[h4 conj] + + template octonion conj(octonion const & o); + +This returns the conjugate of the octonion. + +[h4 sup] + + template T sup(octonion const & o); + +This return the sup norm (the greatest among +`abs(o.R_component_1())...abs(o.R_component_8()))` of the octonion. + +[h4 l1] + + template T l1(octonion const & o); + +This return the l1 norm (`abs(o.R_component_1())+...+abs(o.R_component_8())`) +of the octonion. + +[h4 abs] + + template T abs(octonion const & o); + +This return the magnitude (Euclidian norm) of the octonion. + +[h4 norm] + + template T norm(octonionconst & o); + +This return the (Cayley) norm of the octonion. The term "norm" might +be confusing, as most people associate it with the Euclidian norm +(and quadratic functionals). For this version of (the mathematical +objects known as) octonions, the Euclidian norm (also known as +magnitude) is the square root of the Cayley norm. + +[endsect] + +[section:oct_create Octonion Creation Functions] + + template octonion 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 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 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); + +These build octonions in a way similar to the way polar builds +complex numbers, as there is no strict equivalent to +polar coordinates for octonions. + +`spherical` is a simple transposition of `polar`, it takes as inputs a +(positive) magnitude and a point on the hypersphere, given +by three angles. The first of these, ['theta] has a natural range of +-pi to +pi, and the other two have natural ranges of +-pi/2 to +pi/2 (as is the case with the usual spherical +coordinates in __R3). Due to the many symmetries and periodicities, +nothing untoward happens if the magnitude is negative or the angles are +outside their natural ranges. The expected degeneracies (a magnitude of +zero ignores the angles settings...) do happen however. + +`cylindrical` is likewise a simple transposition of the usual +cylindrical coordinates in __R3, which in turn is another derivative of +planar polar coordinates. The first two inputs are the polar +coordinates of the first __C component of the octonion. The third and +fourth inputs are placed into the third and fourth __R components of the +octonion, respectively. + +`multipolar` is yet another simple generalization of polar coordinates. +This time, both __C components of the octonion are given in polar coordinates. + +In this version of our implementation of octonions, there is no +analogue of the complex value operation arg as the situation is +somewhat more complicated. + +[endsect] + +[section Octonions Transcendentals] + +There is no `log` or `sqrt` provided for octonions in this implementation, +and `pow` is likewise restricted to integral powers of the exponent. +There are several reasons to this: on the one hand, the equivalent of +analytic continuation for octonions ("branch cuts") remains to be +investigated thoroughly (by me, at any rate...), and we wish to avoid +the nonsense introduced in the standard by exponentiations of +complexes by complexes (which is well defined, but not in the standard...). +Talking of nonsense, saying that `pow(0,0)` is "implementation defined" is +just plain brain-dead... + +We do, however provide several transcendentals, chief among which is +the exponential. That it allows for a "closed formula" is a result +of the author (the existence and definition of the exponential, on the +octonions among others, on the other hand, is a few centuries old). +Basically, any converging power series with real coefficients which +allows for a closed formula in __C can be transposed to __O. More +transcendentals of this type could be added in a further revision upon +request. It should be noted that it is these functions which force the +dependency upon the +[@../../../../../boost/math/special_functions/sinc.hpp boost/math/special_functions/sinc.hpp] +and the +[@../../../../../boost/math/special_functions/sinhc.hpp boost/math/special_functions/sinhc.hpp] +headers. + +[h4 exp] + + template + octonion exp(octonion const & o); + +Computes the exponential of the octonion. + +[h4 cos] + + template + octonion cos(octonion const & o); + +Computes the cosine of the octonion + +[h4 sin] + + template + octonion sin(octonion const & o); + +Computes the sine of the octonion. + +[h4 tan] + + template + octonion tan(octonion const & o); + +Computes the tangent of the octonion. + +[h4 cosh] + + template + octonion cosh(octonion const & o); + +Computes the hyperbolic cosine of the octonion. + +[h4 sinh] + + template + octonion sinh(octonion const & o); + +Computes the hyperbolic sine of the octonion. + +[h4 tanh] + + template + octonion tanh(octonion const & o); + +Computes the hyperbolic tangent of the octonion. + +[h4 pow] + + template + octonion pow(octonion const & o, int n); + +Computes the n-th power of the octonion q. + +[endsect] + +[section Test Program] + +The [@../../../octonion/octonion_test.cpp octonion_test.cpp] +test program tests octonions specialisations for float, double and long double +([@../../../octonion/output.txt sample output]). + +If you define the symbol BOOST_OCTONION_TEST_VERBOSE, you will get additional +output ([@../../../octonion/output_more.txt verbose output]); this will +only be helpfull if you enable message output at the same time, of course +(by uncommenting the relevant line in the test or by adding --log_level=messages +to your command line,...). In that case, and if you are running interactively, +you may in addition define the symbol BOOST_INTERACTIVE_TEST_INPUT_ITERATOR to +interactively test the input operator with input of your choice from the +standard input (instead of hard-coding it in the test). + +[endsect] + +[section Acknowledgements] + +The mathematical text has been typeset with +[@http://www.nisus-soft.com/ Nisus Writer]. +Jens Maurer has helped with portability and standard adherence, and was the +Review Manager for this library. More acknowledgements in the +History section. Thank you to all who contributed to the discussion about this library. + +[endsect] + +[section History] + +* 1.5.8 - 17/12/2005: Converted documentation to Quickbook Format. +* 1.5.7 - 25/02/2003: transitionned to the unit test framework; now included by the library header (rather than the test files), via . +* 1.5.6 - 15/10/2002: Gcc2.95.x and stlport on linux compatibility by Alkis Evlogimenos (alkis@routescience.com). +* 1.5.5 - 27/09/2002: Microsoft VCPP 7 compatibility, by Michael Stevens (michael@acfr.usyd.edu.au); requires the /Za compiler option. +* 1.5.4 - 19/09/2002: fixed problem with multiple inclusion (in different translation units); attempt at an improved compatibility with Microsoft compilers, by Michael Stevens (michael@acfr.usyd.edu.au) and Fredrik Blomqvist; other compatibility fixes. +* 1.5.3 - 01/02/2002: bugfix and Gcc 2.95.3 compatibility by Douglas Gregor (gregod@cs.rpi.edu). +* 1.5.2 - 07/07/2001: introduced namespace math. +* 1.5.1 - 07/06/2001: (end of Boost review) now includes and instead of ; corrected bug in sin (Daryle Walker); removed check for self-assignment (Gary Powel); made converting functions explicit (Gary Powel); added overflow guards for division operators and abs (Peter Schmitteckert); added sup and l1; used Vesa Karvonen's CPP metaprograming technique to simplify code. +* 1.5.0 - 23/03/2001: boostification, inlining of all operators except input, output and pow, fixed exception safety of some members (template version). +* 1.4.0 - 09/01/2001: added tan and tanh. +* 1.3.1 - 08/01/2001: cosmetic fixes. +* 1.3.0 - 12/07/2000: pow now uses Maarten Hilferink's (mhilferink@tip.nl) algorithm. +* 1.2.0 - 25/05/2000: fixed the division operators and output; changed many signatures. +* 1.1.0 - 23/05/2000: changed sinc into sinc_pi; added sin, cos, sinh, cosh. +* 1.0.0 - 10/08/1999: first public version. + +[endsect] + +[section To Do] + +* Improve testing. +* Rewrite input operatore using Spirit (creates a dependency). +* Put in place an Expression Template mechanism (perhaps borrowing from uBlas). + +[endsect] + +[endsect] diff --git a/doc/quaternion/Jamfile.v2 b/doc/quaternion/Jamfile.v2 new file mode 100644 index 000000000..f642becca --- /dev/null +++ b/doc/quaternion/Jamfile.v2 @@ -0,0 +1,73 @@ + +# Copyright John Maddock 2005. Use, modification, and distribution are +# subject to the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +using quickbook ; + +path-constant images_location : html ; + +xml quaternion : math-quaternion.qbk ; +boostbook standalone + : + quaternion + : + # Path for links to Boost: + boost.root=../../../../.. + # Path for libraries index: + boost.libraries=../../../../../libs/libraries.htm + # Use the main Boost stylesheet: + html.stylesheet=../../../../../doc/html/boostbook.css + + # Some general style settings: + table.footnote.number.format=1 + footnote.number.format=1 + + # HTML options first: + # Use graphics not text for navigation: + navig.graphics=1 + # How far down we chunk nested sections, basically all of them: + chunk.section.depth=10 + # Don't put the first section on the same page as the TOC: + chunk.first.sections=1 + # How far down sections get TOC's + toc.section.depth=10 + # Max depth in each TOC: + toc.max.depth=4 + # How far down we go with TOC's + generate.section.toc.level=10 + #root.filename="sf_dist_and_tools" + + # PDF Options: + # TOC Generation: this is needed for FOP-0.9 and later: + # fop1.extensions=1 + pdf:xep.extensions=1 + # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9! + pdf:fop.extensions=0 + # No indent on body text: + pdf:body.start.indent=0pt + # Margin size: + pdf:page.margin.inner=0.5in + # Margin size: + pdf:page.margin.outer=0.5in + # Paper type = A4 + pdf:paper.type=A4 + # Yes, we want graphics for admonishments: + admon.graphics=1 + # Set this one for PDF generation *only*: + # default pnd graphics are awful in PDF form, + # better use SVG's instead: + pdf:admon.graphics.extension=".svg" + pdf:use.role.for.mediaobject=1 + pdf:preferred.mediaobject.role=print + pdf:img.src.path=$(images_location)/ + pdf:admon.graphics.path=$(images_location)/../../svg-admon/ + ; + + + + + + + + diff --git a/doc/quaternion/html/boost_quaternions/quaternions.html b/doc/quaternion/html/boost_quaternions/quaternions.html new file mode 100644 index 000000000..addd5a1bb --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions.html @@ -0,0 +1,63 @@ + + + +Quaternions + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+ + + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/acknowledgements.html b/doc/quaternion/html/boost_quaternions/quaternions/acknowledgements.html new file mode 100644 index 000000000..1e65e3469 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/acknowledgements.html @@ -0,0 +1,46 @@ + + + +Acknowledgements + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ The mathematical text has been typeset with Nisus + Writer. Jens Maurer has helped with portability and standard adherence, + and was the Review Manager for this library. More acknowledgements in the + History section. Thank you to all who contributed to the discution about + this library. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/create.html b/doc/quaternion/html/boost_quaternions/quaternions/create.html new file mode 100644 index 000000000..3f4980426 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/create.html @@ -0,0 +1,113 @@ + + + +Quaternion Creation Functions + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+template<typename T>	quaternion<T>	spherical(T const & rho, T const & theta, T const & phi1, T const & phi2);
+template<typename T>	quaternion<T>	semipolar(T const & rho, T const & alpha, T const & theta1, T const & theta2);
+template<typename T>	quaternion<T>	multipolar(T const & rho1, T const & theta1, T const & rho2, T const & theta2);
+template<typename T>	quaternion<T>	cylindrospherical(T const & t, T const & radius, T const & longitude, T const & latitude);
+template<typename T>	quaternion<T>	cylindrical(T const & r, T const & angle, T const & h1, T const & h2);
+
+

+ These build quaternions in a way similar to the way polar builds complex + numbers, as there is no strict equivalent to polar coordinates for quaternions. +

+

+ spherical is a simple transposition + of polar, it takes as inputs + a (positive) magnitude and a point on the hypersphere, given by three angles. + The first of these, theta + has a natural range of -pi + to +pi, + and the other two have natural ranges of -pi/2 + to +pi/2 (as is the + case with the usual spherical coordinates in R3). + Due to the many symmetries and periodicities, nothing untoward happens if + the magnitude is negative or the angles are outside their natural ranges. + The expected degeneracies (a magnitude of zero ignores the angles settings...) + do happen however. +

+

+ cylindrical is likewise a + simple transposition of the usual cylindrical coordinates in R3, which in turn is another derivative of + planar polar coordinates. The first two inputs are the polar coordinates + of the first C component + of the quaternion. The third and fourth inputs are placed into the third + and fourth R components + of the quaternion, respectively. +

+

+ multipolar is yet another + simple generalization of polar coordinates. This time, both C components of the quaternion are given + in polar coordinates. +

+

+ cylindrospherical is specific + to quaternions. It is often interesting to consider H + as the cartesian product of R + by R3 (the quaternionic + multiplication as then a special form, as given here). This function therefore + builds a quaternion from this representation, with the R3 component given in usual R3 spherical coordinates. +

+

+ semipolar is another generator + which is specific to quaternions. It takes as a first input the magnitude + of the quaternion, as a second input an angle in the range 0 to +pi/2 + such that magnitudes of the first two C + components of the quaternion are the product of the first input and the sine + and cosine of this angle, respectively, and finally as third and fourth inputs + angles in the range -pi/2 to +pi/2 which represent the arguments of the first + and second C components + of the quaternion, respectively. As usual, nothing untoward happens if what + should be magnitudes are negative numbers or angles are out of their natural + ranges, as symmetries and periodicities kick in. +

+

+ In this version of our implementation of quaternions, there is no analogue + of the complex value operation arg + as the situation is somewhat more complicated. Unit quaternions are linked + both to rotations in R3 + and in R4, and the correspondences + are not too complicated, but there is currently a lack of standard (de facto + or de jure) matrix library with which the conversions could work. This should + be remedied in a further revision. In the mean time, an example of how this + could be done is presented here for R3, and here for R4 (example + test file). +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/exp.html b/doc/quaternion/html/boost_quaternions/quaternions/exp.html new file mode 100644 index 000000000..d50fb4d73 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/exp.html @@ -0,0 +1,49 @@ + + + +The Quaternionic Exponential + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+ + + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/header_file.html b/doc/quaternion/html/boost_quaternions/quaternions/header_file.html new file mode 100644 index 000000000..9e830c05d --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/header_file.html @@ -0,0 +1,42 @@ + + + +Header File + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ The interface and implementation are both supplied by the header file quaternion.hpp. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/history.html b/doc/quaternion/html/boost_quaternions/quaternions/history.html new file mode 100644 index 000000000..8ac1b6e28 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/history.html @@ -0,0 +1,103 @@ + + + +History + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
    +
  • + 1.5.8 - 17/12/2005: Converted documentation to Quickbook Format. +
  • +
  • + 1.5.7 - 24/02/2003: transitionned to the unit test framework; <boost/config.hpp> + now included by the library header (rather than the test files). +
  • +
  • + 1.5.6 - 15/10/2002: Gcc2.95.x and stlport on linux compatibility by Alkis + Evlogimenos (alkis@routescience.com). +
  • +
  • + 1.5.5 - 27/09/2002: Microsoft VCPP 7 compatibility, by Michael Stevens + (michael@acfr.usyd.edu.au); requires the /Za compiler option. +
  • +
  • + 1.5.4 - 19/09/2002: fixed problem with multiple inclusion (in different + translation units); attempt at an improved compatibility with Microsoft + compilers, by Michael Stevens (michael@acfr.usyd.edu.au) and Fredrik Blomqvist; + other compatibility fixes. +
  • +
  • + 1.5.3 - 01/02/2002: bugfix and Gcc 2.95.3 compatibility by Douglas Gregor + (gregod@cs.rpi.edu). +
  • +
  • + 1.5.2 - 07/07/2001: introduced namespace math. +
  • +
  • + 1.5.1 - 07/06/2001: (end of Boost review) now includes <boost/math/special_functions/sinc.hpp> + and <boost/math/special_functions/sinhc.hpp> instead of <boost/special_functions.hpp>; + corrected bug in sin (Daryle Walker); removed check for self-assignment + (Gary Powel); made converting functions explicit (Gary Powel); added overflow + guards for division operators and abs (Peter Schmitteckert); added sup + and l1; used Vesa Karvonen's CPP metaprograming technique to simplify code. +
  • +
  • + 1.5.0 - 26/03/2001: boostification, inlining of all operators except input, + output and pow, fixed exception safety of some members (template version) + and output operator, added spherical, semipolar, multipolar, cylindrospherical + and cylindrical. +
  • +
  • + 1.4.0 - 09/01/2001: added tan and tanh. +
  • +
  • + 1.3.1 - 08/01/2001: cosmetic fixes. +
  • +
  • + 1.3.0 - 12/07/2000: pow now uses Maarten Hilferink's (mhilferink@tip.nl) + algorithm. +
  • +
  • + 1.2.0 - 25/05/2000: fixed the division operators and output; changed many + signatures. +
  • +
  • + 1.1.0 - 23/05/2000: changed sinc into sinc_pi; added sin, cos, sinh, cosh. +
  • +
  • + 1.0.0 - 10/08/1999: first public version. +
  • +
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/mem_fun.html b/doc/quaternion/html/boost_quaternions/quaternions/mem_fun.html new file mode 100644 index 000000000..65b621a0c --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/mem_fun.html @@ -0,0 +1,245 @@ + + + +Quaternion Member Functions + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ + Constructors +

+

+ Template version: +

+
+explicit quaternion(T const & requested_a = T(), T const & requested_b = T(), T const & requested_c = T(), T const & requested_d = T());
+explicit quaternion(::std::complex<T> const & z0, ::std::complex<T> const & z1 = ::std::complex<T>());
+template<typename X>
+explicit quaternion(quaternion<X> const & a_recopier);
+
+

+ Float specialization version: +

+
+explicit quaternion(float const & requested_a = 0.0f, float const & requested_b = 0.0f, float const & requested_c = 0.0f, float const & requested_d = 0.0f);
+explicit quaternion(::std::complex<float> const & z0,::std::complex<float> const & z1 = ::std::complex<float>());
+explicit quaternion(quaternion<double> const & a_recopier); 
+explicit quaternion(quaternion<long double> const & a_recopier);
+
+

+ Double specialization version: +

+
+explicit quaternion(double const & requested_a = 0.0, double const & requested_b = 0.0, double const & requested_c = 0.0, double const & requested_d = 0.0);
+explicit quaternion(::std::complex<double> const & z0, ::std::complex<double> const & z1 = ::std::complex<double>());
+explicit quaternion(quaternion<float> const & a_recopier);
+explicit quaternion(quaternion<long double> const & a_recopier);
+
+

+ Long double specialization version: +

+
+explicit quaternion(long double const & requested_a = 0.0L, long double const & requested_b = 0.0L, long double const & requested_c = 0.0L, long double const & requested_d = 0.0L);
+explicit quaternion(	::std::complex<long double> const & z0, ::std::complex<long double> const & z1 = ::std::complex<long double>());
+explicit quaternion(quaternion<float> const & a_recopier);
+explicit quaternion(quaternion<double> const & a_recopier);
+
+

+ A default constructor is provided for each form, which initializes each component + to the default values for their type (i.e. zero for floating numbers). This + constructor can also accept one to four base type arguments. A constructor + is also provided to build quaternions from one or two complex numbers sharing + the same base type. The unspecialized template also sports a templarized + copy constructor, while the specialized forms have copy constructors from + the other two specializations, which are explicit when a risk of precision + loss exists. For the unspecialized form, the base type's constructors must + not throw. +

+

+ Destructors and untemplated copy constructors (from the same type) are provided + by the compiler. Converting copy constructors make use of a templated helper + function in a "detail" subnamespace. +

+

+ + Other + member functions +

+
+ + Real + and Unreal Parts +
+
+T             real() const;
+quaternion<T> unreal() const;
+
+

+ Like complex number, quaternions do have a meaningful notion of "real + part", but unlike them there is no meaningful notion of "imaginary + part". Instead there is an "unreal part" which itself is a + quaternion, and usually nothing simpler (as opposed to the complex number + case). These are returned by the first two functions. +

+
+ + Individual + Real Components +
+
+T R_component_1() const;
+T R_component_2() const;
+T R_component_3() const;
+T R_component_4() const;
+
+

+ A quaternion having four real components, these are returned by these four + functions. Hence real and R_component_1 return the same value. +

+
+ + Individual + Complex Components +
+
+::std::complex<T>	C_component_1() const;
+::std::complex<T>	C_component_2() const;
+
+

+ A quaternion likewise has two complex components, and as we have seen above, + for any quaternion q = α + βi + γj + δk we also have + q = (α + βi) + (γ + δi)j . These functions return them. + The real part of q.C_component_1() + is the same as q.real(). +

+

+ + Quaternion + Member Operators +

+
+ + Assignment + Operators +
+
+quaternion<T>& operator = (quaternion<T> const & a_affecter);
+template<typename X> 
+quaternion<T>& operator = (quaternion<X> const& a_affecter);
+quaternion<T>& operator = (T const& a_affecter);
+quaternion<T>& operator = (::std::complex<T> const& a_affecter);
+
+

+ These perform the expected assignment, with type modification if necessary + (for instance, assigning from a base type will set the real part to that + value, and all other components to zero). For the unspecialized form, the + base type's assignment operators must not throw. +

+
+ + Addition + Operators +
+
+quaternion<T>& operator += (T const & rhs)
+quaternion<T>& operator += (::std::complex<T> const & rhs);
+template<typename X>	
+quaternion<T>& operator += (quaternion<X> const & rhs);
+
+

+ These perform the mathematical operation (*this)+rhs + and store the result in *this. + The unspecialized form has exception guards, which the specialized forms + do not, so as to insure exception safety. For the unspecialized form, the + base type's assignment operators must not throw. +

+
+ + Subtraction + Operators +
+
+quaternion<T>& operator -= (T const & rhs)
+quaternion<T>& operator -= (::std::complex<T> const & rhs);
+template<typename X>	
+quaternion<T>& operator -= (quaternion<X> const & rhs);
+
+

+ These perform the mathematical operation (*this)-rhs + and store the result in *this. + The unspecialized form has exception guards, which the specialized forms + do not, so as to insure exception safety. For the unspecialized form, the + base type's assignment operators must not throw. +

+
+ + Multiplication + Operators +
+
+quaternion<T>& operator *= (T const & rhs)
+quaternion<T>& operator *= (::std::complex<T> const & rhs);
+template<typename X>	
+quaternion<T>& operator *= (quaternion<X> const & rhs);
+
+

+ These perform the mathematical operation (*this)*rhs + in this order (order is important as multiplication + is not commutative for quaternions) and store the result in *this. The + unspecialized form has exception guards, which the specialized forms do not, + so as to insure exception safety. For the unspecialized form, the base type's + assignment operators must not throw. +

+
+ + Division + Operators +
+
+quaternion<T>& operator /= (T const & rhs)
+quaternion<T>& operator /= (::std::complex<T> const & rhs);
+template<typename X>	
+quaternion<T>& operator /= (quaternion<X> const & rhs);
+
+

+ These perform the mathematical operation (*this)*inverse_of(rhs) + in this order (order is important as multiplication + is not commutative for quaternions) and store the result in *this. The + unspecialized form has exception guards, which the specialized forms do not, + so as to insure exception safety. For the unspecialized form, the base type's + assignment operators must not throw. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/mem_typedef.html b/doc/quaternion/html/boost_quaternions/quaternions/mem_typedef.html new file mode 100644 index 000000000..a473f71fc --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/mem_typedef.html @@ -0,0 +1,70 @@ + + + +Quaternion Member Typedefs + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ value_type +

+

+ Template version: +

+
+typedef T value_type;
+
+

+ Float specialization version: +

+
+typedef float value_type;
+
+

+ Double specialization version: +

+
+typedef double value_type;
+
+

+ Long double specialization version: +

+
+typedef long double value_type;
+
+

+ These provide easy acces to the type the template is built upon. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/non_mem.html b/doc/quaternion/html/boost_quaternions/quaternions/non_mem.html new file mode 100644 index 000000000..24abaa762 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/non_mem.html @@ -0,0 +1,227 @@ + + + +Quaternion Non-Member Operators + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+ + Unary Plus +
+
+template<typename T>	
+quaternion<T> operator + (quaternion<T> const & q);
+
+

+ This unary operator simply returns q. +

+
+ + Unary Minus +
+
+template<typename T>
+quaternion<T> operator - (quaternion<T> const & q);
+
+

+ This unary operator returns the opposite of q. +

+
+ + Binary + Addition Operators +
+
+template<typename T>	quaternion<T>	operator + (T const & lhs, quaternion<T> const & rhs);
+template<typename T>	quaternion<T>	operator + (quaternion<T> const & lhs, T const & rhs);
+template<typename T>	quaternion<T>	operator + (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T>	quaternion<T>	operator + (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T>	quaternion<T>	operator + (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+

+ These operators return quaternion<T>(lhs) += + rhs. +

+
+ + Binary + Subtraction Operators +
+
+template<typename T>	quaternion<T>	operator - (T const & lhs, quaternion<T> const & rhs);
+template<typename T>	quaternion<T>	operator - (quaternion<T> const & lhs, T const & rhs);
+template<typename T>	quaternion<T>	operator - (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T>	quaternion<T>	operator - (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T>	quaternion<T>	operator - (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+

+ These operators return quaternion<T>(lhs) -= + rhs. +

+
+ + Binary + Multiplication Operators +
+
+template<typename T>	quaternion<T>	operator * (T const & lhs, quaternion<T> const & rhs);
+template<typename T>	quaternion<T>	operator * (quaternion<T> const & lhs, T const & rhs);
+template<typename T>	quaternion<T>	operator * (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T>	quaternion<T>	operator * (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T>	quaternion<T>	operator * (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+

+ These operators return quaternion<T>(lhs) *= + rhs. +

+
+ + Binary + Division Operators +
+
+template<typename T>	quaternion<T>	operator / (T const & lhs, quaternion<T> const & rhs);
+template<typename T>	quaternion<T>	operator / (quaternion<T> const & lhs, T const & rhs);
+template<typename T>	quaternion<T>	operator / (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T>	quaternion<T>	operator / (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T>	quaternion<T>	operator / (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+

+ These operators return quaternion<T>(lhs) /= + rhs. It is of course still an error + to divide by zero... +

+
+ + Equality + Operators +
+
+template<typename T>	bool	operator == (T const & lhs, quaternion<T> const & rhs);
+template<typename T>	bool	operator == (quaternion<T> const & lhs, T const & rhs);
+template<typename T>	bool	operator == (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T>	bool	operator == (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T>	bool	operator == (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+

+ These return true if and only if the four components of quaternion<T>(lhs) are + equal to their counterparts in quaternion<T>(rhs). As + with any floating-type entity, this is essentially meaningless. +

+
+ + Inequality + Operators +
+
+template<typename T>	bool	operator != (T const & lhs, quaternion<T> const & rhs);
+template<typename T>	bool	operator != (quaternion<T> const & lhs, T const & rhs);
+template<typename T>	bool	operator != (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T>	bool	operator != (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T>	bool	operator != (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+

+ These return true if and only if quaternion<T>(lhs) == + quaternion<T>(rhs) is + false. As with any floating-type entity, this is essentially meaningless. +

+
+ + Stream + Extractor +
+
+template<typename T, typename charT, class traits>
+::std::basic_istream<charT,traits>& operator >> (::std::basic_istream<charT,traits> & is, quaternion<T> & q);
+
+

+ Extracts a quaternion q of one of the following forms (with a, b, c and d + of type T): +

+

+ a (a), (a,b), (a,b,c), (a,b,c,d) (a,(c)), (a,(c,d)), ((a)), ((a),c), + ((a),(c)), ((a),(c,d)), ((a,b)), ((a,b),c), ((a,b),(c)), ((a,b),(c,d)) +

+

+ The input values must be convertible to T. + If bad input is encountered, calls is.setstate(ios::failbit) + (which may throw ios::failure (27.4.5.3)). +

+

+ Returns: is. +

+

+ The rationale for the list of accepted formats is that either we have a list + of up to four reals, or else we have a couple of complex numbers, and in + that case if it formated as a proper complex number, then it should be accepted. + Thus potential ambiguities are lifted (for instance (a,b) is (a,b,0,0) and + not (a,0,b,0), i.e. it is parsed as a list of two real numbers and not two + complex numbers which happen to have imaginary parts equal to zero). +

+
+ + Stream + Inserter +
+
+template<typename T, typename charT, class traits>
+::std::basic_ostream<charT,traits>& operator << (::std::basic_ostream<charT,traits> & os, quaternion<T> const & q);
+
+

+ Inserts the quaternion q onto the stream os + as if it were implemented as follows: +

+
+template<typename T, typename charT, class traits>
+::std::basic_ostream<charT,traits>& operator << (	
+               ::std::basic_ostream<charT,traits> & os,
+               quaternion<T> const & q)
+{
+   ::std::basic_ostringstream<charT,traits>	s;
+
+   s.flags(os.flags());
+   s.imbue(os.getloc());
+   s.precision(os.precision());
+
+   s << '(' << q.R_component_1() << ','
+            << q.R_component_2() << ','
+            << q.R_component_3() << ','
+            << q.R_component_4() << ')';
+
+   return os << s.str();
+}
+
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/overview.html b/doc/quaternion/html/boost_quaternions/quaternions/overview.html new file mode 100644 index 000000000..218b2d992 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/overview.html @@ -0,0 +1,89 @@ + + + +Overview + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ Quaternions are a relative of complex numbers. +

+

+ Quaternions are in fact part of a small hierarchy of structures built upon + the real numbers, which comprise only the set of real numbers (traditionally + named R), the set of + complex numbers (traditionally named C), + the set of quaternions (traditionally named H) + and the set of octonions (traditionally named O), + which possess interesting mathematical properties (chief among which is the + fact that they are division algebras, i.e. + where the following property is true: if y + is an element of that algebra and is not equal to zero, + then yx = yx', where x + and x' denote elements of that algebra, + implies that x = x'). Each member + of the hierarchy is a super-set of the former. +

+

+ One of the most important aspects of quaternions is that they provide an + efficient way to parameterize rotations in R3 + (the usual three-dimensional space) and R4. +

+

+ In practical terms, a quaternion is simply a quadruple of real numbers (α,β,γ,δ), + which we can write in the form q = α + βi + γj + δk, + where i is the same object as for + complex numbers, and j and k + are distinct objects which play essentially the same kind of role as i. +

+

+ An addition and a multiplication is defined on the set of quaternions, which + generalize their real and complex counterparts. The main novelty here is + that the multiplication is not commutative + (i.e. there are quaternions x and + y such that xy + ≠ yx). A good mnemotechnical way of remembering things + is by using the formula i*i = j*j = k*k = -1. +

+

+ Quaternions (and their kin) are described in far more details in this other + document (with errata + and addenda). +

+

+ Some traditional constructs, such as the exponential, carry over without + too much change into the realms of quaternions, but other, such as taking + a square root, do not. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/quat.html b/doc/quaternion/html/boost_quaternions/quaternions/quat.html new file mode 100644 index 000000000..c74fa9935 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/quat.html @@ -0,0 +1,93 @@ + + + +Template Class quaternion + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+namespace boost{ namespace math{
+
+template<typename T>
+class quaternion
+{
+public:
+
+   typedef T value_type;
+
+   explicit quaternion(T const & requested_a = T(), T const & requested_b = T(), T const & requested_c = T(), T const & requested_d = T());
+   explicit quaternion(::std::complex<T> const & z0, ::std::complex<T> const & z1 = ::std::complex<T>());
+   template<typename X> 
+   explicit quaternion(quaternion<X> const & a_recopier);
+
+   T                  real() const;
+   quaternion<T>      unreal() const;
+   T                  R_component_1() const;
+   T                  R_component_2() const;
+   T                  R_component_3() const;
+   T                  R_component_4() const;
+   ::std::complex<T>  C_component_1() const;
+   ::std::complex<T>  C_component_2() const;
+
+   quaternion<T>&     operator = (quaternion<T> const  & a_affecter);
+   template<typename X>	
+   quaternion<T>&     operator = (quaternion<X> const  & a_affecter);
+   quaternion<T>&     operator = (T const  & a_affecter);
+   quaternion<T>&     operator = (::std::complex<T> const & a_affecter);
+
+   quaternion<T>&     operator += (T const & rhs);
+   quaternion<T>&     operator += (::std::complex<T> const & rhs);
+   template<typename X>
+   quaternion<T>&     operator += (quaternion<X> const & rhs);
+
+   quaternion<T>&     operator -= (T const & rhs);
+   quaternion<T>&     operator -= (::std::complex<T> const & rhs);
+   template<typename X>
+   quaternion<T>&     operator -= (quaternion<X> const & rhs);
+
+   quaternion<T>&     operator *= (T const & rhs);
+   quaternion<T>&     operator *= (::std::complex<T> const & rhs);
+   template<typename X>
+   quaternion<T>&     operator *= (quaternion<X> const & rhs);
+
+   quaternion<T>&     operator /= (T const & rhs);
+   quaternion<T>&     operator /= (::std::complex<T> const & rhs);
+   template<typename X>
+   quaternion<T>&     operator /= (quaternion<X> const & rhs);
+};
+
+} // namespace math
+} // namespace boost
+
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/spec.html b/doc/quaternion/html/boost_quaternions/quaternions/spec.html new file mode 100644 index 000000000..2c569b76a --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/spec.html @@ -0,0 +1,192 @@ + + + +Quaternion Specializations + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+namespace boost{ namespace math{
+
+template<>
+class quaternion<float>
+{
+public:
+   typedef float value_type;
+	
+   explicit quaternion(float const & requested_a = 0.0f, float const & requested_b = 0.0f, float const & requested_c = 0.0f, float const & requested_d = 0.0f);
+   explicit quaternion(::std::complex<float> const & z0, ::std::complex<float> const & z1 = ::std::complex<float>());
+   explicit quaternion(quaternion<double> const & a_recopier);
+   explicit quaternion(quaternion<long double> const & a_recopier);
+	
+   float                  real() const;
+   quaternion<float>      unreal() const;
+   float                  R_component_1() const;
+   float                  R_component_2() const;
+   float                  R_component_3() const;
+   float                  R_component_4() const;
+   ::std::complex<float>  C_component_1() const;
+   ::std::complex<float>  C_component_2() const;
+
+   quaternion<float>&     operator = (quaternion<float> const  & a_affecter);
+   template<typename X>	
+   quaternion<float>&     operator = (quaternion<X> const  & a_affecter);
+   quaternion<float>&     operator = (float const  & a_affecter);
+   quaternion<float>&     operator = (::std::complex<float> const & a_affecter);
+
+   quaternion<float>&     operator += (float const & rhs);
+   quaternion<float>&     operator += (::std::complex<float> const & rhs);
+   template<typename X>
+   quaternion<float>&     operator += (quaternion<X> const & rhs);
+
+   quaternion<float>&     operator -= (float const & rhs);
+   quaternion<float>&     operator -= (::std::complex<float> const & rhs);
+   template<typename X>
+   quaternion<float>&     operator -= (quaternion<X> const & rhs);
+
+   quaternion<float>&     operator *= (float const & rhs);
+   quaternion<float>&     operator *= (::std::complex<float> const & rhs);
+   template<typename X>
+   quaternion<float>&     operator *= (quaternion<X> const & rhs);
+
+   quaternion<float>&     operator /= (float const & rhs);
+   quaternion<float>&     operator /= (::std::complex<float> const & rhs);
+   template<typename X>
+   quaternion<float>&     operator /= (quaternion<X> const & rhs);
+};
+
+

+

+
+template<>
+class quaternion<double>
+{
+public:
+   typedef double value_type;
+	
+   explicit quaternion(double const & requested_a = 0.0, double const & requested_b = 0.0, double const & requested_c = 0.0, double const & requested_d = 0.0);
+   explicit quaternion(::std::complex<double> const & z0, ::std::complex<double> const & z1 = ::std::complex<double>());
+   explicit quaternion(quaternion<float> const & a_recopier);
+   explicit quaternion(quaternion<long double> const & a_recopier);
+	
+   double                  real() const;
+   quaternion<double>      unreal() const;
+   double                  R_component_1() const;
+   double                  R_component_2() const;
+   double                  R_component_3() const;
+   double                  R_component_4() const;
+   ::std::complex<double>  C_component_1() const;
+   ::std::complex<double>  C_component_2() const;
+
+   quaternion<double>&     operator = (quaternion<double> const  & a_affecter);
+   template<typename X>	
+   quaternion<double>&     operator = (quaternion<X> const  & a_affecter);
+   quaternion<double>&     operator = (double const  & a_affecter);
+   quaternion<double>&     operator = (::std::complex<double> const & a_affecter);
+
+   quaternion<double>&     operator += (double const & rhs);
+   quaternion<double>&     operator += (::std::complex<double> const & rhs);
+   template<typename X>
+   quaternion<double>&     operator += (quaternion<X> const & rhs);
+
+   quaternion<double>&     operator -= (double const & rhs);
+   quaternion<double>&     operator -= (::std::complex<double> const & rhs);
+   template<typename X>
+   quaternion<double>&     operator -= (quaternion<X> const & rhs);
+
+   quaternion<double>&     operator *= (double const & rhs);
+   quaternion<double>&     operator *= (::std::complex<double> const & rhs);
+   template<typename X>
+   quaternion<double>&     operator *= (quaternion<X> const & rhs);
+
+   quaternion<double>&     operator /= (double const & rhs);
+   quaternion<double>&     operator /= (::std::complex<double> const & rhs);
+   template<typename X>
+   quaternion<double>&     operator /= (quaternion<X> const & rhs);
+};
+
+

+

+
+template<>
+class quaternion<long double>
+{
+public:
+   typedef long double value_type;
+	
+   explicit quaternion(long double const & requested_a = 0.0L, long double const & requested_b = 0.0L, long double const & requested_c = 0.0L, long double const & requested_d = 0.0L);
+   explicit quaternion(::std::complex<long double> const & z0, ::std::complex<long double> const & z1 = ::std::complex<long double>());
+   explicit quaternion(quaternion<float> const & a_recopier);
+   explicit quaternion(quaternion<double> const & a_recopier);
+	
+   long double                  real() const;
+   quaternion<long double>      unreal() const;
+   long double                  R_component_1() const;
+   long double                  R_component_2() const;
+   long double                  R_component_3() const;
+   long double                  R_component_4() const;
+   ::std::complex<long double>  C_component_1() const;
+   ::std::complex<long double>  C_component_2() const;
+
+   quaternion<long double>&     operator = (quaternion<long double> const  & a_affecter);
+   template<typename X>	
+   quaternion<long double>&     operator = (quaternion<X> const  & a_affecter);
+   quaternion<long double>&     operator = (long double const  & a_affecter);
+   quaternion<long double>&     operator = (::std::complex<long double> const & a_affecter);
+
+   quaternion<long double>&     operator += (long double const & rhs);
+   quaternion<long double>&     operator += (::std::complex<long double> const & rhs);
+   template<typename X>
+   quaternion<long double>&     operator += (quaternion<X> const & rhs);
+
+   quaternion<long double>&     operator -= (long double const & rhs);
+   quaternion<long double>&     operator -= (::std::complex<long double> const & rhs);
+   template<typename X>
+   quaternion<long double>&     operator -= (quaternion<X> const & rhs);
+
+   quaternion<long double>&     operator *= (long double const & rhs);
+   quaternion<long double>&     operator *= (::std::complex<long double> const & rhs);
+   template<typename X>
+   quaternion<long double>&     operator *= (quaternion<X> const & rhs);
+
+   quaternion<long double>&     operator /= (long double const & rhs);
+   quaternion<long double>&     operator /= (::std::complex<long double> const & rhs);
+   template<typename X>
+   quaternion<long double>&     operator /= (quaternion<X> const & rhs);
+};
+
+} // namespace math
+} // namespace boost
+
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/synopsis.html b/doc/quaternion/html/boost_quaternions/quaternions/synopsis.html new file mode 100644 index 000000000..181677c95 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/synopsis.html @@ -0,0 +1,122 @@ + + + +Synopsis + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+namespace boost{ namespace math{
+
+template<typename T> class quaternion;
+template<>           class quaternion<float>;
+template<>           class quaternion<double>; 
+template<>           class quaternion<long double>; 
+
+// operators
+template<typename T> quaternion<T> operator + (T const & lhs, quaternion<T> const & rhs);
+template<typename T> quaternion<T> operator + (quaternion<T> const & lhs, T const & rhs);
+template<typename T> quaternion<T> operator + (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T> quaternion<T> operator + (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> quaternion<T> operator + (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+template<typename T> quaternion<T> operator - (T const & lhs, quaternion<T> const & rhs);
+template<typename T> quaternion<T> operator - (quaternion<T> const & lhs, T const & rhs);
+template<typename T> quaternion<T> operator - (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T> quaternion<T> operator - (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> quaternion<T> operator - (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+template<typename T> quaternion<T> operator * (T const & lhs, quaternion<T> const & rhs);
+template<typename T> quaternion<T> operator * (quaternion<T> const & lhs, T const & rhs);
+template<typename T> quaternion<T> operator * (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T> quaternion<T> operator * (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> quaternion<T> operator * (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+template<typename T> quaternion<T> operator / (T const & lhs, quaternion<T> const & rhs);
+template<typename T> quaternion<T> operator / (quaternion<T> const & lhs, T const & rhs);
+template<typename T> quaternion<T> operator / (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T> quaternion<T> operator / (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> quaternion<T> operator / (quaternion<T> const & lhs, quaternion<T> const & rhs); 
+
+template<typename T> quaternion<T> operator + (quaternion<T> const & q);
+template<typename T> quaternion<T> operator - (quaternion<T> const & q); 
+
+template<typename T> bool operator == (T const & lhs, quaternion<T> const & rhs);
+template<typename T> bool operator == (quaternion<T> const & lhs, T const & rhs);
+template<typename T> bool operator == (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T> bool operator == (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> bool operator == (quaternion<T> const & lhs, quaternion<T> const & rhs);
+
+template<typename T> bool operator != (T const & lhs, quaternion<T> const & rhs);
+template<typename T> bool operator != (quaternion<T> const & lhs, T const & rhs);
+template<typename T> bool operator != (::std::complex<T> const & lhs, quaternion<T> const & rhs);
+template<typename T> bool operator != (quaternion<T> const & lhs, ::std::complex<T> const & rhs);
+template<typename T> bool operator != (quaternion<T> const & lhs, quaternion<T> const & rhs); 
+
+template<typename T, typename charT, class traits>
+::std::basic_istream<charT,traits>& operator >> (::std::basic_istream<charT,traits> & is, quaternion<T> & q);
+
+template<typename T, typename charT, class traits>
+::std::basic_ostream<charT,traits>& operator operator << (::std::basic_ostream<charT,traits> & os, quaternion<T> const & q);
+
+// values
+template<typename T>	T              real(quaternion<T> const & q);
+template<typename T>	quaternion<T>  unreal(quaternion<T> const & q);
+
+template<typename T>	T              sup(quaternion<T> const & q);
+template<typename T>	T              l1(quaternion<T> const & q);
+template<typename T>	T              abs(quaternion<T> const & q);
+template<typename T>	T              norm(quaternion<T>const  & q);
+template<typename T>	quaternion<T>  conj(quaternion<T> const & q);
+
+template<typename T>	quaternion<T>  spherical(T const & rho, T const & theta, T const & phi1, T const & phi2);
+template<typename T>	quaternion<T>  semipolar(T const & rho, T const & alpha, T const & theta1, T const & theta2);
+template<typename T>	quaternion<T>  multipolar(T const & rho1, T const & theta1, T const & rho2, T const & theta2);
+template<typename T>	quaternion<T>  cylindrospherical(T const & t, T const & radius, T const & longitude, T const & latitude);
+template<typename T>	quaternion<T>  cylindrical(T const & r, T const & angle, T const & h1, T const & h2);
+
+// transcendentals
+template<typename T>	quaternion<T>  exp(quaternion<T> const & q);
+template<typename T>	quaternion<T>  cos(quaternion<T> const & q);
+template<typename T>	quaternion<T>  sin(quaternion<T> const & q);
+template<typename T>	quaternion<T>  tan(quaternion<T> const & q);
+template<typename T>	quaternion<T>  cosh(quaternion<T> const & q);
+template<typename T>	quaternion<T>  sinh(quaternion<T> const & q);
+template<typename T>	quaternion<T>  tanh(quaternion<T> const & q);
+template<typename T>	quaternion<T>  pow(quaternion<T> const & q, int n);
+
+} // namespace math
+} // namespace boost
+
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/test_program.html b/doc/quaternion/html/boost_quaternions/quaternions/test_program.html new file mode 100644 index 000000000..4382545f6 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/test_program.html @@ -0,0 +1,55 @@ + + + +Test Program + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ The quaternion_test.cpp + test program tests quaternions specializations for float, double and long + double (sample output, + with message output enabled). +

+

+ If you define the symbol boost_quaternions_TEST_VERBOSE, you will get additional + output (verbose output); + this will only be helpfull if you enable message output at the same time, + of course (by uncommenting the relevant line in the test or by adding --log_level=messages + to your command line,...). In that case, and if you are running interactively, + you may in addition define the symbol BOOST_INTERACTIVE_TEST_INPUT_ITERATOR + to interactively test the input operator with input of your choice from the + standard input (instead of hard-coding it in the test). +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/to_do.html b/doc/quaternion/html/boost_quaternions/quaternions/to_do.html new file mode 100644 index 000000000..9ad85cd05 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/to_do.html @@ -0,0 +1,53 @@ + + + +To Do + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHome +
+
+

+To Do +

+
    +
  • + Improve testing. +
  • +
  • + Rewrite input operatore using Spirit (creates a dependency). +
  • +
  • + Put in place an Expression Template mechanism (perhaps borrowing from uBlas). +
  • +
  • + Use uBlas for the link with rotations (and move from the example + implementation to an efficient one). +
  • +
+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHome +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/trans.html b/doc/quaternion/html/boost_quaternions/quaternions/trans.html new file mode 100644 index 000000000..6bf7dacf5 --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/trans.html @@ -0,0 +1,148 @@ + + + +Quaternion Transcendentals + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ There is no log or sqrt provided for quaternions in this implementation, + and pow is likewise restricted + to integral powers of the exponent. There are several reasons to this: on + the one hand, the equivalent of analytic continuation for quaternions ("branch + cuts") remains to be investigated thoroughly (by me, at any rate...), + and we wish to avoid the nonsense introduced in the standard by exponentiations + of complexes by complexes (which is well defined, but not in the standard...). + Talking of nonsense, saying that pow(0,0) is "implementation + defined" is just plain brain-dead... +

+

+ We do, however provide several transcendentals, chief among which is the + exponential. This author claims the complete proof of the "closed formula" + as his own, as well as its independant invention (there are claims to prior + invention of the formula, such as one by Professor Shoemake, and it is possible + that the formula had been known a couple of centuries back, but in absence + of bibliographical reference, the matter is pending, awaiting further investigation; + on the other hand, the definition and existence of the exponential on the + quaternions, is of course a fact known for a very long time). Basically, + any converging power series with real coefficients which allows for a closed + formula in C can be + transposed to H. More + transcendentals of this type could be added in a further revision upon request. + It should be noted that it is these functions which force the dependency + upon the boost/math/special_functions/sinc.hpp + and the boost/math/special_functions/sinhc.hpp + headers. +

+
+ + exp +
+
+template<typename T>	quaternion<T> exp(quaternion<T> const & q);
+
+

+ Computes the exponential of the quaternion. +

+
+ + cos +
+
+template<typename T>	quaternion<T>  cos(quaternion<T> const & q);
+
+

+ Computes the cosine of the quaternion +

+
+ + sin +
+
+template<typename T>	quaternion<T>  sin(quaternion<T> const & q);
+
+

+ Computes the sine of the quaternion. +

+
+ + tan +
+
+template<typename T>	quaternion<T>  tan(quaternion<T> const & q);
+
+

+ Computes the tangent of the quaternion. +

+
+ + cosh +
+
+template<typename T>	quaternion<T>  cosh(quaternion<T> const & q);
+
+

+ Computes the hyperbolic cosine of the quaternion. +

+
+ + sinh +
+
+template<typename T>	quaternion<T>  sinh(quaternion<T> const & q);
+
+

+ Computes the hyperbolic sine of the quaternion. +

+
+ + tanh +
+
+template<typename T>	quaternion<T>  tanh(quaternion<T> const & q);
+
+

+ Computes the hyperbolic tangent of the quaternion. +

+
+ + pow +
+
+template<typename T>	quaternion<T>  pow(quaternion<T> const & q, int n);
+
+

+ Computes the n-th power of the quaternion q. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/boost_quaternions/quaternions/value_op.html b/doc/quaternion/html/boost_quaternions/quaternions/value_op.html new file mode 100644 index 000000000..6eeabd5be --- /dev/null +++ b/doc/quaternion/html/boost_quaternions/quaternions/value_op.html @@ -0,0 +1,108 @@ + + + +Quaternion Value Operations + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+ + real + and unreal +
+
+template<typename T>	T              real(quaternion<T> const & q);
+template<typename T>	quaternion<T>  unreal(quaternion<T> const & q);
+
+

+ These return q.real() + and q.unreal() + respectively. +

+
+ + conj +
+
+template<typename T>	quaternion<T>  conj(quaternion<T> const & q);
+
+

+ This returns the conjugate of the quaternion. +

+
+ + sup +
+

+ template<typename T> T sup(quaternion<T> const & q); +

+

+ This return the sup norm (the greatest among abs(q.R_component_1())...abs(q.R_component_4())) of the quaternion. +

+
+ + l1 +
+
+template<typename T>	T  l1(quaternion<T> const & q);
+
+

+ This return the l1 norm (abs(q.R_component_1())+...+abs(q.R_component_4())) of the quaternion. +

+
+ + abs +
+
+template<typename T>	T  abs(quaternion<T> const & q);
+
+

+ This return the magnitude (Euclidian norm) of the quaternion. +

+
+ + norm +
+
+template<typename T>	T  norm(quaternion<T>const  & q);
+
+

+ This return the (Cayley) norm of the quaternion. The term "norm" + might be confusing, as most people associate it with the Euclidian norm (and + quadratic functionals). For this version of (the mathematical objects known + as) quaternions, the Euclidian norm (also known as magnitude) is the square + root of the Cayley norm. +

+
+ + + +
Copyright © 2001 -2003 Hubert Holin
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/quaternion/html/index.html b/doc/quaternion/html/index.html new file mode 100644 index 000000000..a5228c441 --- /dev/null +++ b/doc/quaternion/html/index.html @@ -0,0 +1,77 @@ + + + +Boost.Quaternions + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
Next
+
+
+
+

+Boost.Quaternions

+

+Hubert Holin +

+
+
+

+ Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +

+
+
+
+
+ +
+ + + +

Last revised: December 29, 2006 at 11:08:32 +0000

+
+
Next
+ + diff --git a/doc/quaternion/math-quaternion.qbk b/doc/quaternion/math-quaternion.qbk new file mode 100644 index 000000000..7f514d53f --- /dev/null +++ b/doc/quaternion/math-quaternion.qbk @@ -0,0 +1,931 @@ +[article Boost.Quaternions + [quickbook 1.3] + [copyright 2001-2003 Hubert Holin] + [purpose Quaternions] + [license + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + [@http://www.boost.org/LICENSE_1_0.txt http://www.boost.org/LICENSE_1_0.txt]) + ] + [authors [Holin, Hubert]] + [category math] + [last-revision $Date: 2006-12-29 11:08:32 +0000 (Fri, 29 Dec 2006) $] +] + +[def __R ['[*R]]] +[def __C ['[*C]]] +[def __H ['[*H]]] +[def __O ['[*O]]] +[def __R3 ['[*'''R3''']]] +[def __R4 ['[*'''R4''']]] +[def __quadrulple ('''α,β,γ,δ''')] +[def __quat_formula ['[^q = '''α + βi + γj + δk''']]] +[def __quat_complex_formula ['[^q = ('''α + βi) + (γ + δi)j''' ]]] +[def __not_equal ['[^xy '''≠''' yx]]] + +[def __asinh [link boost_quaternions.math_special_functions.asinh asinh]] +[def __acosh [link boost_quaternions.math_special_functions.acosh acosh]] +[def __atanh [link boost_quaternions.math_special_functions.atanh atanh]] +[def __sinc_pi [link boost_quaternions.math_special_functions.sinc_pi sinc_pi]] +[def __sinhc_pi [link boost_quaternions.math_special_functions.sinhc_pi sinhc_pi]] + +[def __log1p [link boost_quaternions.math_special_functions.log1p log1p]] +[def __expm1 [link boost_quaternions.math_special_functions.expm1 expm1]] +[def __hypot [link boost_quaternions.math_special_functions.hypot hypot]] + + +[section Quaternions] + +[section Overview] + +Quaternions are a relative of complex numbers. + +Quaternions are in fact part of a small hierarchy of structures built +upon the real numbers, which comprise only the set of real numbers +(traditionally named __R), the set of complex numbers (traditionally named __C), +the set of quaternions (traditionally named __H) and the set of octonions +(traditionally named __O), which possess interesting mathematical properties +(chief among which is the fact that they are ['division algebras], +['i.e.] where the following property is true: if ['[^y]] is an element of that +algebra and is [*not equal to zero], then ['[^yx = yx']], where ['[^x]] and ['[^x']] +denote elements of that algebra, implies that ['[^x = x']]). +Each member of the hierarchy is a super-set of the former. + +One of the most important aspects of quaternions is that they provide an +efficient way to parameterize rotations in __R3 (the usual three-dimensional space) +and __R4. + +In practical terms, a quaternion is simply a quadruple of real numbers __quadrulple, +which we can write in the form __quat_formula, where ['[^i]] is the same object as for complex numbers, +and ['[^j]] and ['[^k]] are distinct objects which play essentially the same kind of role as ['[^i]]. + +An addition and a multiplication is defined on the set of quaternions, +which generalize their real and complex counterparts. The main novelty +here is that [*the multiplication is not commutative] (i.e. there are +quaternions ['[^x]] and ['[^y]] such that __not_equal). A good mnemotechnical way of remembering +things is by using the formula ['[^i*i = j*j = k*k = -1]]. + +Quaternions (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 quaternions, but other, such as taking +a square root, do not. + +[endsect] + +[section Header File] + +The interface and implementation are both supplied by the header file +[@../../../../../boost/math/quaternion.hpp quaternion.hpp]. + +[endsect] + +[section Synopsis] + + namespace boost{ namespace math{ + + template class ``[link boost_quaternions.quaternions.quat quaternion]``; + template<> class ``[link boost_quaternions.quaternions.spec quaternion]``; + template<> class ``[link boost_quaternions.quaternion_double quaternion]``; + template<> class ``[link boost_quaternions.quaternion_long_double quaternion]``; + + // operators + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_addition_operators operator +]`` (T const & lhs, quaternion const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_addition_operators operator +]`` (quaternion const & lhs, T const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_addition_operators operator +]`` (::std::complex const & lhs, quaternion const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_addition_operators operator +]`` (quaternion const & lhs, ::std::complex const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_addition_operators operator +]`` (quaternion const & lhs, quaternion const & rhs); + + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_subtraction_operators operator -]`` (T const & lhs, quaternion const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_subtraction_operators operator -]`` (quaternion const & lhs, T const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_subtraction_operators operator -]`` (::std::complex const & lhs, quaternion const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_subtraction_operators operator -]`` (quaternion const & lhs, ::std::complex const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_subtraction_operators operator -]`` (quaternion const & lhs, quaternion const & rhs); + + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_multiplication_operators operator *]`` (T const & lhs, quaternion const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_multiplication_operators operator *]`` (quaternion const & lhs, T const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_multiplication_operators operator *]`` (::std::complex const & lhs, quaternion const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_multiplication_operators operator *]`` (quaternion const & lhs, ::std::complex const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_multiplication_operators operator *]`` (quaternion const & lhs, quaternion const & rhs); + + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_division_operators operator /]`` (T const & lhs, quaternion const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_division_operators operator /]`` (quaternion const & lhs, T const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_division_operators operator /]`` (::std::complex const & lhs, quaternion const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_division_operators operator /]`` (quaternion const & lhs, ::std::complex const & rhs); + template quaternion ``[link boost_quaternions.quaternions.non_mem.binary_division_operators operator /]`` (quaternion const & lhs, quaternion const & rhs); + + template quaternion ``[link boost_quaternions.quaternions.non_mem.unary_plus operator +]`` (quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.non_mem.unary_minus operator -]`` (quaternion const & q); + + template bool ``[link boost_quaternions.quaternions.non_mem.equality_operators operator ==]`` (T const & lhs, quaternion const & rhs); + template bool ``[link boost_quaternions.quaternions.non_mem.equality_operators operator ==]`` (quaternion const & lhs, T const & rhs); + template bool ``[link boost_quaternions.quaternions.non_mem.equality_operators operator ==]`` (::std::complex const & lhs, quaternion const & rhs); + template bool ``[link boost_quaternions.quaternions.non_mem.equality_operators operator ==]`` (quaternion const & lhs, ::std::complex const & rhs); + template bool ``[link boost_quaternions.quaternions.non_mem.equality_operators operator ==]`` (quaternion const & lhs, quaternion const & rhs); + + template bool ``[link boost_quaternions.quaternions.non_mem.inequality_operators operator !=]`` (T const & lhs, quaternion const & rhs); + template bool ``[link boost_quaternions.quaternions.non_mem.inequality_operators operator !=]`` (quaternion const & lhs, T const & rhs); + template bool ``[link boost_quaternions.quaternions.non_mem.inequality_operators operator !=]`` (::std::complex const & lhs, quaternion const & rhs); + template bool ``[link boost_quaternions.quaternions.non_mem.inequality_operators operator !=]`` (quaternion const & lhs, ::std::complex const & rhs); + template bool ``[link boost_quaternions.quaternions.non_mem.inequality_operators operator !=]`` (quaternion const & lhs, quaternion const & rhs); + + template + ::std::basic_istream& ``[link boost_quaternions.quaternions.non_mem.stream_extractor operator >>]`` (::std::basic_istream & is, quaternion & q); + + template + ::std::basic_ostream& operator ``[link boost_quaternions.quaternions.non_mem.stream_inserter operator <<]`` (::std::basic_ostream & os, quaternion const & q); + + // values + template T ``[link boost_quaternions.quaternions.value_op.real_and_unreal real]``(quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.value_op.real_and_unreal unreal]``(quaternion const & q); + + template T ``[link boost_quaternions.quaternions.value_op.sup sup]``(quaternion const & q); + template T ``[link boost_quaternions.quaternions.value_op.l1 l1]``(quaternion const & q); + template T ``[link boost_quaternions.quaternions.value_op.abs abs]``(quaternion const & q); + template T ``[link boost_quaternions.quaternions.value_op.norm norm]``(quaternionconst & q); + template quaternion ``[link boost_quaternions.quaternions.value_op.conj conj]``(quaternion const & q); + + template quaternion ``[link boost_quaternions.quaternions.creation_spherical spherical]``(T const & rho, T const & theta, T const & phi1, T const & phi2); + template quaternion ``[link boost_quaternions.quaternions.creation_semipolar semipolar]``(T const & rho, T const & alpha, T const & theta1, T const & theta2); + template quaternion ``[link boost_quaternions.quaternions.creation_multipolar multipolar]``(T const & rho1, T const & theta1, T const & rho2, T const & theta2); + template quaternion ``[link boost_quaternions.quaternions.creation_cylindrospherical cylindrospherical]``(T const & t, T const & radius, T const & longitude, T const & latitude); + template quaternion ``[link boost_quaternions.quaternions.creation_cylindrical cylindrical]``(T const & r, T const & angle, T const & h1, T const & h2); + + // transcendentals + template quaternion ``[link boost_quaternions.quaternions.trans.exp exp]``(quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.trans.cos cos]``(quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.trans.sin sin]``(quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.trans.tan tan]``(quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.trans.cosh cosh]``(quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.trans.sinh sinh]``(quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.trans.tanh tanh]``(quaternion const & q); + template quaternion ``[link boost_quaternions.quaternions.trans.pow pow]``(quaternion const & q, int n); + + } // namespace math + } // namespace boost + +[endsect] + +[section:quat Template Class quaternion] + + namespace boost{ namespace math{ + + template + class quaternion + { + public: + + typedef T ``[link boost_quaternions.quaternions.mem_typedef value_type]``; + + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(T const & requested_a = T(), T const & requested_b = T(), T const & requested_c = T(), T const & requested_d = T()); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(::std::complex const & z0, ::std::complex const & z1 = ::std::complex()); + template + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(quaternion const & a_recopier); + + T ``[link boost_quaternions.quaternions.mem_fun.real_and_unreal_parts real]``() const; + quaternion ``[link boost_quaternions.quaternions.mem_fun.real_and_unreal_parts unreal]``() const; + T ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_1]``() const; + T ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_2]``() const; + T ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_3]``() const; + T ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_4]``() const; + ::std::complex ``[link boost_quaternions.quaternions.mem_fun.individual_complex__components C_component_1]``() const; + ::std::complex ``[link boost_quaternions.quaternions.mem_fun.individual_complex__components C_component_2]``() const; + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(quaternion const & a_affecter); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(quaternion const & a_affecter); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(T const & a_affecter); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(::std::complex const & a_affecter); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(T const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(T const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(T const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(T const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(quaternion const & rhs); + }; + + } // namespace math + } // namespace boost + +[endsect] + +[section:spec Quaternion Specializations] + + namespace boost{ namespace math{ + + template<> + class quaternion + { + public: + typedef float ``[link boost_quaternions.quaternions.mem_typedef value_type]``; + + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(float const & requested_a = 0.0f, float const & requested_b = 0.0f, float const & requested_c = 0.0f, float const & requested_d = 0.0f); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(::std::complex const & z0, ::std::complex const & z1 = ::std::complex()); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(quaternion const & a_recopier); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(quaternion const & a_recopier); + + float ``[link boost_quaternions.quaternions.mem_fun.real_and_unreal_parts real]``() const; + quaternion ``[link boost_quaternions.quaternions.mem_fun.real_and_unreal_parts unreal]``() const; + float ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_1]``() const; + float ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_2]``() const; + float ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_3]``() const; + float ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_4]``() const; + ::std::complex ``[link boost_quaternions.quaternions.mem_fun.individual_complex__components C_component_1]``() const; + ::std::complex ``[link boost_quaternions.quaternions.mem_fun.individual_complex__components C_component_2]``() const; + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(quaternion const & a_affecter); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(quaternion const & a_affecter); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(float const & a_affecter); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(::std::complex const & a_affecter); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(float const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(float const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(float const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(float const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(quaternion const & rhs); + }; + +[#boost_quaternions.quaternion_double] + + template<> + class quaternion + { + public: + typedef double ``[link boost_quaternions.quaternions.mem_typedef value_type]``; + + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(double const & requested_a = 0.0, double const & requested_b = 0.0, double const & requested_c = 0.0, double const & requested_d = 0.0); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(::std::complex const & z0, ::std::complex const & z1 = ::std::complex()); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(quaternion const & a_recopier); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(quaternion const & a_recopier); + + double ``[link boost_quaternions.quaternions.mem_fun.real_and_unreal_parts real]``() const; + quaternion ``[link boost_quaternions.quaternions.mem_fun.real_and_unreal_parts unreal]``() const; + double ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_1]``() const; + double ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_2]``() const; + double ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_3]``() const; + double ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_4]``() const; + ::std::complex ``[link boost_quaternions.quaternions.mem_fun.individual_complex__components C_component_1]``() const; + ::std::complex ``[link boost_quaternions.quaternions.mem_fun.individual_complex__components C_component_2]``() const; + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(quaternion const & a_affecter); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(quaternion const & a_affecter); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(double const & a_affecter); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(::std::complex const & a_affecter); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(double const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(double const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(double const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(double const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(quaternion const & rhs); + }; + +[#boost_quaternions.quaternion_long_double] + + template<> + class quaternion + { + public: + typedef long double ``[link boost_quaternions.quaternions.mem_typedef value_type]``; + + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(long double const & requested_a = 0.0L, long double const & requested_b = 0.0L, long double const & requested_c = 0.0L, long double const & requested_d = 0.0L); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(::std::complex const & z0, ::std::complex const & z1 = ::std::complex()); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(quaternion const & a_recopier); + explicit ``[link boost_quaternions.quaternions.mem_fun.constructors quaternion]``(quaternion const & a_recopier); + + long double ``[link boost_quaternions.quaternions.mem_fun.real_and_unreal_parts real]``() const; + quaternion ``[link boost_quaternions.quaternions.mem_fun.real_and_unreal_parts unreal]``() const; + long double ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_1]``() const; + long double ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_2]``() const; + long double ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_3]``() const; + long double ``[link boost_quaternions.quaternions.mem_fun.individual_real_components R_component_4]``() const; + ::std::complex ``[link boost_quaternions.quaternions.mem_fun.individual_complex__components C_component_1]``() const; + ::std::complex ``[link boost_quaternions.quaternions.mem_fun.individual_complex__components C_component_2]``() const; + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(quaternion const & a_affecter); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(quaternion const & a_affecter); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(long double const & a_affecter); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.assignment_operators operator = ]``(::std::complex const & a_affecter); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(long double const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.addition_operators operator += ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(long double const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.subtraction_operators operator -= ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(long double const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.multiplication_operators operator *= ]``(quaternion const & rhs); + + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(long double const & rhs); + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(::std::complex const & rhs); + template + quaternion& ``[link boost_quaternions.quaternions.mem_fun.division_operators operator /= ]``(quaternion const & rhs); + }; + + } // namespace math + } // namespace boost + +[endsect] + +[section:mem_typedef Quaternion Member Typedefs] + +[*value_type] + +Template version: + + typedef T value_type; + +Float specialization version: + + typedef float value_type; + +Double specialization version: + + typedef double value_type; + +Long double specialization version: + + typedef long double value_type; + +These provide easy acces to the type the template is built upon. + +[endsect] + +[section:mem_fun Quaternion Member Functions] +[h3 Constructors] + +Template version: + + explicit quaternion(T const & requested_a = T(), T const & requested_b = T(), T const & requested_c = T(), T const & requested_d = T()); + explicit quaternion(::std::complex const & z0, ::std::complex const & z1 = ::std::complex()); + template + explicit quaternion(quaternion const & a_recopier); + +Float specialization version: + + explicit quaternion(float const & requested_a = 0.0f, float const & requested_b = 0.0f, float const & requested_c = 0.0f, float const & requested_d = 0.0f); + explicit quaternion(::std::complex const & z0,::std::complex const & z1 = ::std::complex()); + explicit quaternion(quaternion const & a_recopier); + explicit quaternion(quaternion const & a_recopier); + +Double specialization version: + + explicit quaternion(double const & requested_a = 0.0, double const & requested_b = 0.0, double const & requested_c = 0.0, double const & requested_d = 0.0); + explicit quaternion(::std::complex const & z0, ::std::complex const & z1 = ::std::complex()); + explicit quaternion(quaternion const & a_recopier); + explicit quaternion(quaternion const & a_recopier); + +Long double specialization version: + + explicit quaternion(long double const & requested_a = 0.0L, long double const & requested_b = 0.0L, long double const & requested_c = 0.0L, long double const & requested_d = 0.0L); + explicit quaternion( ::std::complex const & z0, ::std::complex const & z1 = ::std::complex()); + explicit quaternion(quaternion const & a_recopier); + explicit quaternion(quaternion const & a_recopier); + +A default constructor is provided for each form, which initializes +each component to the default values for their type +(i.e. zero for floating numbers). This constructor can also accept +one to four base type arguments. A constructor is also provided to +build quaternions from one or two complex numbers sharing the same +base type. The unspecialized template also sports a templarized copy +constructor, while the specialized forms have copy constructors +from the other two specializations, which are explicit when a risk of +precision loss exists. For the unspecialized form, the base type's +constructors must not throw. + +Destructors and untemplated copy constructors (from the same type) are +provided by the compiler. Converting copy constructors make use of a +templated helper function in a "detail" subnamespace. + +[h3 Other member functions] +[h4 Real and Unreal Parts] + + T real() const; + quaternion unreal() const; + +Like complex number, quaternions do have a meaningful notion of "real part", +but unlike them there is no meaningful notion of "imaginary part". +Instead there is an "unreal part" which itself is a quaternion, +and usually nothing simpler (as opposed to the complex number case). +These are returned by the first two functions. + +[h4 Individual Real Components] + + T R_component_1() const; + T R_component_2() const; + T R_component_3() const; + T R_component_4() const; + +A quaternion having four real components, these are returned by these four +functions. Hence real and R_component_1 return the same value. + +[h4 Individual Complex Components] + + ::std::complex C_component_1() const; + ::std::complex C_component_2() const; + +A quaternion likewise has two complex components, and as we have seen above, +for any quaternion __quat_formula we also have __quat_complex_formula. These functions return them. +The real part of `q.C_component_1()` is the same as `q.real()`. + +[h3 Quaternion Member Operators] +[h4 Assignment Operators] + + quaternion& operator = (quaternion const & a_affecter); + template + quaternion& operator = (quaternion const& a_affecter); + quaternion& operator = (T const& a_affecter); + quaternion& operator = (::std::complex const& a_affecter); + +These perform the expected assignment, with type modification if necessary +(for instance, assigning from a base type will set the real part to that +value, and all other components to zero). For the unspecialized form, +the base type's assignment operators must not throw. + +[h4 Addition Operators] + + quaternion& operator += (T const & rhs) + quaternion& operator += (::std::complex const & rhs); + template + quaternion& operator += (quaternion const & rhs); + +These perform the mathematical operation `(*this)+rhs` and store the result in +`*this`. The unspecialized form has exception guards, which the specialized +forms do not, so as to insure exception safety. For the unspecialized form, +the base type's assignment operators must not throw. + +[h4 Subtraction Operators] + + quaternion& operator -= (T const & rhs) + quaternion& operator -= (::std::complex const & rhs); + template + quaternion& operator -= (quaternion const & rhs); + +These perform the mathematical operation `(*this)-rhs` and store the result +in `*this`. The unspecialized form has exception guards, which the +specialized forms do not, so as to insure exception safety. +For the unspecialized form, the base type's assignment operators +must not throw. + +[h4 Multiplication Operators] + + quaternion& operator *= (T const & rhs) + quaternion& operator *= (::std::complex const & rhs); + template + quaternion& operator *= (quaternion const & rhs); + +These perform the mathematical operation `(*this)*rhs` [*in this order] +(order is important as multiplication is not commutative for quaternions) +and store the result in `*this`. The unspecialized form has exception guards, +which the specialized forms do not, so as to insure exception safety. +For the unspecialized form, the base type's assignment operators must not throw. + +[h4 Division Operators] + + quaternion& operator /= (T const & rhs) + quaternion& operator /= (::std::complex const & rhs); + template + quaternion& operator /= (quaternion const & rhs); + +These perform the mathematical operation `(*this)*inverse_of(rhs)` [*in this +order] (order is important as multiplication is not commutative for quaternions) +and store the result in `*this`. The unspecialized form has exception guards, +which the specialized forms do not, so as to insure exception safety. +For the unspecialized form, the base type's assignment operators must not throw. + +[endsect] +[section:non_mem Quaternion Non-Member Operators] + +[h4 Unary Plus] + + template + quaternion operator + (quaternion const & q); + +This unary operator simply returns q. + +[h4 Unary Minus] + + template + quaternion operator - (quaternion const & q); + +This unary operator returns the opposite of q. + +[h4 Binary Addition Operators] + + template quaternion operator + (T const & lhs, quaternion const & rhs); + template quaternion operator + (quaternion const & lhs, T const & rhs); + template quaternion operator + (::std::complex const & lhs, quaternion const & rhs); + template quaternion operator + (quaternion const & lhs, ::std::complex const & rhs); + template quaternion operator + (quaternion const & lhs, quaternion const & rhs); + +These operators return `quaternion(lhs) += rhs`. + +[h4 Binary Subtraction Operators] + + template quaternion operator - (T const & lhs, quaternion const & rhs); + template quaternion operator - (quaternion const & lhs, T const & rhs); + template quaternion operator - (::std::complex const & lhs, quaternion const & rhs); + template quaternion operator - (quaternion const & lhs, ::std::complex const & rhs); + template quaternion operator - (quaternion const & lhs, quaternion const & rhs); + +These operators return `quaternion(lhs) -= rhs`. + +[h4 Binary Multiplication Operators] + + template quaternion operator * (T const & lhs, quaternion const & rhs); + template quaternion operator * (quaternion const & lhs, T const & rhs); + template quaternion operator * (::std::complex const & lhs, quaternion const & rhs); + template quaternion operator * (quaternion const & lhs, ::std::complex const & rhs); + template quaternion operator * (quaternion const & lhs, quaternion const & rhs); + +These operators return `quaternion(lhs) *= rhs`. + +[h4 Binary Division Operators] + + template quaternion operator / (T const & lhs, quaternion const & rhs); + template quaternion operator / (quaternion const & lhs, T const & rhs); + template quaternion operator / (::std::complex const & lhs, quaternion const & rhs); + template quaternion operator / (quaternion const & lhs, ::std::complex const & rhs); + template quaternion operator / (quaternion const & lhs, quaternion const & rhs); + +These operators return `quaternion(lhs) /= rhs`. It is of course still an +error to divide by zero... + +[h4 Equality Operators] + + template bool operator == (T const & lhs, quaternion const & rhs); + template bool operator == (quaternion const & lhs, T const & rhs); + template bool operator == (::std::complex const & lhs, quaternion const & rhs); + template bool operator == (quaternion const & lhs, ::std::complex const & rhs); + template bool operator == (quaternion const & lhs, quaternion const & rhs); + +These return true if and only if the four components of `quaternion(lhs)` +are equal to their counterparts in `quaternion(rhs)`. As with any +floating-type entity, this is essentially meaningless. + +[h4 Inequality Operators] + + template bool operator != (T const & lhs, quaternion const & rhs); + template bool operator != (quaternion const & lhs, T const & rhs); + template bool operator != (::std::complex const & lhs, quaternion const & rhs); + template bool operator != (quaternion const & lhs, ::std::complex const & rhs); + template bool operator != (quaternion const & lhs, quaternion const & rhs); + +These return true if and only if `quaternion(lhs) == quaternion(rhs)` is +false. As with any floating-type entity, this is essentially meaningless. + +[h4 Stream Extractor] + + template + ::std::basic_istream& operator >> (::std::basic_istream & is, quaternion & q); + +Extracts a quaternion q of one of the following forms +(with a, b, c and d of type `T`): + +[^a (a), (a,b), (a,b,c), (a,b,c,d) (a,(c)), (a,(c,d)), ((a)), ((a),c), ((a),(c)), ((a),(c,d)), ((a,b)), ((a,b),c), ((a,b),(c)), ((a,b),(c,d))] + +The input values must be convertible to `T`. If bad input is encountered, +calls `is.setstate(ios::failbit)` (which may throw ios::failure (27.4.5.3)). + +[*Returns:] `is`. + +The rationale for the list of accepted formats is that either we have a +list of up to four reals, or else we have a couple of complex numbers, +and in that case if it formated as a proper complex number, then it should +be accepted. Thus potential ambiguities are lifted (for instance (a,b) is +(a,b,0,0) and not (a,0,b,0), i.e. it is parsed as a list of two real numbers +and not two complex numbers which happen to have imaginary parts equal to zero). + +[h4 Stream Inserter] + + template + ::std::basic_ostream& operator << (::std::basic_ostream & os, quaternion const & q); + +Inserts the quaternion q onto the stream `os` as if it were implemented as follows: + + template + ::std::basic_ostream& operator << ( + ::std::basic_ostream & os, + quaternion const & q) + { + ::std::basic_ostringstream s; + + s.flags(os.flags()); + s.imbue(os.getloc()); + s.precision(os.precision()); + + s << '(' << q.R_component_1() << ',' + << q.R_component_2() << ',' + << q.R_component_3() << ',' + << q.R_component_4() << ')'; + + return os << s.str(); + } + +[endsect] + +[section:value_op Quaternion Value Operations] + +[h4 real and unreal] + + template T real(quaternion const & q); + template quaternion unreal(quaternion const & q); + +These return `q.real()` and `q.unreal()` respectively. + +[h4 conj] + + template quaternion conj(quaternion const & q); + +This returns the conjugate of the quaternion. + +[h4 sup] + +template T sup(quaternion const & q); + +This return the sup norm (the greatest among +`abs(q.R_component_1())...abs(q.R_component_4()))` of the quaternion. + +[h4 l1] + + template T l1(quaternion const & q); + +This return the l1 norm `(abs(q.R_component_1())+...+abs(q.R_component_4()))` +of the quaternion. + +[h4 abs] + + template T abs(quaternion const & q); + +This return the magnitude (Euclidian norm) of the quaternion. + +[h4 norm] + + template T norm(quaternionconst & q); + +This return the (Cayley) norm of the quaternion. +The term "norm" might be confusing, as most people associate it with the +Euclidian norm (and quadratic functionals). For this version of +(the mathematical objects known as) quaternions, the Euclidian norm +(also known as magnitude) is the square root of the Cayley norm. + +[endsect] + +[section:create Quaternion Creation Functions] + + template quaternion spherical(T const & rho, T const & theta, T const & phi1, T const & phi2); + template quaternion semipolar(T const & rho, T const & alpha, T const & theta1, T const & theta2); + template quaternion multipolar(T const & rho1, T const & theta1, T const & rho2, T const & theta2); + template quaternion cylindrospherical(T const & t, T const & radius, T const & longitude, T const & latitude); + template quaternion cylindrical(T const & r, T const & angle, T const & h1, T const & h2); + +These build quaternions in a way similar to the way polar builds complex +numbers, as there is no strict equivalent to polar coordinates for quaternions. + +[#boost_quaternions.quaternions.creation_spherical] `spherical` is a simple transposition of `polar`, it takes as inputs +a (positive) magnitude and a point on the hypersphere, given by three angles. +The first of these, `theta` has a natural range of `-pi` to `+pi`, and the other +two have natural ranges of `-pi/2` to `+pi/2` (as is the case with the usual +spherical coordinates in __R3). Due to the many symmetries and periodicities, +nothing untoward happens if the magnitude is negative or the angles are +outside their natural ranges. The expected degeneracies (a magnitude of +zero ignores the angles settings...) do happen however. + +[#boost_quaternions.quaternions.creation_cylindrical] `cylindrical` is likewise a simple transposition of the usual +cylindrical coordinates in __R3, which in turn is another derivative of +planar polar coordinates. The first two inputs are the polar coordinates of +the first __C component of the quaternion. The third and fourth inputs +are placed into the third and fourth __R components of the quaternion, +respectively. + +[#boost_quaternions.quaternions.creation_multipolar] `multipolar` is yet another simple generalization of polar coordinates. +This time, both __C components of the quaternion are given in polar coordinates. + +[#boost_quaternions.quaternions.creation_cylindrospherical] `cylindrospherical` is specific to quaternions. It is often interesting to +consider __H as the cartesian product of __R by __R3 (the quaternionic +multiplication as then a special form, as given here). This function +therefore builds a quaternion from this representation, with the __R3 +component given in usual __R3 spherical coordinates. + +[#boost_quaternions.quaternions.creation_semipolar] `semipolar` is another generator which is specific to quaternions. +It takes as a first input the magnitude of the quaternion, as a +second input an angle in the range `0` to `+pi/2` such that magnitudes +of the first two __C components of the quaternion are the product of the +first input and the sine and cosine of this angle, respectively, and finally +as third and fourth inputs angles in the range `-pi/2` to `+pi/2` which +represent the arguments of the first and second __C components of +the quaternion, respectively. As usual, nothing untoward happens if +what should be magnitudes are negative numbers or angles are out of their +natural ranges, as symmetries and periodicities kick in. + +In this version of our implementation of quaternions, there is no +analogue of the complex value operation `arg` as the situation is +somewhat more complicated. Unit quaternions are linked both to +rotations in __R3 and in __R4, and the correspondences are not too complicated, +but there is currently a lack of standard (de facto or de jure) matrix +library with which the conversions could work. This should be remedied in +a further revision. In the mean time, an example of how this could be +done is presented here for +[@../../../quaternion/HSO3.hpp __R3], and here for +[@../../../quaternion/HSO4.hpp __R4] +([@../../../quaternion/HSO3SO4.cpp example test file]). + +[endsect] + +[section:trans Quaternion Transcendentals] + +There is no `log` or `sqrt` provided for quaternions in this implementation, +and `pow` is likewise restricted to integral powers of the exponent. +There are several reasons to this: on the one hand, the equivalent of +analytic continuation for quaternions ("branch cuts") remains to be +investigated thoroughly (by me, at any rate...), and we wish to avoid the +nonsense introduced in the standard by exponentiations of complexes by +complexes (which is well defined, but not in the standard...). +Talking of nonsense, saying that `pow(0,0)` is "implementation defined" is just +plain brain-dead... + +We do, however provide several transcendentals, chief among which is the +exponential. This author claims the complete proof of the "closed formula" +as his own, as well as its independant invention (there are claims to prior +invention of the formula, such as one by Professor Shoemake, and it is +possible that the formula had been known a couple of centuries back, but in +absence of bibliographical reference, the matter is pending, awaiting further +investigation; on the other hand, the definition and existence of the +exponential on the quaternions, is of course a fact known for a very long time). +Basically, any converging power series with real coefficients which allows for a +closed formula in __C can be transposed to __H. More transcendentals of this +type could be added in a further revision upon request. It should be +noted that it is these functions which force the dependency upon the +[@../../../../../boost/math/special_functions/sinc.hpp boost/math/special_functions/sinc.hpp] and the +[@../../../../../boost/math/special_functions/sinhc.hpp boost/math/special_functions/sinhc.hpp] headers. + +[h4 exp] + + template quaternion exp(quaternion const & q); + +Computes the exponential of the quaternion. + +[h4 cos] + + template quaternion cos(quaternion const & q); + +Computes the cosine of the quaternion + +[h4 sin] + + template quaternion sin(quaternion const & q); + +Computes the sine of the quaternion. + +[h4 tan] + + template quaternion tan(quaternion const & q); + +Computes the tangent of the quaternion. + +[h4 cosh] + + template quaternion cosh(quaternion const & q); + +Computes the hyperbolic cosine of the quaternion. + +[h4 sinh] + + template quaternion sinh(quaternion const & q); + +Computes the hyperbolic sine of the quaternion. + +[h4 tanh] + + template quaternion tanh(quaternion const & q); + +Computes the hyperbolic tangent of the quaternion. + +[h4 pow] + + template quaternion pow(quaternion const & q, int n); + +Computes the n-th power of the quaternion q. + +[endsect] + +[section Test Program] + +The [@../../../quaternion/quaternion_test.cpp quaternion_test.cpp] +test program tests quaternions specializations for float, double and long double +([@../../../quaternion/output.txt sample output], with message output +enabled). + +If you define the symbol boost_quaternions_TEST_VERBOSE, you will get +additional output ([@../../../quaternion/output_more.txt verbose output]); +this will only be helpfull if you enable message output at the same time, +of course (by uncommenting the relevant line in the test or by adding +[^--log_level=messages] to your command line,...). In that case, and if you +are running interactively, you may in addition define the symbol +BOOST_INTERACTIVE_TEST_INPUT_ITERATOR to interactively test the input +operator with input of your choice from the standard input +(instead of hard-coding it in the test). + +[endsect] + +[section:exp The Quaternionic Exponential] + +Please refer to the following PDF's: + +*[@../../../quaternion/TQE.pdf The Quaternionic Exponential (and beyond)] +*[@../../../quaternion/TQE_EA.pdf The Quaternionic Exponential (and beyond) ERRATA & ADDENDA] + +[endsect] + +[section Acknowledgements] + +The mathematical text has been typeset with +[@http://www.nisus-soft.com/ Nisus Writer]. Jens Maurer has helped with +portability and standard adherence, and was the Review Manager +for this library. More acknowledgements in the History section. +Thank you to all who contributed to the discution about this library. + +[endsect] + +[section History] + +* 1.5.8 - 17/12/2005: Converted documentation to Quickbook Format. +* 1.5.7 - 24/02/2003: transitionned to the unit test framework; now included by the library header (rather than the test files). +* 1.5.6 - 15/10/2002: Gcc2.95.x and stlport on linux compatibility by Alkis Evlogimenos (alkis@routescience.com). +* 1.5.5 - 27/09/2002: Microsoft VCPP 7 compatibility, by Michael Stevens (michael@acfr.usyd.edu.au); requires the /Za compiler option. +* 1.5.4 - 19/09/2002: fixed problem with multiple inclusion (in different translation units); attempt at an improved compatibility with Microsoft compilers, by Michael Stevens (michael@acfr.usyd.edu.au) and Fredrik Blomqvist; other compatibility fixes. +* 1.5.3 - 01/02/2002: bugfix and Gcc 2.95.3 compatibility by Douglas Gregor (gregod@cs.rpi.edu). +* 1.5.2 - 07/07/2001: introduced namespace math. +* 1.5.1 - 07/06/2001: (end of Boost review) now includes and instead of ; corrected bug in sin (Daryle Walker); removed check for self-assignment (Gary Powel); made converting functions explicit (Gary Powel); added overflow guards for division operators and abs (Peter Schmitteckert); added sup and l1; used Vesa Karvonen's CPP metaprograming technique to simplify code. +* 1.5.0 - 26/03/2001: boostification, inlining of all operators except input, output and pow, fixed exception safety of some members (template version) and output operator, added spherical, semipolar, multipolar, cylindrospherical and cylindrical. +* 1.4.0 - 09/01/2001: added tan and tanh. +* 1.3.1 - 08/01/2001: cosmetic fixes. +* 1.3.0 - 12/07/2000: pow now uses Maarten Hilferink's (mhilferink@tip.nl) algorithm. +* 1.2.0 - 25/05/2000: fixed the division operators and output; changed many signatures. +* 1.1.0 - 23/05/2000: changed sinc into sinc_pi; added sin, cos, sinh, cosh. +* 1.0.0 - 10/08/1999: first public version. + +[endsect] +[section To Do] + +* Improve testing. +* Rewrite input operatore using Spirit (creates a dependency). +* Put in place an Expression Template mechanism (perhaps borrowing from uBlas). +* Use uBlas for the link with rotations (and move from the +[@../../../quaternion/HSO3SO4.cpp example] +implementation to an efficient one). + +[endsect] +[endsect] diff --git a/doc/sf_and_dist/Jamfile.v2 b/doc/sf_and_dist/Jamfile.v2 index e670d2560..6a764d709 100644 --- a/doc/sf_and_dist/Jamfile.v2 +++ b/doc/sf_and_dist/Jamfile.v2 @@ -61,7 +61,7 @@ boostbook standalone pdf:use.role.for.mediaobject=1 pdf:preferred.mediaobject.role=print pdf:img.src.path=$(images_location)/ - pdf:admon.graphics.path=$(images_location)/../svg-admon/ + pdf:admon.graphics.path=$(images_location)/../../svg-admon/ ; @@ -71,3 +71,4 @@ boostbook standalone + diff --git a/doc/sf_and_dist/svg-admon/caution.svg b/doc/svg-admon/caution.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/caution.svg rename to doc/svg-admon/caution.svg diff --git a/doc/sf_and_dist/svg-admon/home.svg b/doc/svg-admon/home.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/home.svg rename to doc/svg-admon/home.svg diff --git a/doc/sf_and_dist/svg-admon/important.svg b/doc/svg-admon/important.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/important.svg rename to doc/svg-admon/important.svg diff --git a/doc/sf_and_dist/svg-admon/next.svg b/doc/svg-admon/next.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/next.svg rename to doc/svg-admon/next.svg diff --git a/doc/sf_and_dist/svg-admon/note.svg b/doc/svg-admon/note.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/note.svg rename to doc/svg-admon/note.svg diff --git a/doc/sf_and_dist/svg-admon/prev.svg b/doc/svg-admon/prev.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/prev.svg rename to doc/svg-admon/prev.svg diff --git a/doc/sf_and_dist/svg-admon/tip.svg b/doc/svg-admon/tip.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/tip.svg rename to doc/svg-admon/tip.svg diff --git a/doc/sf_and_dist/svg-admon/up.svg b/doc/svg-admon/up.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/up.svg rename to doc/svg-admon/up.svg diff --git a/doc/sf_and_dist/svg-admon/warning.svg b/doc/svg-admon/warning.svg similarity index 100% rename from doc/sf_and_dist/svg-admon/warning.svg rename to doc/svg-admon/warning.svg