versor  3.0
C++11 library for Geometric algebra
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
vsr::algebra< metric_type, value_type > Struct Template Reference


An algebra instance is templated on: More...

#include <vsr_algebra.h>

Public Types

using metric = metric_type
 – Metric, with signature, whether Euclidean, Projective, Conformal, etc
 
using value_t = value_type
 – Field over which Algebra is Defined (e.g. float, double, complex)
 
template<class B >
using mv_t = Multivector< algebra< metric, value_t >, B >
 a multivector is a monadic structure that wraps a basis with a bilinear quadratic form
 
using impl = algebra_impl< algebra< metric, value_t >, metric::is_euclidean, metric::is_conformal >
 implementation details for dealing with conformal vs euclidean etc (in vsr_algebra.h)
 
template<class A , class B >
using sum_basis_t = typename ICat< typename NotType< A, B >::Type, A >::Type
 
template<class A , class B >
using gp_basis_t = typename impl::template gp_arrow_t< A, B >::basis
 
template<class A , class B >
using op_basis_t = typename impl::template op_arrow_t< A, B >::basis
 
template<class A , class B >
using ip_basis_t = typename impl::template ip_arrow_t< A, B >::basis
 
template<class A , class B >
using sum_lift_t = mv_t< sum_basis_t< A, B >>
 
template<class A , class B >
using gp_lift_t = mv_t< gp_basis_t< A, B > >
 
template<class A , class B >
using op_lift_t = mv_t< op_basis_t< A, B > >
 
template<class A , class B >
using ip_lift_t = mv_t< ip_basis_t< A, B > >
 
template<class A , class B >
using sum_t = sum_lift_t< typename A::basis, typename B::basis >
 
template<class A , class B >
using gp_t = gp_lift_t< typename A::basis, typename B::basis >
 
template<class A , class B >
using op_t = op_lift_t< typename A::basis, typename B::basis >
 
template<class A , class B >
using ip_t = ip_lift_t< typename A::basis, typename B::basis >
 
template<typename B1 , typename B2 >
using make_sum = sum_lift_t< B1, B2 >
 make a type from sum of basis B1 and B2
 
template<typename B1 , typename B2 >
using make_gp = gp_lift_t< B1, B2 >
 make a type from geometric product of basis B1 and B2
 
template<typename B1 , typename B2 >
using make_op = op_lift_t< B1, B2 >
 make a type from outer product of basis B1 and B2
 
template<typename B1 , typename B2 >
using make_ip = ip_lift_t< B1, B2 >
 make a type from inner product of basis B1 and B2
 
template<bits::type grade>
using make_grade = mv_t< typename blade< dim, grade >::type >
 make a type from a grade
 
using types = named_types< impl >
 certain prenamed types in euclidean and conformal
 
using up = algebra< typename metric::up, value_t >
 Next Higher Algebra over the same field.
 
using vector_basis = typename blade< dim, 1 >::type
 – 1-blade vector basis (no data)
 
using vec = mv_t< vector_basis >
 – 1-blade vector type (stores data)
 

Static Public Member Functions

template<class B >
static mv_t< B > sum (const mv_t< B > &a, const mv_t< B > &b)
 Sum of Similar types.
 
template<class B >
static mv_t< B > diff (const mv_t< B > &a, const mv_t< B > &b)
 Difference of Similar types.
 
template<class B1 , class B2 >
static mv_t< typename ICat< typename NotType< B1, B2 >::Type, B1 >::Type > sum (const mv_t< B1 > &a, const mv_t< B2 > &b)
 Sum of Different types.
 
template<class B1 , class B2 >
static mv_t< typename ICat< typename NotType< B1, B2 >::Type, B1 >::Type > diff (const mv_t< B1 > &a, const mv_t< B2 > &b)
 Difference of Different types.
 
template<class B >
static mv_t< typename ICat< typename NotType< Basis< 0 >, B >::Type, Basis< 0 > >::Type > sumv (VSR_PRECISION a, const mv_t< B > &b)
 Sum some scalar value.
 
template<class A , class B >
static constexpr auto gp (const A &a, const B &b) -> gp_t< A, B >
 
template<class A , class B >
static constexpr auto op (const A &a, const B &b) -> op_t< A, B >
 
template<class A , class B >
static constexpr auto ip (const A &a, const B &b) -> ip_t< A, B >
 
template<class A , class B >
static constexpr A spin (const A &a, const B &b)
 Spin a by b, return type a.
 
template<class A , class B >
static constexpr A reflect (const A &a, const B &b)
 Reflect a by b, return type a.
 

Static Public Attributes

static const int dim = metric::type::Num
 – Dimension of Algebra (2,3,4,5,etc)
 

Detailed Description

template<class metric_type, class value_type>
struct vsr::algebra< metric_type, value_type >


An algebra instance is templated on:

metric_type: a metric (e.g. Metric<3,0> for euclidean 3 space or Metric<4,1,true> for conformal 5D space ) value_type: a field value type (i.e. real, complex, or some other arithmetic element).

The value type can be anything that commutatively multiplies and adds in a closed group, allowing for tensor metrics C x C, etc a la Bott periodicity.

algebra is a vsr::algebra< vsr::metric< P, Q, bConformal>, value_t> where: P and Q are integers representing the signature of a diagonal metric bConformal is a boolean value specifing whether the metric should be split

For example:

using ega = vsr::algebra< metric<3>, float>;


The documentation for this struct was generated from the following file: