glucat  0.12.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Friends | List of all members
glucat::framed_multi< Scalar_T, LO, HI, Tune_P > Class Template Reference

A framed_multi<Scalar_T,LO,HI,Tune_P> is a framed approximation to a multivector. More...

#include <framed_multi.h>

Inheritance diagram for glucat::framed_multi< Scalar_T, LO, HI, Tune_P >:
Inheritance graph
[legend]
Collaboration diagram for glucat::framed_multi< Scalar_T, LO, HI, Tune_P >:
Collaboration graph
[legend]

Classes

class  hash_size_t
 
class  var_term
 Variable term. More...
 

Public Types

using multivector_t = framed_multi
 
using framed_multi_t = multivector_t
 
using scalar_t = Scalar_T
 
using tune_p = Tune_P
 
using index_set_t = index_set< LO, HI >
 
using term_t = std::pair< const index_set_t, Scalar_T >
 
using vector_t = std::vector< Scalar_T >
 
using error_t = error< multivector_t >
 
using matrix_multi_t = matrix_multi< Scalar_T, LO, HI, Tune_P >
 
- Public Types inherited from glucat::clifford_algebra< Scalar_T, index_set< LO, HI >, framed_multi< Scalar_T, LO, HI, Tune_P > >
using scalar_t = Scalar_T
 
using index_set_t = index_set< LO, HI >
 
using multivector_t = framed_multi< Scalar_T, LO, HI, Tune_P >
 
using pair_t = std::pair< const index_set_t, Scalar_T >
 
using vector_t = std::vector< Scalar_T >
 

Public Member Functions

 ~framed_multi () override=default
 Destructor. More...
 
 framed_multi ()
 Default constructor. More...
 
template<typename Other_Scalar_T >
 framed_multi (const framed_multi< Other_Scalar_T, LO, HI, Tune_P > &val)
 Construct a multivector from a multivector with a different scalar type. More...
 
template<typename Other_Scalar_T >
 framed_multi (const framed_multi< Other_Scalar_T, LO, HI, Tune_P > &val, const index_set_t frm, const bool prechecked=false)
 Construct a multivector, within a given frame, from a given multivector. More...
 
 framed_multi (const framed_multi_t &val, const index_set_t frm, const bool prechecked=false)
 Construct a multivector, within a given frame, from a given multivector. More...
 
 framed_multi (const index_set_t ist, const Scalar_T &crd=Scalar_T(1))
 Construct a multivector from an index set and a scalar coordinate. More...
 
 framed_multi (const index_set_t ist, const Scalar_T &crd, const index_set_t frm, const bool prechecked=false)
 Construct a multivector, within a given frame, from an index set and a scalar coordinate. More...
 
 framed_multi (const Scalar_T &scr, const index_set_t frm=index_set_t())
 Construct a multivector from a scalar (within a frame, if given) More...
 
 framed_multi (const int scr, const index_set_t frm=index_set_t())
 Construct a multivector from an int (within a frame, if given) More...
 
 framed_multi (const vector_t &vec, const index_set_t frm, const bool prechecked=false)
 Construct a multivector, within a given frame, from a given vector. More...
 
 framed_multi (const std::string &str)
 Construct a multivector from a string: eg: "3+2{1,2}-6.1e-2{2,3}". More...
 
 framed_multi (const std::string &str, const index_set_t frm, const bool prechecked=false)
 Construct a multivector, within a given frame, from a string: eg: "3+2{1,2}-6.1e-2{2,3}". More...
 
 framed_multi (const char *str)
 Construct a multivector from a char*: eg: "3+2{1,2}-6.1e-2{2,3}". More...
 
 framed_multi (const char *str, const index_set_t frm, const bool prechecked=false)
 Construct a multivector, within a given frame, from a char*: eg: "3+2{1,2}-6.1e-2{2,3}". More...
 
template<typename Other_Scalar_T >
 framed_multi (const matrix_multi< Other_Scalar_T, LO, HI, Tune_P > &val)
 Construct a multivector from a matrix_multi_t. More...
 
template<typename Other_Scalar_T >
auto fast_matrix_multi (const index_set_t frm) const -> const matrix_multi< Other_Scalar_T, LO, HI, Tune_P >
 Use generalized FFT to construct a matrix_multi_t. More...
 
auto fast_framed_multi () const -> const framed_multi_t
 Use inverse generalized FFT to construct a framed_multi_t. More...
 
_GLUCAT_CLIFFORD_ALGEBRA_OPERATIONS auto nbr_terms () const -> unsigned long
 Number of terms. More...
 
auto operator+= (const term_t &term) -> multivector_t &
 Add a term, if non-zero. More...
 
- Public Member Functions inherited from glucat::clifford_algebra< Scalar_T, index_set< LO, HI >, framed_multi< Scalar_T, LO, HI, Tune_P > >
virtual ~clifford_algebra ()=default
 
virtual auto operator== (const multivector_t &val) const -> bool=0
 Test for equality of multivectors. More...
 
virtual auto operator== (const Scalar_T &scr) const -> bool=0
 Test for equality of multivector and scalar. More...
 
virtual auto operator+= (const multivector_t &rhs) -> multivector_t &=0
 Geometric sum. More...
 
virtual auto operator+= (const Scalar_T &scr) -> multivector_t &=0
 Geometric sum of multivector and scalar. More...
 
virtual auto operator-= (const multivector_t &rhs) -> multivector_t &=0
 Geometric difference. More...
 
virtual auto operator-= (const Scalar_T &scr) -> multivector_t &=0
 Geometric difference of multivector and scalar. More...
 
virtual auto operator- () const -> const multivector_t=0
 Unary -. More...
 
virtual auto operator*= (const Scalar_T &scr) -> multivector_t &=0
 Product of multivector and scalar. More...
 
virtual auto operator*= (const multivector_t &rhs) -> multivector_t &=0
 Geometric product. More...
 
virtual auto operator%= (const multivector_t &rhs) -> multivector_t &=0
 Contraction. More...
 
virtual auto operator&= (const multivector_t &rhs) -> multivector_t &=0
 Inner product. More...
 
virtual auto operator^= (const multivector_t &rhs) -> multivector_t &=0
 Outer product. More...
 
virtual auto operator/= (const Scalar_T &scr) -> multivector_t &=0
 Quotient of multivector and scalar. More...
 
virtual auto operator/= (const multivector_t &rhs) -> multivector_t &=0
 Geometric quotient. More...
 
virtual auto operator|= (const multivector_t &rhs) -> multivector_t &=0
 Transformation via twisted adjoint action. More...
 
virtual auto inv () const -> const multivector_t=0
 Geometric multiplicative inverse. More...
 
virtual auto pow (int m) const -> const multivector_t=0
 *this to the m More...
 
virtual auto outer_pow (int m) const -> const multivector_t=0
 Outer product power. More...
 
virtual auto frame () const -> const index_set_t=0
 Subalgebra generated by all generators of terms of given multivector. More...
 
virtual auto grade () const -> index_t=0
 Maximum of the grades of each term. More...
 
virtual auto operator[] (const index_set_t ist) const -> Scalar_T=0
 Subscripting: map from index set to scalar coordinate. More...
 
virtual auto operator() (index_t grade) const -> const multivector_t=0
 Pure grade-vector part. More...
 
virtual auto scalar () const -> Scalar_T=0
 Scalar part. More...
 
virtual auto pure () const -> const multivector_t=0
 Pure part. More...
 
virtual auto even () const -> const multivector_t=0
 Even part of multivector, sum of even grade terms. More...
 
virtual auto odd () const -> const multivector_t=0
 Odd part of multivector, sum of odd grade terms. More...
 
virtual auto vector_part () const -> const vector_t=0
 Vector part of multivector, as a vector_t with respect to frame() More...
 
virtual auto vector_part (const index_set_t frm, const bool prechecked) const -> const vector_t=0
 Vector part of multivector, as a vector_t with respect to frm. More...
 
virtual auto involute () const -> const multivector_t=0
 Main involution, each {i} is replaced by -{i} in each term, eg. {1} -> -{1}. More...
 
virtual auto reverse () const -> const multivector_t=0
 Reversion, eg. {1}*{2} -> {2}*{1}. More...
 
virtual auto conj () const -> const multivector_t=0
 Conjugation, reverse o involute == involute o reverse. More...
 
virtual auto quad () const -> Scalar_T=0
 Scalar_T quadratic form == (rev(x)*x)(0) More...
 
virtual auto norm () const -> Scalar_T=0
 Scalar_T norm == sum of norm of coordinates. More...
 
virtual auto max_abs () const -> Scalar_T=0
 Maximum of absolute values of components of multivector: multivector infinity norm. More...
 
virtual auto truncated (const Scalar_T &limit=default_truncation) const -> const multivector_t=0
 Remove all terms with relative size smaller than limit. More...
 
virtual auto isinf () const -> bool=0
 Check if a multivector contains any infinite values. More...
 
virtual auto isnan () const -> bool=0
 Check if a multivector contains any IEEE NaN values. More...
 
virtual void write (const std::string &msg="") const=0
 Write formatted multivector to output. More...
 
virtual void write (std::ofstream &ofile, const std::string &msg="") const=0
 Write formatted multivector to file. More...
 

Static Public Member Functions

static auto classname () -> const std::string
 Class name used in messages. More...
 
static auto random (const index_set_t frm, Scalar_T fill=Scalar_T(1)) -> const multivector_t
 Random multivector within a frame. More...
 
- Static Public Member Functions inherited from glucat::clifford_algebra< Scalar_T, index_set< LO, HI >, framed_multi< Scalar_T, LO, HI, Tune_P > >
static auto classname () -> const std::string
 

Private Types

using var_term_t = class var_term
 
using matrix_t = typename matrix_multi_t::matrix_t
 
using sorted_map_t = std::map< index_set_t, Scalar_T, std::less< const index_set_t > >
 
using map_t = std::unordered_map< index_set_t, Scalar_T, index_set_hash< LO, HI > >
 
using framed_pair_t = std::pair< const multivector_t, const multivector_t >
 
using size_type = typename map_t::size_type
 
using iterator = typename map_t::iterator
 
using const_iterator = typename map_t::const_iterator
 

Private Member Functions

 framed_multi (const hash_size_t &hash_size)
 Private constructor using hash_size. More...
 
auto fold (const index_set_t frm) const -> multivector_t
 Subalgebra isomorphism: fold each term within the given frame. More...
 
auto unfold (const index_set_t frm) const -> multivector_t
 Subalgebra isomorphism: unfold each term within the given frame. More...
 
auto centre_pm4_qp4 (index_t &p, index_t &q) -> multivector_t &
 Subalgebra isomorphism: R_{p,q} to R_{p-4,q+4}. More...
 
auto centre_pp4_qm4 (index_t &p, index_t &q) -> multivector_t &
 Subalgebra isomorphism: R_{p,q} to R_{p+4,q-4}. More...
 
auto centre_qp1_pm1 (index_t &p, index_t &q) -> multivector_t &
 Subalgebra isomorphism: R_{p,q} to R_{q+1,p-1}. More...
 
auto divide (const index_set_t ist) const -> const framed_pair_t
 Divide multivector into part divisible by index_set and remainder. More...
 
auto fast (const index_t level, const bool odd) const -> const matrix_t
 Generalized FFT from multivector_t to matrix_t. More...
 

Friends

template<typename Other_Scalar_T , const index_t Other_LO, const index_t Other_HI, typename Other_Tune_P >
class matrix_multi
 
template<typename Other_Scalar_T , const index_t Other_LO, const index_t Other_HI, typename Other_Tune_P >
class framed_multi
 
auto operator* (const multivector_t &lhs, const multivector_t &rhs) -> const multivector_t
 
auto operator^ (const multivector_t &lhs, const multivector_t &rhs) -> const multivector_t
 
auto operator & (const multivector_t &lhs, const multivector_t &rhs) -> const multivector_t
 
auto operator% (const multivector_t &lhs, const multivector_t &rhs) -> const multivector_t
 
auto star (const multivector_t &lhs, const multivector_t &rhs) -> Scalar_T
 
auto operator/ (const multivector_t &lhs, const multivector_t &rhs) -> const multivector_t
 
auto operator| (const multivector_t &lhs, const multivector_t &rhs) -> const multivector_t
 
auto operator>> (std::istream &s, multivector_t &val) -> std::istream &
 
auto operator<< (std::ostream &os, const multivector_t &val) -> std::ostream &
 
auto operator<< (std::ostream &os, const term_t &term) -> std::ostream &
 
auto exp (const multivector_t &val) -> const multivector_t
 

Additional Inherited Members

- Static Public Attributes inherited from glucat::clifford_algebra< Scalar_T, index_set< LO, HI >, framed_multi< Scalar_T, LO, HI, Tune_P > >
static const index_t v_lo
 
static const index_t v_hi
 
static const Scalar_T default_truncation
 Default for truncation. More...
 

Detailed Description

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
class glucat::framed_multi< Scalar_T, LO, HI, Tune_P >

A framed_multi<Scalar_T,LO,HI,Tune_P> is a framed approximation to a multivector.

Definition at line 56 of file framed_multi.h.

Member Typedef Documentation

◆ const_iterator

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::const_iterator = typename map_t::const_iterator
private

Definition at line 167 of file framed_multi.h.

◆ error_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::error_t = error<multivector_t>

Definition at line 138 of file framed_multi.h.

◆ framed_multi_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi_t = multivector_t

Definition at line 132 of file framed_multi.h.

◆ framed_pair_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_pair_t = std::pair<const multivector_t, const multivector_t>
private

Definition at line 164 of file framed_multi.h.

◆ index_set_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::index_set_t = index_set<LO, HI>

Definition at line 135 of file framed_multi.h.

◆ iterator

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::iterator = typename map_t::iterator
private

Definition at line 166 of file framed_multi.h.

◆ map_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::map_t = std::unordered_map<index_set_t, Scalar_T, index_set_hash<LO, HI> >
private

Definition at line 150 of file framed_multi.h.

◆ matrix_multi_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::matrix_multi_t = matrix_multi<Scalar_T,LO,HI,Tune_P >

Definition at line 139 of file framed_multi.h.

◆ matrix_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::matrix_t = typename matrix_multi_t::matrix_t
private

Definition at line 148 of file framed_multi.h.

◆ multivector_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::multivector_t = framed_multi

Definition at line 131 of file framed_multi.h.

◆ scalar_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::scalar_t = Scalar_T

Definition at line 133 of file framed_multi.h.

◆ size_type

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::size_type = typename map_t::size_type
private

Definition at line 165 of file framed_multi.h.

◆ sorted_map_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::sorted_map_t = std::map< index_set_t, Scalar_T, std::less<const index_set_t> >
private

Definition at line 149 of file framed_multi.h.

◆ term_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::term_t = std::pair<const index_set_t, Scalar_T>

Definition at line 136 of file framed_multi.h.

◆ tune_p

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::tune_p = Tune_P

Definition at line 134 of file framed_multi.h.

◆ var_term_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::var_term_t = class var_term
private

Definition at line 147 of file framed_multi.h.

◆ vector_t

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
using glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::vector_t = std::vector<Scalar_T>

Definition at line 137 of file framed_multi.h.

Constructor & Destructor Documentation

◆ ~framed_multi()

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::~framed_multi ( )
overridedefault

Destructor.

◆ framed_multi() [1/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( )

Default constructor.

Definition at line 60 of file framed_multi_imp.h.

Referenced by glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi().

◆ framed_multi() [2/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const hash_size_t hash_size)
private

Private constructor using hash_size.

Definition at line 67 of file framed_multi_imp.h.

◆ framed_multi() [3/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
template<typename Other_Scalar_T >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const framed_multi< Other_Scalar_T, LO, HI, Tune_P > &  val)

Construct a multivector from a multivector with a different scalar type.

Definition at line 75 of file framed_multi_imp.h.

◆ framed_multi() [4/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
template<typename Other_Scalar_T >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const framed_multi< Other_Scalar_T, LO, HI, Tune_P > &  val,
const index_set_t  frm,
const bool  prechecked = false 
)

Construct a multivector, within a given frame, from a given multivector.

Definition at line 86 of file framed_multi_imp.h.

References glucat::clifford_algebra< Scalar_T, index_set< LO, HI >, framed_multi< Scalar_T, LO, HI, Tune_P > >::frame().

◆ framed_multi() [5/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const framed_multi_t val,
const index_set_t  frm,
const bool  prechecked = false 
)

Construct a multivector, within a given frame, from a given multivector.

Definition at line 99 of file framed_multi_imp.h.

References glucat::clifford_algebra< Scalar_T, Index_Set_T, Multivector_T >::frame().

◆ framed_multi() [6/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const index_set_t  ist,
const Scalar_T &  crd = Scalar_T(1) 
)

Construct a multivector from an index set and a scalar coordinate.

Definition at line 112 of file framed_multi_imp.h.

References PyClical::ist.

◆ framed_multi() [7/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const index_set_t  ist,
const Scalar_T &  crd,
const index_set_t  frm,
const bool  prechecked = false 
)

Construct a multivector, within a given frame, from an index set and a scalar coordinate.

Definition at line 122 of file framed_multi_imp.h.

References PyClical::ist.

◆ framed_multi() [8/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const Scalar_T &  scr,
const index_set_t  frm = index_set_t() 
)

Construct a multivector from a scalar (within a frame, if given)

Definition at line 135 of file framed_multi_imp.h.

◆ framed_multi() [9/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const int  scr,
const index_set_t  frm = index_set_t() 
)

Construct a multivector from an int (within a frame, if given)

Definition at line 145 of file framed_multi_imp.h.

◆ framed_multi() [10/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const vector_t vec,
const index_set_t  frm,
const bool  prechecked = false 
)

Construct a multivector, within a given frame, from a given vector.

Definition at line 155 of file framed_multi_imp.h.

References glucat::index_set< LO, HI >::count(), glucat::index_set< LO, HI >::max(), and glucat::index_set< LO, HI >::min().

◆ framed_multi() [11/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const std::string &  str)

Construct a multivector from a string: eg: "3+2{1,2}-6.1e-2{2,3}".

Definition at line 177 of file framed_multi_imp.h.

◆ framed_multi() [12/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const std::string &  str,
const index_set_t  frm,
const bool  prechecked = false 
)

Construct a multivector, within a given frame, from a string: eg: "3+2{1,2}-6.1e-2{2,3}".

Definition at line 193 of file framed_multi_imp.h.

◆ framed_multi() [13/15]

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const char *  str)
inline

Construct a multivector from a char*: eg: "3+2{1,2}-6.1e-2{2,3}".

Definition at line 209 of file framed_multi.h.

References glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi().

◆ framed_multi() [14/15]

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const char *  str,
const index_set_t  frm,
const bool  prechecked = false 
)
inline

Construct a multivector, within a given frame, from a char*: eg: "3+2{1,2}-6.1e-2{2,3}".

Definition at line 212 of file framed_multi.h.

References glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi().

◆ framed_multi() [15/15]

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
template<typename Other_Scalar_T >
glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi ( const matrix_multi< Other_Scalar_T, LO, HI, Tune_P > &  val)

Member Function Documentation

◆ centre_pm4_qp4()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::centre_pm4_qp4 ( index_t p,
index_t q 
) -> multivector_t&
private

Subalgebra isomorphism: R_{p,q} to R_{p-4,q+4}.

Definition at line 1470 of file framed_multi_imp.h.

References PyClical::ist.

Referenced by glucat::matrix_multi< Scalar_T, LO, HI, Tune_P >::fast_framed_multi().

◆ centre_pp4_qm4()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::centre_pp4_qm4 ( index_t p,
index_t q 
) -> multivector_t&
private

Subalgebra isomorphism: R_{p,q} to R_{p+4,q-4}.

Definition at line 1512 of file framed_multi_imp.h.

References PyClical::ist.

Referenced by glucat::matrix_multi< Scalar_T, LO, HI, Tune_P >::fast_framed_multi().

◆ centre_qp1_pm1()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::centre_qp1_pm1 ( index_t p,
index_t q 
) -> multivector_t&
private

Subalgebra isomorphism: R_{p,q} to R_{q+1,p-1}.

Definition at line 1554 of file framed_multi_imp.h.

References PyClical::ist.

Referenced by glucat::matrix_multi< Scalar_T, LO, HI, Tune_P >::fast_framed_multi().

◆ classname()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::classname ( ) -> const std::string
static

Class name used in messages.

Definition at line 51 of file framed_multi_imp.h.

◆ divide()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::divide ( const index_set_t  ist) const -> const framed_pair_t
private

Divide multivector into part divisible by index_set and remainder.

Divide multivector into quotient with terms divisible by index set, and remainder.

Definition at line 1587 of file framed_multi_imp.h.

References PyClical::ist.

◆ fast()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::fast ( const index_t  level,
const bool  odd 
) const -> const matrix_t
private

Generalized FFT from multivector_t to matrix_t.

Definition at line 1603 of file framed_multi_imp.h.

References glucat::matrix::kron(), glucat::odd(), and glucat::scalar().

◆ fast_framed_multi()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::fast_framed_multi ( ) const -> const framed_multi_t
inline

Use inverse generalized FFT to construct a framed_multi_t.

Definition at line 1701 of file framed_multi_imp.h.

◆ fast_matrix_multi()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
template<typename Other_Scalar_T >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::fast_matrix_multi ( const index_set_t  frm) const -> const matrix_multi<Other_Scalar_T,LO,HI,Tune_P >

Use generalized FFT to construct a matrix_multi_t.

Definition at line 1669 of file framed_multi_imp.h.

References glucat::gen::offset_to_super, and glucat::pos_mod().

◆ fold()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::fold ( const index_set_t  frm) const -> multivector_t
private

Subalgebra isomorphism: fold each term within the given frame.

Definition at line 1435 of file framed_multi_imp.h.

◆ nbr_terms()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::nbr_terms ( ) const -> unsigned long

Number of terms.

Definition at line 1357 of file framed_multi_imp.h.

◆ operator+=()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::operator+= ( const term_t term) -> multivector_t&
inline

Add a term, if non-zero.

Insert a term into a multivector, add terms with same index set.

Geometric sum.

Geometric sum of multivector and scalar.

Definition at line 296 of file framed_multi_imp.h.

◆ random()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::random ( const index_set_t  frm,
Scalar_T  fill = Scalar_T(1) 
) -> const multivector_t
static

Random multivector within a frame.

Definition at line 1059 of file framed_multi_imp.h.

References PyClical::fill, and glucat::sqrt().

Referenced by glucat::matrix_multi< Scalar_T, LO, HI, Tune_P >::random().

◆ unfold()

template<typename Scalar_T , const index_t LO, const index_t HI, typename Tune_P >
auto glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::unfold ( const index_set_t  frm) const -> multivector_t
private

Subalgebra isomorphism: unfold each term within the given frame.

Definition at line 1452 of file framed_multi_imp.h.

Referenced by glucat::matrix_multi< Scalar_T, LO, HI, Tune_P >::fast_framed_multi().

Friends And Related Function Documentation

◆ exp

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto exp ( const multivector_t val) -> const multivector_t
friend

◆ framed_multi

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
template<typename Other_Scalar_T , const index_t Other_LO, const index_t Other_HI, typename Other_Tune_P >
friend class framed_multi
friend

Definition at line 143 of file framed_multi.h.

◆ matrix_multi

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
template<typename Other_Scalar_T , const index_t Other_LO, const index_t Other_HI, typename Other_Tune_P >
friend class matrix_multi
friend

Definition at line 141 of file framed_multi.h.

◆ operator &

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator& ( const multivector_t lhs,
const multivector_t rhs 
) -> const multivector_t
friend

◆ operator%

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator% ( const multivector_t lhs,
const multivector_t rhs 
) -> const multivector_t
friend

◆ operator*

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator* ( const multivector_t lhs,
const multivector_t rhs 
) -> const multivector_t
friend

◆ operator/

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator/ ( const multivector_t lhs,
const multivector_t rhs 
) -> const multivector_t
friend

◆ operator<< [1/2]

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator<< ( std::ostream &  os,
const multivector_t val 
) -> std::ostream &
friend

◆ operator<< [2/2]

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator<< ( std::ostream &  os,
const term_t term 
) -> std::ostream &
friend

◆ operator>>

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator>> ( std::istream &  s,
multivector_t val 
) -> std::istream &
friend

◆ operator^

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator^ ( const multivector_t lhs,
const multivector_t rhs 
) -> const multivector_t
friend

◆ operator|

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto operator| ( const multivector_t lhs,
const multivector_t rhs 
) -> const multivector_t
friend

◆ star

template<typename Scalar_T = double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI, typename Tune_P = tuning<>>
auto star ( const multivector_t lhs,
const multivector_t rhs 
) -> Scalar_T
friend

The documentation for this class was generated from the following files: