Speclib  0.1.2
The library for writing better CUDA libraries
Complex Numbers

Primitives for representing complex numbers. More...

Classes

class  sp::Complex< T >
 A complex number of type T. More...
 
struct  sp::UnitQuaternions< T >
 A container for the four basis unit quaternions. More...
 
struct  sp::UnitOctonions< T >
 A container for the eight basis unit octonions. More...
 

Typedefs

template<typename T >
using sp::Quaternion = Complex< Complex< T > >
 sp::Quaternion<T> is a shorthand for sp::Complex<sp::Complex<T>>. More...
 
template<typename T >
using sp::Octonion = Complex< Complex< Complex< T > > >
 sp::Octonion<T> is a shorthand for sp::Complex<sp::Complex<sp::Complex<T>>>. More...
 

Detailed Description

Primitives for representing complex numbers.

Typedef Documentation

◆ Octonion

template<typename T >
using sp::Octonion = typedef Complex<Complex<Complex<T> >>

sp::Octonion<T> is a shorthand for sp::Complex<sp::Complex<sp::Complex<T>>>.

Note that octonion multiplication is neither commutative nor associative.

◆ Quaternion

template<typename T >
using sp::Quaternion = typedef Complex<Complex<T> >

sp::Quaternion<T> is a shorthand for sp::Complex<sp::Complex<T>>.

Note that unlike complex numbers, quaternions have non-commutative multiplication.

auto q = 3 - 5*i + 7*j - 11*k;
A container for the four basis unit quaternions.
Definition: Complex.hpp:449