1 #ifndef _GLUCAT_CLIFFORD_ALGEBRA_H 2 #define _GLUCAT_CLIFFORD_ALGEBRA_H 41 template<
typename Scalar_T,
typename Index_Set_T,
typename Multivector_T>
48 typedef std::pair< const index_set_t, Scalar_T >
pair_t;
59 virtual bool operator== (
const Scalar_T& scr)
const =0;
99 virtual Scalar_T
scalar()
const =0;
117 virtual Scalar_T
quad()
const =0;
119 virtual Scalar_T
norm()
const =0;
121 virtual Scalar_T
max_abs()
const =0;
126 virtual bool isnan()
const =0;
128 virtual void write (
const std::string& msg=
"")
const =0;
130 virtual void write (std::ofstream& ofile,
const std::string& msg=
"")
const =0;
133 #ifndef _GLUCAT_CLIFFORD_ALGEBRA_OPERATIONS 134 #define _GLUCAT_CLIFFORD_ALGEBRA_OPERATIONS \ 135 bool operator== (const multivector_t& val) const; \ 136 bool operator== (const Scalar_T& scr) const; \ 137 multivector_t& operator+= (const multivector_t& rhs); \ 138 multivector_t& operator+= (const Scalar_T& scr); \ 139 multivector_t& operator-= (const multivector_t& rhs); \ 140 const multivector_t operator- () const; \ 141 multivector_t& operator*= (const Scalar_T& scr); \ 142 multivector_t& operator*= (const multivector_t& rhs); \ 143 multivector_t& operator%= (const multivector_t& rhs); \ 144 multivector_t& operator&= (const multivector_t& rhs); \ 145 multivector_t& operator^= (const multivector_t& rhs); \ 146 multivector_t& operator/= (const Scalar_T& scr); \ 147 multivector_t& operator/= (const multivector_t& rhs); \ 148 multivector_t& operator|= (const multivector_t& rhs); \ 149 const multivector_t inv () const; \ 150 const multivector_t pow (int m) const; \ 151 const multivector_t outer_pow (int m) const; \ 152 const index_set_t frame() const; \ 153 index_t grade() const; \ 154 Scalar_T operator[] (const index_set_t ist) const; \ 155 const multivector_t operator() (index_t grade) const; \ 156 Scalar_T scalar() const; \ 157 const multivector_t pure() const; \ 158 const multivector_t even() const; \ 159 const multivector_t odd() const; \ 160 const vector_t vector_part() const; \ 161 const vector_t vector_part \ 162 (const index_set_t frm, const bool prechecked = false) const;\ 163 const multivector_t involute() const; \ 164 const multivector_t reverse() const; \ 165 const multivector_t conj() const; \ 166 Scalar_T quad() const; \ 167 Scalar_T norm() const; \ 168 Scalar_T max_abs() const; \ 169 const multivector_t truncated \ 170 (const Scalar_T& limit = Scalar_T(DEFAULT_TRUNCATION)) const;\ 171 bool isnan () const; \ 172 void write (const std::string& msg="") const;\ 173 void write (std::ofstream& ofile, const std::string& msg="") const; 174 #endif // _GLUCAT_CLIFFORD_ALGEBRA_OPERATIONS 179 template<
typename, const index_t, const index_t>
class Multivector,
180 template<
typename, const index_t, const index_t>
class RHS,
184 operator!= (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
189 template<
typename, const index_t, const index_t>
class Multivector,
193 operator!= (
const Multivector<Scalar_T,LO,HI>& lhs,
const Scalar_T& scr);
198 template<
typename, const index_t, const index_t>
class Multivector,
202 operator!= (
const Scalar_T& scr,
const Multivector<Scalar_T,LO,HI>& rhs);
207 template<
typename, const index_t, const index_t>
class Multivector,
210 const Multivector<Scalar_T,LO,HI>
211 operator+ (
const Multivector<Scalar_T,LO,HI>& lhs,
const Scalar_T& scr);
216 template<
typename, const index_t, const index_t>
class Multivector,
219 const Multivector<Scalar_T,LO,HI>
220 operator+ (
const Scalar_T& scr,
const Multivector<Scalar_T,LO,HI>& rhs);
225 template<
typename, const index_t, const index_t>
class Multivector,
226 template<
typename, const index_t, const index_t>
class RHS,
229 const Multivector<Scalar_T,LO,HI>
230 operator+ (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
235 template<
typename, const index_t, const index_t>
class Multivector,
238 const Multivector<Scalar_T,LO,HI>
239 operator- (
const Multivector<Scalar_T,LO,HI>& lhs,
const Scalar_T& scr);
244 template<
typename, const index_t, const index_t>
class Multivector,
247 const Multivector<Scalar_T,LO,HI>
248 operator- (
const Scalar_T& scr,
const Multivector<Scalar_T,LO,HI>& rhs);
253 template<
typename, const index_t, const index_t>
class Multivector,
254 template<
typename, const index_t, const index_t>
class RHS,
257 const Multivector<Scalar_T,LO,HI>
258 operator- (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
263 template<
typename, const index_t, const index_t>
class Multivector,
266 const Multivector<Scalar_T,LO,HI>
267 operator* (
const Multivector<Scalar_T,LO,HI>& lhs,
const Scalar_T& scr);
272 template<
typename, const index_t, const index_t>
class Multivector,
275 const Multivector<Scalar_T,LO,HI>
276 operator* (
const Scalar_T& scr,
const Multivector<Scalar_T,LO,HI>& rhs);
281 template<
typename, const index_t, const index_t>
class Multivector,
282 template<
typename, const index_t, const index_t>
class RHS,
285 const Multivector<Scalar_T,LO,HI>
286 operator* (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
291 template<
typename, const index_t, const index_t>
class Multivector,
292 template<
typename, const index_t, const index_t>
class RHS,
295 const Multivector<Scalar_T,LO,HI>
296 operator^ (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
301 template<
typename, const index_t, const index_t>
class Multivector,
302 template<
typename, const index_t, const index_t>
class RHS,
305 const Multivector<Scalar_T,LO,HI>
306 operator& (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
311 template<
typename, const index_t, const index_t>
class Multivector,
312 template<
typename, const index_t, const index_t>
class RHS,
315 const Multivector<Scalar_T,LO,HI>
316 operator% (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
321 template<
typename, const index_t, const index_t>
class Multivector,
322 template<
typename, const index_t, const index_t>
class RHS,
326 star (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
331 template<
typename, const index_t, const index_t>
class Multivector,
334 const Multivector<Scalar_T,LO,HI>
335 operator/ (
const Multivector<Scalar_T,LO,HI>& lhs,
const Scalar_T& scr);
340 template<
typename, const index_t, const index_t>
class Multivector,
343 const Multivector<Scalar_T,LO,HI>
344 operator/ (
const Scalar_T& scr,
const Multivector<Scalar_T,LO,HI>& rhs);
349 template<
typename, const index_t, const index_t>
class Multivector,
350 template<
typename, const index_t, const index_t>
class RHS,
353 const Multivector<Scalar_T,LO,HI>
354 operator/ (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
359 template<
typename, const index_t, const index_t>
class Multivector,
360 template<
typename, const index_t, const index_t>
class RHS,
363 const Multivector<Scalar_T,LO,HI>
364 operator| (
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
369 template<
typename, const index_t, const index_t>
class Multivector,
372 const Multivector<Scalar_T,LO,HI>
373 inv(
const Multivector<Scalar_T,LO,HI>& val);
378 template<
typename, const index_t, const index_t>
class Multivector,
381 const Multivector<Scalar_T,LO,HI>
382 pow(
const Multivector<Scalar_T,LO,HI>& lhs,
int rhs);
387 template<
typename, const index_t, const index_t>
class Multivector,
388 template<
typename, const index_t, const index_t>
class RHS,
391 const Multivector<Scalar_T,LO,HI>
392 pow(
const Multivector<Scalar_T,LO,HI>& lhs,
const RHS<Scalar_T,LO,HI>& rhs);
395 template<
template<
typename, const index_t, const index_t>
class Multivector,
397 const Multivector<Scalar_T,LO,HI>
398 outer_pow(
const Multivector<Scalar_T,LO,HI>& lhs,
int rhs);
403 template<
typename, const index_t, const index_t>
class Multivector,
407 scalar(
const Multivector<Scalar_T,LO,HI>& val);
412 template<
typename, const index_t, const index_t>
class Multivector,
416 real(
const Multivector<Scalar_T,LO,HI>& val);
421 template<
typename, const index_t, const index_t>
class Multivector,
425 imag(
const Multivector<Scalar_T,LO,HI>& val);
430 template<
typename, const index_t, const index_t>
class Multivector,
433 const Multivector<Scalar_T,LO,HI>
434 pure(
const Multivector<Scalar_T,LO,HI>& val);
439 template<
typename, const index_t, const index_t>
class Multivector,
442 const Multivector<Scalar_T,LO,HI>
443 even(
const Multivector<Scalar_T,LO,HI>& val);
448 template<
typename, const index_t, const index_t>
class Multivector,
451 const Multivector<Scalar_T,LO,HI>
452 odd(
const Multivector<Scalar_T,LO,HI>& val);
457 template<
typename, const index_t, const index_t>
class Multivector,
460 const std::vector<Scalar_T>
461 vector_part(
const Multivector<Scalar_T,LO,HI>& val);
466 template<
typename, const index_t, const index_t>
class Multivector,
469 const Multivector<Scalar_T,LO,HI>
470 involute(
const Multivector<Scalar_T,LO,HI>& val);
475 template<
typename, const index_t, const index_t>
class Multivector,
478 const Multivector<Scalar_T,LO,HI>
479 reverse(
const Multivector<Scalar_T,LO,HI>& val);
484 template<
typename, const index_t, const index_t>
class Multivector,
487 const Multivector<Scalar_T,LO,HI>
488 conj(
const Multivector<Scalar_T,LO,HI>& val);
493 template<
typename, const index_t, const index_t>
class Multivector,
497 quad(
const Multivector<Scalar_T,LO,HI>& val);
502 template<
typename, const index_t, const index_t>
class Multivector,
506 norm(
const Multivector<Scalar_T,LO,HI>& val);
511 template<
typename, const index_t, const index_t>
class Multivector,
515 abs(
const Multivector<Scalar_T,LO,HI>& val);
520 template<
typename, const index_t, const index_t>
class Multivector,
524 max_abs(
const Multivector<Scalar_T,LO,HI>& val);
529 template<
typename, const index_t, const index_t>
class Multivector,
532 const Multivector<Scalar_T,LO,HI>
539 template<
typename, const index_t, const index_t>
class Multivector,
542 const Multivector<Scalar_T,LO,HI>
543 elliptic(
const Multivector<Scalar_T,LO,HI>& val);
548 template<
typename, const index_t, const index_t>
class Multivector,
551 const Multivector<Scalar_T,LO,HI>
552 sqrt(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
557 template<
typename, const index_t, const index_t>
class Multivector,
560 const Multivector<Scalar_T,LO,HI>
561 sqrt(
const Multivector<Scalar_T,LO,HI>& val);
567 <
template<
typename, const index_t, const index_t>
class Multivector,
570 const Multivector<Scalar_T,LO,HI>
576 template<
typename, const index_t, const index_t>
class Multivector,
579 const Multivector<Scalar_T,LO,HI>
580 log(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
585 template<
typename, const index_t, const index_t>
class Multivector,
588 const Multivector<Scalar_T,LO,HI>
589 log(
const Multivector<Scalar_T,LO,HI>& val);
594 template<
typename, const index_t, const index_t>
class Multivector,
597 const Multivector<Scalar_T,LO,HI>
598 cos(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
603 template<
typename, const index_t, const index_t>
class Multivector,
606 const Multivector<Scalar_T,LO,HI>
607 cos(
const Multivector<Scalar_T,LO,HI>& val);
612 template<
typename, const index_t, const index_t>
class Multivector,
615 const Multivector<Scalar_T,LO,HI>
616 acos(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
621 template<
typename, const index_t, const index_t>
class Multivector,
624 const Multivector<Scalar_T,LO,HI>
625 acos(
const Multivector<Scalar_T,LO,HI>& val);
630 template<
typename, const index_t, const index_t>
class Multivector,
633 const Multivector<Scalar_T,LO,HI>
634 cosh(
const Multivector<Scalar_T,LO,HI>& val);
639 template<
typename, const index_t, const index_t>
class Multivector,
642 const Multivector<Scalar_T,LO,HI>
643 acosh(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
648 template<
typename, const index_t, const index_t>
class Multivector,
651 const Multivector<Scalar_T,LO,HI>
652 acosh(
const Multivector<Scalar_T,LO,HI>& val);
657 template<
typename, const index_t, const index_t>
class Multivector,
660 const Multivector<Scalar_T,LO,HI>
661 sin(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
666 template<
typename, const index_t, const index_t>
class Multivector,
669 const Multivector<Scalar_T,LO,HI>
670 sin(
const Multivector<Scalar_T,LO,HI>& val);
675 template<
typename, const index_t, const index_t>
class Multivector,
678 const Multivector<Scalar_T,LO,HI>
679 asin(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
684 template<
typename, const index_t, const index_t>
class Multivector,
687 const Multivector<Scalar_T,LO,HI>
688 asin(
const Multivector<Scalar_T,LO,HI>& val);
693 template<
typename, const index_t, const index_t>
class Multivector,
696 const Multivector<Scalar_T,LO,HI>
697 sinh(
const Multivector<Scalar_T,LO,HI>& val);
702 template<
typename, const index_t, const index_t>
class Multivector,
705 const Multivector<Scalar_T,LO,HI>
706 asinh(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
711 template<
typename, const index_t, const index_t>
class Multivector,
714 const Multivector<Scalar_T,LO,HI>
715 asinh(
const Multivector<Scalar_T,LO,HI>& val);
720 template<
typename, const index_t, const index_t>
class Multivector,
723 const Multivector<Scalar_T,LO,HI>
724 tan(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
729 template<
typename, const index_t, const index_t>
class Multivector,
732 const Multivector<Scalar_T,LO,HI>
733 tan(
const Multivector<Scalar_T,LO,HI>& val);
738 template<
typename, const index_t, const index_t>
class Multivector,
741 const Multivector<Scalar_T,LO,HI>
742 atan(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
747 template<
typename, const index_t, const index_t>
class Multivector,
750 const Multivector<Scalar_T,LO,HI>
751 atan(
const Multivector<Scalar_T,LO,HI>& val);
756 template<
typename, const index_t, const index_t>
class Multivector,
759 const Multivector<Scalar_T,LO,HI>
760 tanh(
const Multivector<Scalar_T,LO,HI>& val);
765 template<
typename, const index_t, const index_t>
class Multivector,
768 const Multivector<Scalar_T,LO,HI>
769 atanh(
const Multivector<Scalar_T,LO,HI>& val,
const Multivector<Scalar_T,LO,HI>&
i,
const bool prechecked =
false);
774 template<
typename, const index_t, const index_t>
class Multivector,
777 const Multivector<Scalar_T,LO,HI>
778 atanh(
const Multivector<Scalar_T,LO,HI>& val);
780 #endif // _GLUCAT_CLIFFORD_ALGEBRA_H virtual const multivector_t involute() const =0
Main involution, each {i} is replaced by -{i} in each term, eg. {1} -> -{1}.
const Multivector< Scalar_T, LO, HI > pure(const Multivector< Scalar_T, LO, HI > &val)
Pure part.
virtual const multivector_t outer_pow(int m) const =0
Outer product power.
Scalar_T star(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Hestenes scalar product.
const Multivector< Scalar_T, LO, HI > sqrt(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Square root of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > acosh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic cosine of multivector with specified complexifier.
virtual const multivector_t inv() const =0
Geometric multiplicative inverse.
const Multivector< Scalar_T, LO, HI > operator/(const Multivector< Scalar_T, LO, HI > &lhs, const Scalar_T &scr)
Quotient of multivector and scalar.
const Multivector< Scalar_T, LO, HI > sinh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic sine of multivector.
Scalar_T abs(const Multivector< Scalar_T, LO, HI > &val)
Absolute value == sqrt(norm)
const Multivector< Scalar_T, LO, HI > operator*(const Multivector< Scalar_T, LO, HI > &lhs, const Scalar_T &scr)
Product of multivector and scalar.
const Multivector< Scalar_T, LO, HI > log(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Natural logarithm of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > conj(const Multivector< Scalar_T, LO, HI > &val)
Conjugation, rev o invo == invo o rev.
virtual multivector_t & operator|=(const multivector_t &rhs)=0
Transformation via twisted adjoint action.
virtual multivector_t & operator*=(const Scalar_T &scr)=0
Product of multivector and scalar.
virtual Scalar_T max_abs() const =0
Maximum of absolute values of components of multivector: multivector infinity norm.
clifford_algebra<> declares the operations of a Clifford algebra
virtual const multivector_t even() const =0
Even part of multivector, sum of even grade terms.
virtual multivector_t & operator/=(const Scalar_T &scr)=0
Quotient of multivector and scalar.
virtual const multivector_t odd() const =0
Odd part of multivector, sum of odd grade terms.
Scalar_T quad(const Multivector< Scalar_T, LO, HI > &val)
Scalar_T quadratic form == (rev(x)*x)(0)
virtual const multivector_t pow(int m) const =0
*this to the m
Scalar_T norm(const Multivector< Scalar_T, LO, HI > &val)
Scalar_T norm == sum of norm of coordinates.
const Multivector< Scalar_T, LO, HI > odd(const Multivector< Scalar_T, LO, HI > &val)
Odd part.
virtual const index_set_t frame() const =0
Subalgebra generated by all generators of terms of given multivector.
const Multivector< Scalar_T, LO, HI > clifford_exp(const Multivector< Scalar_T, LO, HI > &val)
Exponential of multivector.
virtual multivector_t & operator &=(const multivector_t &rhs)=0
Inner product.
const Multivector< Scalar_T, LO, HI > pow(const Multivector< Scalar_T, LO, HI > &lhs, int rhs)
Integer power of multivector.
Multivector_T multivector_t
virtual const multivector_t conj() const =0
Conjugation, reverse o involute == involute o reverse.
Scalar_T imag(const Multivector< Scalar_T, LO, HI > &val)
Imaginary part: deprecated (always 0)
static const std::string classname()
const Multivector< Scalar_T, LO, HI > outer_pow(const Multivector< Scalar_T, LO, HI > &lhs, int rhs)
Outer product power of multivector.
const Multivector< Scalar_T, LO, HI > operator^(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Outer product.
virtual void write(const std::string &msg="") const =0
Write formatted multivector to output.
const Multivector< Scalar_T, LO, HI > sin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Sine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > elliptic(const Multivector< Scalar_T, LO, HI > &val)
virtual bool operator==(const multivector_t &val) const =0
Test for equality of multivectors.
const std::vector< Scalar_T > vector_part(const Multivector< Scalar_T, LO, HI > &val)
Vector part of multivector, as a vector_t with respect to frame()
const Multivector< Scalar_T, LO, HI > atanh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic tangent of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > reverse(const Multivector< Scalar_T, LO, HI > &val)
Reversion, eg. {1}*{2} -> {2}*{1}.
virtual multivector_t & operator+=(const multivector_t &rhs)=0
Geometric sum.
const Multivector< Scalar_T, LO, HI > cos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Cosine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > tanh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic tangent of multivector.
const Multivector< Scalar_T, LO, HI > operator+(const Multivector< Scalar_T, LO, HI > &lhs, const Scalar_T &scr)
Geometric sum of multivector and scalar.
virtual Scalar_T norm() const =0
Scalar_T norm == sum of norm of coordinates.
std::vector< Scalar_T > vector_t
std::pair< const index_set_t, Scalar_T > pair_t
virtual Scalar_T scalar() const =0
Scalar part.
const Multivector< Scalar_T, LO, HI > inv(const Multivector< Scalar_T, LO, HI > &val)
Geometric multiplicative inverse.
const Multivector< Scalar_T, LO, HI > operator%(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Left contraction.
virtual const multivector_t pure() const =0
Pure part.
virtual const multivector_t operator-() const =0
Unary -.
const Multivector< Scalar_T, LO, HI > asin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse sine of multivector with specified complexifier.
Scalar_T scalar(const Multivector< Scalar_T, LO, HI > &val)
Scalar part.
virtual bool isnan() const =0
Check if a multivector contains any IEEE NaN values.
virtual Scalar_T operator[](const index_set_t ist) const =0
Subscripting: map from index set to scalar coordinate.
virtual multivector_t & operator-=(const multivector_t &rhs)=0
Geometric difference.
virtual const vector_t vector_part() const =0
Vector part of multivector, as a vector_t with respect to frame()
const Multivector< Scalar_T, LO, HI > complexifier(const Multivector< Scalar_T, LO, HI > &val)
Square root of -1 which commutes with all members of the frame of the given multivector.
const Multivector< Scalar_T, LO, HI > involute(const Multivector< Scalar_T, LO, HI > &val)
Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1}) ...
const Multivector< Scalar_T, LO, HI > atan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse tangent of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > tan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Tangent of multivector with specified complexifier.
virtual const multivector_t reverse() const =0
Reversion, eg. {1}*{2} -> {2}*{1}.
Scalar_T real(const Multivector< Scalar_T, LO, HI > &val)
Real part: synonym for scalar part.
const Multivector< Scalar_T, LO, HI > operator|(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Transformation via twisted adjoint action.
virtual multivector_t & operator^=(const multivector_t &rhs)=0
Outer product.
virtual const multivector_t truncated(const Scalar_T &limit=Scalar_T(DEFAULT_TRUNCATION)) const =0
Remove all terms with relative size smaller than limit.
const Multivector< Scalar_T, LO, HI > acos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse cosine of multivector with specified complexifier.
virtual ~clifford_algebra()
const Multivector< Scalar_T, LO, HI > asinh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic sine of multivector with specified complexifier.
int index_t
Size of index_t should be enough to represent LO, HI.
const Multivector< Scalar_T, LO, HI > operator &(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Inner product.
Scalar_T max_abs(const Multivector< Scalar_T, LO, HI > &val)
Maximum of absolute values of components of multivector: multivector infinity norm.
virtual index_t grade() const =0
Maximum of the grades of each term.
const Multivector< Scalar_T, LO, HI > cosh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic cosine of multivector.
bool operator!=(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Test for inequality of multivectors.
virtual const multivector_t operator()(index_t grade) const =0
Pure grade-vector part.
virtual Scalar_T quad() const =0
Scalar_T quadratic form == (rev(x)*x)(0)
const double DEFAULT_TRUNCATION
Default for truncation.
const Multivector< Scalar_T, LO, HI > even(const Multivector< Scalar_T, LO, HI > &val)
Even part.
virtual multivector_t & operator%=(const multivector_t &rhs)=0
Contraction.
const Multivector< Scalar_T, LO, HI > operator-(const Multivector< Scalar_T, LO, HI > &lhs, const Scalar_T &scr)
Geometric difference of multivector and scalar.