58 template <
typename Scalar_T>
68 template<
typename Index_Set_T>
71 std::ostringstream os;
72 os <<
"index_set(" << ist <<
")";
77 template<
typename Index_Set_T>
80 std::ostringstream os;
86 template<
typename Multivector_T>
90 std::ostringstream os;
91 os << std::setprecision(std::numeric_limits<scalar_t>::digits10 + 1);
92 os <<
"clifford(\"" << mv <<
"\")";
97 template<
typename Multivector_T>
101 std::ostringstream os;
102 if (
abs(mv) < std::numeric_limits<scalar_t>::epsilon())
105 os << std::setprecision(4) << mv.truncated(
scalar_t(1.0
e-4));
114 template<
typename Multivector_T>
115 inline Multivector_T
cga3(
const Multivector_T& x)
117 typedef Multivector_T
cl;
118 typedef typename cl::index_set_t
ist;
121 return (
cl(
ist(4)) - x) * ninf3 * (x -
cl(
ist(4)));
125 template<
typename Multivector_T>
126 inline Multivector_T
cga3std(
const Multivector_T& X)
128 typedef Multivector_T
cl;
129 typedef typename cl::index_set_t
ist;
137 template<
typename Multivector_T>
138 inline Multivector_T
agc3(
const Multivector_T& X)
140 typedef Multivector_T
cl;
141 typedef typename cl::index_set_t
ist;
144 const cl& cga3stdX =
cga3std(X);
145 return (
cl(
ist(1))*cga3stdX[
ist(1)] +
165 #pragma GCC diagnostic ignored "-Wunused-value" 167 #if defined(__clang__) 170 # pragma clang diagnostic ignored "-Wunused-function" 174 # pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
String clifford_to_str(const Multivector_T &mv)
The "informal" string representation of Multivector_T mv.
String index_set_to_repr(const Index_Set_T &ist)
The “official” string representation of Index_Set_T ist.
index_set< lo_ndx, hi_ndx > IndexSet
Scalar_T abs(const Multivector< Scalar_T, LO, HI > &val)
Absolute value == sqrt(norm)
const unsigned int DEFAULT_Products_Size_Threshold
Extra traits which extend numeric limits.
const unsigned int DEFAULT_Mult_Matrix_Threshold
A matrix_multi<Scalar_T,LO,HI> is a matrix approximation to a multivector.
String clifford_to_repr(const Multivector_T &mv)
The “official” string representation of Multivector_T mv.
Multivector_T cga3(const Multivector_T &x)
Convert Euclidean 3D vector to Conformal Geometric Algebra null vector [DL (10.50)].
const unsigned int DEFAULT_Log_Max_Outer_Steps
glucat::tuning< glucat::DEFAULT_Mult_Matrix_Threshold, glucat::DEFAULT_Div_Max_Steps, glucat::DEFAULT_Sqrt_Max_Steps, glucat::DEFAULT_Log_Max_Outer_Steps, glucat::DEFAULT_Log_Max_Inner_Steps, glucat::DEFAULT_Basis_Max_Count, glucat::DEFAULT_Fast_Size_Threshold, glucat::DEFAULT_Inv_Fast_Dim_Threshold, glucat::DEFAULT_Products_Size_Threshold, glucat::precision_promoted > Tune_P
const unsigned int DEFAULT_Sqrt_Max_Steps
matrix_multi< scalar_t > Clifford
Definitions for 3D Conformal Geometric Algebra [DL].
const unsigned int DEFAULT_Fast_Size_Threshold
const unsigned int DEFAULT_Inv_Fast_Dim_Threshold
const unsigned int DEFAULT_Div_Max_Steps
PyObject * PyFloat_FromDouble(Scalar_T v)
Index set class based on std::bitset<> in Gnu standard C++ library.
const unsigned int DEFAULT_Log_Max_Inner_Steps
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
const unsigned int DEFAULT_Basis_Max_Count
int index_t
Size of index_t should be enough to represent LO, HI.
Multivector_T cga3std(const Multivector_T &X)
Convert CGA3 null vector to standard Conformal Geometric Algebra null vector [DL (10.52)].
const index_t DEFAULT_HI
Default highest index in an index set.
Multivector_T agc3(const Multivector_T &X)
Convert CGA3 null vector to Euclidean 3D vector [DL (10.50)].