44 template <
typename Scalar_T>
56 template<
typename Index_Set_T>
59 std::ostringstream os;
60 os <<
"index_set(" <<
ist <<
")";
65 template<
typename Index_Set_T>
68 std::ostringstream os;
74 template<
typename Multivector_T>
78 std::ostringstream os;
79 os << std::setprecision(std::numeric_limits<scalar_t>::digits10 + 1);
80 os <<
"clifford(\"" << mv <<
"\")";
85 template<
typename Multivector_T>
89 std::ostringstream os;
93 os << std::setprecision(4) << mv.truncated(
scalar_t(1.0
e-4));
102 template<
typename Multivector_T>
103 inline Multivector_T
cga3(
const Multivector_T& x)
105 using cl = Multivector_T;
106 using ist =
typename cl::index_set_t;
113 template<
typename Multivector_T>
114 inline Multivector_T
cga3std(
const Multivector_T& X)
116 using cl = Multivector_T;
117 using ist =
typename cl::index_set_t;
125 template<
typename Multivector_T>
126 inline Multivector_T
agc3(
const Multivector_T& X)
128 using cl = Multivector_T;
129 using ist =
typename cl::index_set_t;
133 return (
cl(
ist(1))*cga3stdX[
ist(1)] +
154 #pragma GCC diagnostic ignored "-Wunused-value" 156 #if defined(__clang__) 159 # pragma clang diagnostic ignored "-Wunused-function" 163 # pragma clang diagnostic ignored "-Wunneeded-internal-declaration" String glucat_package_version
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.
Extra traits which extend numeric limits.
A matrix_multi<Scalar_T,LO,HI,Tune_P> 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)].
#define GLUCAT_PACKAGE_VERSION
auto abs(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> Scalar_T
Absolute value == sqrt(norm)
Definitions for 3D Conformal Geometric Algebra [DL].
PyObject * PyFloat_FromDouble(Scalar_T v)
int index_t
Size of index_t should be enough to represent LO, HI.
Index set class based on std::bitset<> in Gnu standard C++ library.
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
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)].