// Generated on 2007-08-08 10:15:48 by G2 0.1 from 'E:\gasandbox\ga_sandbox\libgasandbox\c2ga.gs2'
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <string>
#include "mvtypebase.h"
// pre_h_include
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifndef _GA_c2ga_h_H_
#define _GA_c2ga_h_H_
namespace c2ga {
// multivector types:
enum g2Type {
MVT_NONE = -1,
MVT_NO_T = 10,
MVT_E1_T = 11,
MVT_E2_T = 12,
MVT_NI_T = 13,
MVT_SCALAR = 14,
MVT_POINT = 15,
MVT_NORMALIZEDPOINT = 16,
MVT_FLATPOINT = 17,
MVT_NORMALIZEDFLATPOINT = 18,
MVT_POINTPAIR = 19,
MVT_TRVERSORLOG = 20,
MVT_LINE = 21,
MVT_DUALLINE = 22,
MVT_CIRCLE = 23,
MVT_FREEVECTOR = 24,
MVT_FREEBIVECTOR = 25,
MVT_TANGENTVECTOR = 26,
MVT_TANGENTBIVECTOR = 27,
MVT_VECTORE2GA = 28,
MVT_BIVECTORE2GA = 29,
MVT_TRVERSOR = 30,
MVT_TRSVERSOR = 31,
MVT_EVENVERSOR = 32,
MVT_TRANSLATOR = 33,
MVT_NORMALIZEDTRANSLATOR = 34,
MVT_ROTOR = 35,
MVT_SCALOR = 36,
MVT___NO_CT__ = 37,
MVT___E1_CT__ = 38,
MVT___E2_CT__ = 39,
MVT___NI_CT__ = 40,
MVT___I4I_CT__ = 41,
MVT___I4_CT__ = 42,
MVT___I2_CT__ = 43,
MVT___NONI_CT__ = 44,
MVT___E2NI_CT__ = 45,
MVT___E1NI_CT__ = 46,
MVT___SYN_SMV___E1_E2_NOF1_0 = 47,
MVT___SYN_SMV___E1E2NIF1_0 = 48,
MVT___SYN_SMV___E1_E2_NI_NOF_1_0 = 49,
MVT___SYN_SMV___SCALAR_NOE1_NOE2_E1E2_NONI_E1NI_E2NI = 50,
MVT___SYN_SMV___SCALAR_NOE1_NOE2_NONI = 51,
MVT___SYN_SMV___NO_E1_E2_NOE1E2_NI_NOE1NI_NOE2NI = 52,
MVT___SYN_SMV___SCALAR_NOE1_E1E2_E1NI = 53,
MVT___SYN_SMV___NO_E1_E2_NOE1E2_NI_NOE1NI_E1E2NI = 54,
MVT___SYN_SMV___SCALAR_NOE2_E1E2_E2NI = 55,
MVT___SYN_SMV___NO_E1_E2_NOE1E2_NI_NOE2NI_E1E2NI = 56,
MVT___SYN_SMV___SCALAR_NONI_E1NI_E2NI = 57,
MVT___SYN_SMV___NO_E1_E2_NI_NOE1NI_NOE2NI_E1E2NI = 58,
MVT___SYN_SMV___E1NI_E2NI_NONIF_1_0 = 59,
MVT___SYN_SMV___SCALARF_1_0 = 60,
MVT___SYN_SMV___NIF_1_0 = 61,
MVT___SYN_SMV___NIF1_0 = 62,
MVT___SYN_SMV___E1_E2_NI_NOE1NI_NOE2NI_E1E2NI_NOF1_0 = 63,
MVT___SYN_SMV___E1_E2_NI_NOF2_0 = 64,
MVT___SYN_SMV___E1_E2_NI = 65,
MVT___SYN_SMV___NOE1_NOE2_NONI = 66,
MVT___SYN_SMV___NO_NOE1E2_NOE1NI_NOE2NI = 67,
MVT___SYN_SMV___SCALAR_E1E2_E1NI = 68,
MVT___SYN_SMV___E1_E2_NI_E1E2NI = 69,
MVT___SYN_SMV___SCALAR_E1E2_E2NI = 70,
MVT___SYN_SMV___SCALARF0_0 = 71,
MVT___SYN_SMV___NI_E1E2NI = 72,
MVT_MV = 8,
MVT_LAST = 73
};
// outermorphism types:
enum omType {
OMT_NONE = -2,
OMT_OM = 9,
OMT_LAST = 73
};
// grade definitions that can be joined using the '|' operator:
const int GRADE_0 = 1;
const int GRADE_1 = 2;
const int GRADE_2 = 4;
const int GRADE_3 = 8;
const int GRADE_4 = 16;
// The dimension of the space:
extern const int mv_spaceDim;
// Is the metric of the space Euclidean?
extern const bool mv_metricEuclidean;
// This array can be used to lookup the number of coordinates for a grade part of a general multivector
extern const int mv_gradeSize[5];
// This array can be used to lookup the number of coordinates based on a grade usage bitmap
extern const int mv_size[32];
// This array of ASCIIZ strings contains the names of the basis vectors
extern const char *mv_basisVectorNames[4];
// This array of integers contains the order of basis elements in the general multivector
// Use it to answer: 'what basis vectors are in the basis element at position [x]?
extern const int mv_basisElements[16][5];
// This array of integers contains the 'sign' (even/odd permutation of canonical order) of basis elements in the general multivector
// Use it to answer 'what is the permutation of the coordinate at index [x]'?
extern const double mv_basisElementSignByIndex[16];
// This array of integers contains the 'sign' (even/odd permutation of canonical order) of basis elements in the general multivector
// Use it to answer 'what is the permutation of the coordinate of bitmap [x]'?
extern const double mv_basisElementSignByBitmap[16];
// This array of integers contains the order of basis elements in the general multivector
// Use it to answer: 'at what index do I find basis element [x] (x = basis vector bitmap)?'
extern const int mv_basisElementIndexByBitmap[16];
// This array of integers contains the indices of basis elements in the general multivector
// Use it to answer: 'what basis element do I find at index [x]'?
extern const int mv_basisElementBitmapByIndex[16];
// This array of grade of each basis elements in the general multivector
// Use it to answer: 'what is the grade of basis element bitmap [x]'?
extern const int mv_basisElementGradeByBitmap[16];
/* *************************************************************************** */
/* *************************** define all classes upfront *************************** */
/* *************************************************************************** */
class no_t;
class e1_t;
class e2_t;
class ni_t;
class scalar;
class point;
class normalizedPoint;
class flatPoint;
class normalizedFlatPoint;
class pointPair;
class TRversorLog;
class line;
class dualLine;
class circle;
class freeVector;
class freeBivector;
class tangentVector;
class tangentBivector;
class vectorE2GA;
class bivectorE2GA;
class TRversor;
class TRSversor;
class evenVersor;
class translator;
class normalizedTranslator;
class rotor;
class scalor;
class __no_ct__;
class __e1_ct__;
class __e2_ct__;
class __ni_ct__;
class __I4i_ct__;
class __I4_ct__;
class __I2_ct__;
class __noni_ct__;
class __e2ni_ct__;
class __e1ni_ct__;
class __syn_smv___e1_e2_nof1_0;
class __syn_smv___e1e2nif1_0;
class __syn_smv___e1_e2_ni_nof_1_0;
class __syn_smv___scalar_noe1_noe2_e1e2_noni_e1ni_e2ni;
class __syn_smv___scalar_noe1_noe2_noni;
class __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_noe2ni;
class __syn_smv___scalar_noe1_e1e2_e1ni;
class __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_e1e2ni;
class __syn_smv___scalar_noe2_e1e2_e2ni;
class __syn_smv___no_e1_e2_noe1e2_ni_noe2ni_e1e2ni;
class __syn_smv___scalar_noni_e1ni_e2ni;
class __syn_smv___no_e1_e2_ni_noe1ni_noe2ni_e1e2ni;
class __syn_smv___e1ni_e2ni_nonif_1_0;
class __syn_smv___scalarf_1_0;
class __syn_smv___nif_1_0;
class __syn_smv___nif1_0;
class __syn_smv___e1_e2_ni_noe1ni_noe2ni_e1e2ni_nof1_0;
class __syn_smv___e1_e2_ni_nof2_0;
class __syn_smv___e1_e2_ni;
class __syn_smv___noe1_noe2_noni;
class __syn_smv___no_noe1e2_noe1ni_noe2ni;
class __syn_smv___scalar_e1e2_e1ni;
class __syn_smv___e1_e2_ni_e1e2ni;
class __syn_smv___scalar_e1e2_e2ni;
class __syn_smv___scalarf0_0;
class __syn_smv___ni_e1e2ni;
class mv;
class om;
// exception handling:
const int MV_EXCEPTION_WARNING = 1;
const int MV_EXCEPTION_ERROR = 2;
// Exception mechanism: ignore & pray
inline void mv_throw_exception(const char *msg, int level) {}
// You can alter the formatting of 'string()' through this function.
// 'format' = NULL will give you back the default.
void mv_setStringFormat(const char *what, const char *format = NULL);
extern const char *mv_string_fp; /* = \"%2.2f\" */
extern const char *mv_string_start; /* = \"\" */
extern const char *mv_string_end; /* = \"\" */
extern const char *mv_string_mul; /* = \"*\" */
extern const char *mv_string_wedge; /* = \"^\" */
extern const char *mv_string_plus; /* = \" + \" */
extern const char *mv_string_minus; /* = \" - \" */
// declaration of profiling functions
namespace g2Profiling {
void profile(unsigned int funcIdx, unsigned short storageTypeIdx, unsigned short nbArg,
unsigned short argType[], int nbReturnType, unsigned short returnType[]);
void reset();
void save(const char *filename = "E:\\gasandbox\\ga_sandbox\\libgasandbox\\c2ga.gp2", bool append = true);
void init(const char *filename = "E:\\gasandbox\\ga_sandbox\\libgasandbox\\c2ga.gp2",
const char *hostName = "localhost", int port = 7693);
} // end of namespace g2Profiling
inline void mv_memcpy(float *to, const float *from, const int nb) {
memcpy(to, from, sizeof(float) * nb);
}
inline void mv_zero(float *ptr, const int nb) {
memset(ptr, 0, sizeof(float) * nb);
}
// a is any number, b is positive number
inline bool mv_absLessThan(const float a, const float b) {
return ((a > b) || (a < -b));
}
inline float mv_stringToNumber(const char *asciiz) {
return (float)atof(asciiz);
}
void updateCoordinateString(const mv &x, char **cs, size_t &csl);
char *c_str(const mv & obj, const char *fp = NULL);
std::string toString(const mv & obj, const char *fp = NULL);
inline char *c_str_f(const mv & obj) {return c_str(obj, "%f");}
inline char *c_str_e(const mv & obj) {return c_str(obj, "%e");}
inline char *c_str_e20(const mv & obj) {return c_str(obj, "%2.20e");}
inline std::string toString_f(const mv & obj) {return toString(obj, "%f");}
inline std::string toString_e(const mv & obj) {return toString(obj, "%e");}
inline std::string toString_e20(const mv & obj) {return toString(obj, "%2.20e");}
class mv {
public:
typedef float Float;
/// zero constructor
inline mv () {
set();
}
/// copy constructor (MUST PASS BY REFERENCE)
inline mv(const mv &arg1) {
set(arg1);
}
/// scalar constructor
inline mv(Float scalar) {
set(scalar);
}
/// pointer to coordinates constructor
inline mv(unsigned int gradeUsage, const Float *coordinates) {
set(gradeUsage, coordinates);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0) {
set(gradeUsage
, c0);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1) {
set(gradeUsage
, c0, c1);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2) {
set(gradeUsage
, c0, c1, c2);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3) {
set(gradeUsage
, c0, c1, c2, c3);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4) {
set(gradeUsage
, c0, c1, c2, c3, c4);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7, c8);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11, Float c12) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11, Float c12, Float c13) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11, Float c12, Float c13, Float c14) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14);
}
/// all 'coordinates specified' constructors
inline mv(unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11, Float c12, Float c13, Float c14, Float c15) {
set(gradeUsage
, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15);
}
/// init from no_t constructor
inline mv(const no_t &arg1) {
set(arg1);
}
/// init from e1_t constructor
inline mv(const e1_t &arg1) {
set(arg1);
}
/// init from e2_t constructor
inline mv(const e2_t &arg1) {
set(arg1);
}
/// init from ni_t constructor
inline mv(const ni_t &arg1) {
set(arg1);
}
/// init from scalar constructor
inline mv(const scalar &arg1) {
set(arg1);
}
/// init from point constructor
inline mv(const point &arg1) {
set(arg1);
}
/// init from normalizedPoint constructor
inline mv(const normalizedPoint &arg1) {
set(arg1);
}
/// init from flatPoint constructor
inline mv(const flatPoint &arg1) {
set(arg1);
}
/// init from normalizedFlatPoint constructor
inline mv(const normalizedFlatPoint &arg1) {
set(arg1);
}
/// init from pointPair constructor
inline mv(const pointPair &arg1) {
set(arg1);
}
/// init from TRversorLog constructor
inline mv(const TRversorLog &arg1) {
set(arg1);
}
/// init from line constructor
inline mv(const line &arg1) {
set(arg1);
}
/// init from dualLine constructor
inline mv(const dualLine &arg1) {
set(arg1);
}
/// init from circle constructor
inline mv(const circle &arg1) {
set(arg1);
}
/// init from freeVector constructor
inline mv(const freeVector &arg1) {
set(arg1);
}
/// init from freeBivector constructor
inline mv(const freeBivector &arg1) {
set(arg1);
}
/// init from tangentVector constructor
inline mv(const tangentVector &arg1) {
set(arg1);
}
/// init from tangentBivector constructor
inline mv(const tangentBivector &arg1) {
set(arg1);
}
/// init from vectorE2GA constructor
inline mv(const vectorE2GA &arg1) {
set(arg1);
}
/// init from bivectorE2GA constructor
inline mv(const bivectorE2GA &arg1) {
set(arg1);
}
/// init from TRversor constructor
inline mv(const TRversor &arg1) {
set(arg1);
}
/// init from TRSversor constructor
inline mv(const TRSversor &arg1) {
set(arg1);
}
/// init from evenVersor constructor
inline mv(const evenVersor &arg1) {
set(arg1);
}
/// init from translator constructor
inline mv(const translator &arg1) {
set(arg1);
}
/// init from normalizedTranslator constructor
inline mv(const normalizedTranslator &arg1) {
set(arg1);
}
/// init from rotor constructor
inline mv(const rotor &arg1) {
set(arg1);
}
/// init from scalor constructor
inline mv(const scalor &arg1) {
set(arg1);
}
/// init from __no_ct__ constructor
inline mv(const __no_ct__ &arg1) {
set(arg1);
}
/// init from __e1_ct__ constructor
inline mv(const __e1_ct__ &arg1) {
set(arg1);
}
/// init from __e2_ct__ constructor
inline mv(const __e2_ct__ &arg1) {
set(arg1);
}
/// init from __ni_ct__ constructor
inline mv(const __ni_ct__ &arg1) {
set(arg1);
}
/// init from __I4i_ct__ constructor
inline mv(const __I4i_ct__ &arg1) {
set(arg1);
}
/// init from __I4_ct__ constructor
inline mv(const __I4_ct__ &arg1) {
set(arg1);
}
/// init from __I2_ct__ constructor
inline mv(const __I2_ct__ &arg1) {
set(arg1);
}
/// init from __noni_ct__ constructor
inline mv(const __noni_ct__ &arg1) {
set(arg1);
}
/// init from __e2ni_ct__ constructor
inline mv(const __e2ni_ct__ &arg1) {
set(arg1);
}
/// init from __e1ni_ct__ constructor
inline mv(const __e1ni_ct__ &arg1) {
set(arg1);
}
/// init from __syn_smv___e1_e2_nof1_0 constructor
inline mv(const __syn_smv___e1_e2_nof1_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___e1e2nif1_0 constructor
inline mv(const __syn_smv___e1e2nif1_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___e1_e2_ni_nof_1_0 constructor
inline mv(const __syn_smv___e1_e2_ni_nof_1_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___scalar_noe1_noe2_e1e2_noni_e1ni_e2ni constructor
inline mv(const __syn_smv___scalar_noe1_noe2_e1e2_noni_e1ni_e2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___scalar_noe1_noe2_noni constructor
inline mv(const __syn_smv___scalar_noe1_noe2_noni &arg1) {
set(arg1);
}
/// init from __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_noe2ni constructor
inline mv(const __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_noe2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___scalar_noe1_e1e2_e1ni constructor
inline mv(const __syn_smv___scalar_noe1_e1e2_e1ni &arg1) {
set(arg1);
}
/// init from __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_e1e2ni constructor
inline mv(const __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_e1e2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___scalar_noe2_e1e2_e2ni constructor
inline mv(const __syn_smv___scalar_noe2_e1e2_e2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___no_e1_e2_noe1e2_ni_noe2ni_e1e2ni constructor
inline mv(const __syn_smv___no_e1_e2_noe1e2_ni_noe2ni_e1e2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___scalar_noni_e1ni_e2ni constructor
inline mv(const __syn_smv___scalar_noni_e1ni_e2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___no_e1_e2_ni_noe1ni_noe2ni_e1e2ni constructor
inline mv(const __syn_smv___no_e1_e2_ni_noe1ni_noe2ni_e1e2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___e1ni_e2ni_nonif_1_0 constructor
inline mv(const __syn_smv___e1ni_e2ni_nonif_1_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___scalarf_1_0 constructor
inline mv(const __syn_smv___scalarf_1_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___nif_1_0 constructor
inline mv(const __syn_smv___nif_1_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___nif1_0 constructor
inline mv(const __syn_smv___nif1_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___e1_e2_ni_noe1ni_noe2ni_e1e2ni_nof1_0 constructor
inline mv(const __syn_smv___e1_e2_ni_noe1ni_noe2ni_e1e2ni_nof1_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___e1_e2_ni_nof2_0 constructor
inline mv(const __syn_smv___e1_e2_ni_nof2_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___e1_e2_ni constructor
inline mv(const __syn_smv___e1_e2_ni &arg1) {
set(arg1);
}
/// init from __syn_smv___noe1_noe2_noni constructor
inline mv(const __syn_smv___noe1_noe2_noni &arg1) {
set(arg1);
}
/// init from __syn_smv___no_noe1e2_noe1ni_noe2ni constructor
inline mv(const __syn_smv___no_noe1e2_noe1ni_noe2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___scalar_e1e2_e1ni constructor
inline mv(const __syn_smv___scalar_e1e2_e1ni &arg1) {
set(arg1);
}
/// init from __syn_smv___e1_e2_ni_e1e2ni constructor
inline mv(const __syn_smv___e1_e2_ni_e1e2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___scalar_e1e2_e2ni constructor
inline mv(const __syn_smv___scalar_e1e2_e2ni &arg1) {
set(arg1);
}
/// init from __syn_smv___scalarf0_0 constructor
inline mv(const __syn_smv___scalarf0_0 &arg1) {
set(arg1);
}
/// init from __syn_smv___ni_e1e2ni constructor
inline mv(const __syn_smv___ni_e1e2ni &arg1) {
set(arg1);
}
/// set to null
void set();
/// set to copy
void set(const mv &arg1);
/// set to scalar
void set(Float scalar);
/// pointer to coordinates constructor
void set(unsigned int gradeUsage, const Float *coordinates);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11, Float c12);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11, Float c12, Float c13);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11, Float c12, Float c13, Float c14);
/// set to 'coordinates specified'
void set (unsigned int gradeUsage
, Float c0, Float c1, Float c2, Float c3, Float c4, Float c5, Float c6, Float c7, Float c8, Float c9, Float c10, Float c11, Float c12, Float c13, Float c14, Float c15);
/// set to no_t
void set(const no_t &arg1);
/// set to e1_t
void set(const e1_t &arg1);
/// set to e2_t
void set(const e2_t &arg1);
/// set to ni_t
void set(const ni_t &arg1);
/// set to scalar
void set(const scalar &arg1);
/// set to point
void set(const point &arg1);
/// set to normalizedPoint
void set(const normalizedPoint &arg1);
/// set to flatPoint
void set(const flatPoint &arg1);
/// set to normalizedFlatPoint
void set(const normalizedFlatPoint &arg1);
/// set to pointPair
void set(const pointPair &arg1);
/// set to TRversorLog
void set(const TRversorLog &arg1);
/// set to line
void set(const line &arg1);
/// set to dualLine
void set(const dualLine &arg1);
/// set to circle
void set(const circle &arg1);
/// set to freeVector
void set(const freeVector &arg1);
/// set to freeBivector
void set(const freeBivector &arg1);
/// set to tangentVector
void set(const tangentVector &arg1);
/// set to tangentBivector
void set(const tangentBivector &arg1);
/// set to vectorE2GA
void set(const vectorE2GA &arg1);
/// set to bivectorE2GA
void set(const bivectorE2GA &arg1);
/// set to TRversor
void set(const TRversor &arg1);
/// set to TRSversor
void set(const TRSversor &arg1);
/// set to evenVersor
void set(const evenVersor &arg1);
/// set to translator
void set(const translator &arg1);
/// set to normalizedTranslator
void set(const normalizedTranslator &arg1);
/// set to rotor
void set(const rotor &arg1);
/// set to scalor
void set(const scalor &arg1);
/// set to __no_ct__
void set(const __no_ct__ &arg1);
/// set to __e1_ct__
void set(const __e1_ct__ &arg1);
/// set to __e2_ct__
void set(const __e2_ct__ &arg1);
/// set to __ni_ct__
void set(const __ni_ct__ &arg1);
/// set to __I4i_ct__
void set(const __I4i_ct__ &arg1);
/// set to __I4_ct__
void set(const __I4_ct__ &arg1);
/// set to __I2_ct__
void set(const __I2_ct__ &arg1);
/// set to __noni_ct__
void set(const __noni_ct__ &arg1);
/// set to __e2ni_ct__
void set(const __e2ni_ct__ &arg1);
/// set to __e1ni_ct__
void set(const __e1ni_ct__ &arg1);
/// set to __syn_smv___e1_e2_nof1_0
void set(const __syn_smv___e1_e2_nof1_0 &arg1);
/// set to __syn_smv___e1e2nif1_0
void set(const __syn_smv___e1e2nif1_0 &arg1);
/// set to __syn_smv___e1_e2_ni_nof_1_0
void set(const __syn_smv___e1_e2_ni_nof_1_0 &arg1);
/// set to __syn_smv___scalar_noe1_noe2_e1e2_noni_e1ni_e2ni
void set(const __syn_smv___scalar_noe1_noe2_e1e2_noni_e1ni_e2ni &arg1);
/// set to __syn_smv___scalar_noe1_noe2_noni
void set(const __syn_smv___scalar_noe1_noe2_noni &arg1);
/// set to __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_noe2ni
void set(const __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_noe2ni &arg1);
/// set to __syn_smv___scalar_noe1_e1e2_e1ni
void set(const __syn_smv___scalar_noe1_e1e2_e1ni &arg1);
/// set to __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_e1e2ni
void set(const __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_e1e2ni &arg1);
/// set to __syn_smv___scalar_noe2_e1e2_e2ni
void set(const __syn_smv___scalar_noe2_e1e2_e2ni &arg1);
/// set to __syn_smv___no_e1_e2_noe1e2_ni_noe2ni_e1e2ni
void set(const __syn_smv___no_e1_e2_noe1e2_ni_noe2ni_e1e2ni &arg1);
/// set to __syn_smv___scalar_noni_e1ni_e2ni
void set(const __syn_smv___scalar_noni_e1ni_e2ni &arg1);
/// set to __syn_smv___no_e1_e2_ni_noe1ni_noe2ni_e1e2ni
void set(const __syn_smv___no_e1_e2_ni_noe1ni_noe2ni_e1e2ni &arg1);
/// set to __syn_smv___e1ni_e2ni_nonif_1_0
void set(const __syn_smv___e1ni_e2ni_nonif_1_0 &arg1);
/// set to __syn_smv___scalarf_1_0
void set(const __syn_smv___scalarf_1_0 &arg1);
/// set to __syn_smv___nif_1_0
void set(const __syn_smv___nif_1_0 &arg1);
/// set to __syn_smv___nif1_0
void set(const __syn_smv___nif1_0 &arg1);
/// set to __syn_smv___e1_e2_ni_noe1ni_noe2ni_e1e2ni_nof1_0
void set(const __syn_smv___e1_e2_ni_noe1ni_noe2ni_e1e2ni_nof1_0 &arg1);
/// set to __syn_smv___e1_e2_ni_nof2_0
void set(const __syn_smv___e1_e2_ni_nof2_0 &arg1);
/// set to __syn_smv___e1_e2_ni
void set(const __syn_smv___e1_e2_ni &arg1);
/// set to __syn_smv___noe1_noe2_noni
void set(const __syn_smv___noe1_noe2_noni &arg1);
/// set to __syn_smv___no_noe1e2_noe1ni_noe2ni
void set(const __syn_smv___no_noe1e2_noe1ni_noe2ni &arg1);
/// set to __syn_smv___scalar_e1e2_e1ni
void set(const __syn_smv___scalar_e1e2_e1ni &arg1);
/// set to __syn_smv___e1_e2_ni_e1e2ni
void set(const __syn_smv___e1_e2_ni_e1e2ni &arg1);
/// set to __syn_smv___scalar_e1e2_e2ni
void set(const __syn_smv___scalar_e1e2_e2ni &arg1);
/// set to __syn_smv___scalarf0_0
void set(const __syn_smv___scalarf0_0 &arg1);
/// set to __syn_smv___ni_e1e2ni
void set(const __syn_smv___ni_e1e2ni &arg1);
/// assign copy
mv &operator=(const mv &arg1);
/// assign scalar
mv &operator=(Float scalar);
/// assign no_t
mv&operator=(const no_t& arg1);
/// assign e1_t
mv&operator=(const e1_t& arg1);
/// assign e2_t
mv&operator=(const e2_t& arg1);
/// assign ni_t
mv&operator=(const ni_t& arg1);
/// assign scalar
mv&operator=(const scalar& arg1);
/// assign point
mv&operator=(const point& arg1);
/// assign normalizedPoint
mv&operator=(const normalizedPoint& arg1);
/// assign flatPoint
mv&operator=(const flatPoint& arg1);
/// assign normalizedFlatPoint
mv&operator=(const normalizedFlatPoint& arg1);
/// assign pointPair
mv&operator=(const pointPair& arg1);
/// assign TRversorLog
mv&operator=(const TRversorLog& arg1);
/// assign line
mv&operator=(const line& arg1);
/// assign dualLine
mv&operator=(const dualLine& arg1);
/// assign circle
mv&operator=(const circle& arg1);
/// assign freeVector
mv&operator=(const freeVector& arg1);
/// assign freeBivector
mv&operator=(const freeBivector& arg1);
/// assign tangentVector
mv&operator=(const tangentVector& arg1);
/// assign tangentBivector
mv&operator=(const tangentBivector& arg1);
/// assign vectorE2GA
mv&operator=(const vectorE2GA& arg1);
/// assign bivectorE2GA
mv&operator=(const bivectorE2GA& arg1);
/// assign TRversor
mv&operator=(const TRversor& arg1);
/// assign TRSversor
mv&operator=(const TRSversor& arg1);
/// assign evenVersor
mv&operator=(const evenVersor& arg1);
/// assign translator
mv&operator=(const translator& arg1);
/// assign normalizedTranslator
mv&operator=(const normalizedTranslator& arg1);
/// assign rotor
mv&operator=(const rotor& arg1);
/// assign scalor
mv&operator=(const scalor& arg1);
/// assign __no_ct__
mv&operator=(const __no_ct__& arg1);
/// assign __e1_ct__
mv&operator=(const __e1_ct__& arg1);
/// assign __e2_ct__
mv&operator=(const __e2_ct__& arg1);
/// assign __ni_ct__
mv&operator=(const __ni_ct__& arg1);
/// assign __I4i_ct__
mv&operator=(const __I4i_ct__& arg1);
/// assign __I4_ct__
mv&operator=(const __I4_ct__& arg1);
/// assign __I2_ct__
mv&operator=(const __I2_ct__& arg1);
/// assign __noni_ct__
mv&operator=(const __noni_ct__& arg1);
/// assign __e2ni_ct__
mv&operator=(const __e2ni_ct__& arg1);
/// assign __e1ni_ct__
mv&operator=(const __e1ni_ct__& arg1);
/// assign __syn_smv___e1_e2_nof1_0
mv&operator=(const __syn_smv___e1_e2_nof1_0& arg1);
/// assign __syn_smv___e1e2nif1_0
mv&operator=(const __syn_smv___e1e2nif1_0& arg1);
/// assign __syn_smv___e1_e2_ni_nof_1_0
mv&operator=(const __syn_smv___e1_e2_ni_nof_1_0& arg1);
/// assign __syn_smv___scalar_noe1_noe2_e1e2_noni_e1ni_e2ni
mv&operator=(const __syn_smv___scalar_noe1_noe2_e1e2_noni_e1ni_e2ni& arg1);
/// assign __syn_smv___scalar_noe1_noe2_noni
mv&operator=(const __syn_smv___scalar_noe1_noe2_noni& arg1);
/// assign __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_noe2ni
mv&operator=(const __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_noe2ni& arg1);
/// assign __syn_smv___scalar_noe1_e1e2_e1ni
mv&operator=(const __syn_smv___scalar_noe1_e1e2_e1ni& arg1);
/// assign __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_e1e2ni
mv&operator=(const __syn_smv___no_e1_e2_noe1e2_ni_noe1ni_e1e2ni& arg1);
/// assign __syn_smv___scalar_noe2_e1e2_e2ni
mv&operator=(const __syn_smv___scalar_noe2_e1e2_e2ni& arg1);
/// assign __syn_smv___no_e1_e2_noe1e2_ni_noe2ni_e1e2ni
mv&operator=(const __syn_smv___no_e1_e2_noe1e2_ni_noe2ni_e1e2ni& arg1);
/// assign __syn_smv___scalar_noni_e1ni_e2ni
mv&operator=(const __syn_smv___scalar_noni_e1ni_e2ni& arg1);
/// assign __syn_smv___no_e1_e2_ni_noe1ni_noe2ni_e1e2ni
mv&operator=(const __syn_smv___no_e1_e2_ni_noe1ni_noe2ni_e1e2ni& arg1);
/// assign __syn_smv___e1ni_e2ni_nonif_1_0
mv&operator=(const __syn_smv___e1ni_e2ni_nonif_1_0& arg1);
/// assign __syn_smv___scalarf_1_0
mv&operator=(const __syn_smv___scalarf_1_0& arg1);
/// assign __syn_smv___nif_1_0
mv&operator=(const __syn_smv___nif_1_0& arg1);
/// assign __syn_smv___nif1_0
mv&operator=(const __syn_smv___nif1_0& arg1);
/// assign __syn_smv___e1_e2_ni_noe1ni_noe2ni_e1e2ni_nof1_0
mv&operator=(const __syn_smv___e1_e2_ni_noe1ni_noe2ni_e1e2ni_nof1_0& arg1);
/// assign __syn_smv___e1_e2_ni_nof2_0
mv&operator=(const __syn_smv___e1_e2_ni_nof2_0& arg1);
/// assign __syn_smv___e1_e2_ni
mv&operator=(const __syn_smv___e1_e2_ni& arg1);
/// assign __syn_smv___noe1_noe2_noni
mv&operator=(const __syn_smv___noe1_noe2_noni& arg1);
/// assign __syn_smv___no_noe1e2_noe1ni_noe2ni
mv&operator=(const __syn_smv___no_noe1e2_noe1ni_noe2ni& arg1);
/// assign __syn_smv___scalar_e1e2_e1ni
mv&operator=(const __syn_smv___scalar_e1e2_e1ni& arg1);
/// assign __syn_smv___e1_e2_ni_e1e2ni
mv&operator=(const __syn_smv___e1_e2_ni_e1e2ni& arg1);
/// assign __syn_smv___scalar_e1e2_e2ni
mv&operator=(const __syn_smv___scalar_e1e2_e2ni& arg1);
/// assign __syn_smv___scalarf0_0
mv&operator=(const __syn_smv___scalarf0_0& arg1);
/// assign __syn_smv___ni_e1e2ni
mv&operator=(const __syn_smv___ni_e1e2ni& arg1);
void compress(Float epsilon = 0.0);
inline Float const *nullFloats() const {
static Float *nf = NULL;
if (nf == NULL) nf = new Float[16];
return nf;
}
void expand(const Float *ptrs[], bool nulls = true) const;
/// returns the absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// converts this multvector to an array of basis blade bitmaps and coordinates (returns number of blades)
int toBasisBladeBitmapArray(unsigned int *bitmaps, Float *coords);
/// coordinate extraction by name
inline Float no() const {
if (gu() & 2)
return m_c[mv_size[gu() & 1] + 0];
else return (float)0.0;
}
inline Float e1() const {
if (gu() & 2)
return m_c[mv_size[gu() & 1] + 1];
else return (float)0.0;
}
inline Float e2() const {
if (gu() & 2)
return m_c[mv_size[gu() & 1] + 2];
else return (float)0.0;
}
inline Float ni() const {
if (gu() & 2)
return m_c[mv_size[gu() & 1] + 3];
else return (float)0.0;
}
inline Float noe1() const {
if (gu() & 4)
return m_c[mv_size[gu() & 3] + 0];
else return (float)0.0;
}
inline Float noe2() const {
if (gu() & 4)
return m_c[mv_size[gu() & 3] + 1];
else return (float)0.0;
}
inline Float e1e2() const {
if (gu() & 4)
return m_c[mv_size[gu() & 3] + 2];
else return (float)0.0;
}
inline Float e1ni() const {
if (gu() & 4)
return m_c[mv_size[gu() & 3] + 3];
else return (float)0.0;
}
inline Float e2ni() const {
if (gu() & 4)
return m_c[mv_size[gu() & 3] + 4];
else return (float)0.0;
}
inline Float noni() const {
if (gu() & 4)
return m_c[mv_size[gu() & 3] + 5];
else return (float)0.0;
}
inline Float e1e2ni() const {
if (gu() & 8)
return m_c[mv_size[gu() & 7] + 0];
else return (float)0.0;
}
inline Float noe1ni() const {
if (gu() & 8)
return m_c[mv_size[gu() & 7] + 1];
else return (float)0.0;
}
inline Float noe2ni() const {
if (gu() & 8)
return m_c[mv_size[gu() & 7] + 2];
else return (float)0.0;
}
inline Float noe1e2() const {
if (gu() & 8)
return m_c[mv_size[gu() & 7] + 3];
else return (float)0.0;
}
inline Float noe1e2ni() const {
if (gu() & 16)
return m_c[mv_size[gu() & 15] + 0];
else return (float)0.0;
}
// coordinate storage, grade usage
Float m_c[16]; ///< coordinate storage (TODO: if parity pure, allocate only half of the coordinates!!!)
unsigned int m_gu; ///< grade usage
inline unsigned int gu() const {return m_gu;}
inline void gu(unsigned int g) {m_gu = g;}
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class mv
char *string(const mv & obj, char *str, int maxLength, const char *fp = NULL);
// this function should be deprecated (conflicts with C++ stdlib)
char *string(const mv & obj, const char *fp = NULL);
mv mv_compress(const float *coordinates, float epsilon = (float)0.0, int gu = 16 * 2 -1);
mv mv_compress(int nbBlades, const unsigned int *bitmaps, const mv::Float *coords);
// underscore 'constructors' for float types:
/// returns scalar part of arg1 as float
inline float _float(const mv & arg1) {
return (arg1.m_gu & 1) ? (float)arg1.m_c[0] : 0.0f;
}
/// returns scalar part of arg1 as double
inline double _double(const mv & arg1) {
return (arg1.m_gu & 1) ? (double)arg1.m_c[0] : 0.0;
}
/// returns scalar part of arg1 as Float
inline float _Float(const mv & arg1) {
return (arg1.m_gu & 1) ? arg1.m_c[0] : (float)0.0;
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline const mv like(const mv &what, const mv &example) {return what;}
inline mv like(mv &what, const mv &example) {return what;}
/// converts this multvector to an array of basis blade bitmaps and coordinates (returns number of blades)
inline int mv::toBasisBladeBitmapArray(unsigned int *bitmaps, mv::Float *coords) {
int idxB = 0;
int idxC = 0;
if (m_gu & 1) {
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 0; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
}
if (m_gu & 2) {
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 1; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 2; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 4; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 8; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
}
if (m_gu & 4) {
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 3; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 5; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 6; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 10; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 12; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 9; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
}
if (m_gu & 8) {
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 14; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 11; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 13; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 7; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
}
if (m_gu & 16) {
if (m_c[idxC] != (Float)0.0) {
bitmaps[idxB] = 15; coords[idxB] = m_c[idxC]; idxB++;}
idxC++;
}
return idxB;
}
/// enum for the coordinates of no_t
enum __no_t_coordinates__ {no_t_no};
class no_t {
public:
typedef float Float;
/// zero constructor
inline no_t() {
set();
}
/// scalar constructor
inline no_t(Float s, int filler) { // filler can have any value, it simply prevents implicit conversion from Float -> no_t
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline no_t(const no_t &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline no_t(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> no_t
set(arg1);
}
/// pointer to coordinates constructor
inline no_t(__no_t_coordinates__, const Float *coordinates) {
set(no_t_no, coordinates);
}
/// coordinates constructor
inline no_t(__no_t_coordinates__, Float c_no) {
set(no_t_no, c_no);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const no_t &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__no_t_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__no_t_coordinates__, Float c_no);
/// assign copy
no_t &operator=(const no_t &arg1);
/// assign general multivector
no_t &operator=(const mv &arg1);
/// assign scalar
no_t &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
inline Float no() const {
return m_c[0];
}
/// const coordinate extraction by name
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__no_t_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[1];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class no_t
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline no_t _no_t(const mv &arg1) {
return no_t(arg1, 0);
}
/// from const specialization class:
inline const no_t &_no_t(const no_t &arg1) {
return arg1;
}
/// from non-const specialization class:
inline no_t &_no_t(no_t &arg1) {
return arg1;
}
/// from Float:
inline no_t _no_t(no_t::Float arg1) {
return no_t(arg1, 0); // 0 = filler; can have any value, it simply prevents implicit conversion from mv -> vector
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline no_t like(const mv &what, const no_t &example) {return _no_t(what);}
/// from const specialization class:
inline const no_t like(const no_t &what, const no_t &example) {return _no_t(what);}
/// from non-const specialization class:
inline no_t like(no_t &what, const no_t &example) {return _no_t(what);}
// underscore 'constructors' for float types:
/// returns scalar part of v as float
inline float _float(const no_t & v) {
return (float)0;
}
/// returns scalar part of v as double
inline double _double(const no_t & v) {
return (double)0;
}
/// returns scalar part of v as Float
inline float _Float(const no_t & v) {
return (float)0;
}
/// enum for the coordinates of e1_t
enum __e1_t_coordinates__ {e1_t_e1};
class e1_t {
public:
typedef float Float;
/// zero constructor
inline e1_t() {
set();
}
/// scalar constructor
inline e1_t(Float s, int filler) { // filler can have any value, it simply prevents implicit conversion from Float -> e1_t
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline e1_t(const e1_t &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline e1_t(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> e1_t
set(arg1);
}
/// pointer to coordinates constructor
inline e1_t(__e1_t_coordinates__, const Float *coordinates) {
set(e1_t_e1, coordinates);
}
/// coordinates constructor
inline e1_t(__e1_t_coordinates__, Float c_e1) {
set(e1_t_e1, c_e1);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const e1_t &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__e1_t_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__e1_t_coordinates__, Float c_e1);
/// assign copy
e1_t &operator=(const e1_t &arg1);
/// assign general multivector
e1_t &operator=(const mv &arg1);
/// assign scalar
e1_t &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
inline Float e1() const {
return m_c[0];
}
/// const coordinate extraction by name
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__e1_t_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[1];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class e1_t
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline e1_t _e1_t(const mv &arg1) {
return e1_t(arg1, 0);
}
/// from const specialization class:
inline const e1_t &_e1_t(const e1_t &arg1) {
return arg1;
}
/// from non-const specialization class:
inline e1_t &_e1_t(e1_t &arg1) {
return arg1;
}
/// from Float:
inline e1_t _e1_t(e1_t::Float arg1) {
return e1_t(arg1, 0); // 0 = filler; can have any value, it simply prevents implicit conversion from mv -> vector
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline e1_t like(const mv &what, const e1_t &example) {return _e1_t(what);}
/// from const specialization class:
inline const e1_t like(const e1_t &what, const e1_t &example) {return _e1_t(what);}
/// from non-const specialization class:
inline e1_t like(e1_t &what, const e1_t &example) {return _e1_t(what);}
// underscore 'constructors' for float types:
/// returns scalar part of v as float
inline float _float(const e1_t & v) {
return (float)0;
}
/// returns scalar part of v as double
inline double _double(const e1_t & v) {
return (double)0;
}
/// returns scalar part of v as Float
inline float _Float(const e1_t & v) {
return (float)0;
}
/// enum for the coordinates of e2_t
enum __e2_t_coordinates__ {e2_t_e2};
class e2_t {
public:
typedef float Float;
/// zero constructor
inline e2_t() {
set();
}
/// scalar constructor
inline e2_t(Float s, int filler) { // filler can have any value, it simply prevents implicit conversion from Float -> e2_t
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline e2_t(const e2_t &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline e2_t(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> e2_t
set(arg1);
}
/// pointer to coordinates constructor
inline e2_t(__e2_t_coordinates__, const Float *coordinates) {
set(e2_t_e2, coordinates);
}
/// coordinates constructor
inline e2_t(__e2_t_coordinates__, Float c_e2) {
set(e2_t_e2, c_e2);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const e2_t &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__e2_t_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__e2_t_coordinates__, Float c_e2);
/// assign copy
e2_t &operator=(const e2_t &arg1);
/// assign general multivector
e2_t &operator=(const mv &arg1);
/// assign scalar
e2_t &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
inline Float e2() const {
return m_c[0];
}
/// const coordinate extraction by name
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__e2_t_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[1];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class e2_t
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline e2_t _e2_t(const mv &arg1) {
return e2_t(arg1, 0);
}
/// from const specialization class:
inline const e2_t &_e2_t(const e2_t &arg1) {
return arg1;
}
/// from non-const specialization class:
inline e2_t &_e2_t(e2_t &arg1) {
return arg1;
}
/// from Float:
inline e2_t _e2_t(e2_t::Float arg1) {
return e2_t(arg1, 0); // 0 = filler; can have any value, it simply prevents implicit conversion from mv -> vector
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline e2_t like(const mv &what, const e2_t &example) {return _e2_t(what);}
/// from const specialization class:
inline const e2_t like(const e2_t &what, const e2_t &example) {return _e2_t(what);}
/// from non-const specialization class:
inline e2_t like(e2_t &what, const e2_t &example) {return _e2_t(what);}
// underscore 'constructors' for float types:
/// returns scalar part of v as float
inline float _float(const e2_t & v) {
return (float)0;
}
/// returns scalar part of v as double
inline double _double(const e2_t & v) {
return (double)0;
}
/// returns scalar part of v as Float
inline float _Float(const e2_t & v) {
return (float)0;
}
/// enum for the coordinates of ni_t
enum __ni_t_coordinates__ {ni_t_ni};
class ni_t {
public:
typedef float Float;
/// zero constructor
inline ni_t() {
set();
}
/// scalar constructor
inline ni_t(Float s, int filler) { // filler can have any value, it simply prevents implicit conversion from Float -> ni_t
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline ni_t(const ni_t &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline ni_t(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> ni_t
set(arg1);
}
/// pointer to coordinates constructor
inline ni_t(__ni_t_coordinates__, const Float *coordinates) {
set(ni_t_ni, coordinates);
}
/// coordinates constructor
inline ni_t(__ni_t_coordinates__, Float c_ni) {
set(ni_t_ni, c_ni);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const ni_t &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__ni_t_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__ni_t_coordinates__, Float c_ni);
/// assign copy
ni_t &operator=(const ni_t &arg1);
/// assign general multivector
ni_t &operator=(const mv &arg1);
/// assign scalar
ni_t &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
inline Float ni() const {
return m_c[0];
}
/// const coordinate extraction by name
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__ni_t_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[1];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class ni_t
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline ni_t _ni_t(const mv &arg1) {
return ni_t(arg1, 0);
}
/// from const specialization class:
inline const ni_t &_ni_t(const ni_t &arg1) {
return arg1;
}
/// from non-const specialization class:
inline ni_t &_ni_t(ni_t &arg1) {
return arg1;
}
/// from Float:
inline ni_t _ni_t(ni_t::Float arg1) {
return ni_t(arg1, 0); // 0 = filler; can have any value, it simply prevents implicit conversion from mv -> vector
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline ni_t like(const mv &what, const ni_t &example) {return _ni_t(what);}
/// from const specialization class:
inline const ni_t like(const ni_t &what, const ni_t &example) {return _ni_t(what);}
/// from non-const specialization class:
inline ni_t like(ni_t &what, const ni_t &example) {return _ni_t(what);}
// underscore 'constructors' for float types:
/// returns scalar part of v as float
inline float _float(const ni_t & v) {
return (float)0;
}
/// returns scalar part of v as double
inline double _double(const ni_t & v) {
return (double)0;
}
/// returns scalar part of v as Float
inline float _Float(const ni_t & v) {
return (float)0;
}
/// enum for the coordinates of scalar
enum __scalar_coordinates__ {scalar_scalar};
class scalar {
public:
typedef float Float;
/// zero constructor
inline scalar() {
set();
}
/// scalar constructor
inline scalar(Float s) {
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline scalar(const scalar &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline scalar(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> scalar
set(arg1);
}
/// pointer to coordinates constructor
inline scalar(__scalar_coordinates__, const Float *coordinates) {
set(scalar_scalar, coordinates);
}
/// coordinates constructor
inline scalar(__scalar_coordinates__, Float c_scalar) {
set(scalar_scalar, c_scalar);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const scalar &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__scalar_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__scalar_coordinates__, Float c_scalar);
/// assign copy
scalar &operator=(const scalar &arg1);
/// assign general multivector
scalar &operator=(const mv &arg1);
/// assign scalar
scalar &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
/// const coordinate extraction by name
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__scalar_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[1];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class scalar
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline scalar _scalar(const mv &arg1) {
return scalar(arg1, 0);
}
/// from const specialization class:
inline const scalar &_scalar(const scalar &arg1) {
return arg1;
}
/// from non-const specialization class:
inline scalar &_scalar(scalar &arg1) {
return arg1;
}
/// from Float:
inline scalar _scalar(scalar::Float arg1) {
return scalar(arg1, 0); // 0 = filler; can have any value, it simply prevents implicit conversion from mv -> vector
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline scalar like(const mv &what, const scalar &example) {return _scalar(what);}
/// from const specialization class:
inline const scalar like(const scalar &what, const scalar &example) {return _scalar(what);}
/// from non-const specialization class:
inline scalar like(scalar &what, const scalar &example) {return _scalar(what);}
// underscore 'constructors' for float types:
/// returns scalar part of v as float
inline float _float(const scalar & v) {
return (float)v.m_c[0];
}
/// returns scalar part of v as double
inline double _double(const scalar & v) {
return (double)v.m_c[0];
}
/// returns scalar part of v as Float
inline float _Float(const scalar & v) {
return v.m_c[0];
}
/// enum for the coordinates of point
enum __point_coordinates__ {point_no_e1_e2_ni};
class point {
public:
typedef float Float;
/// zero constructor
inline point() {
set();
}
/// scalar constructor
inline point(Float s, int filler) { // filler can have any value, it simply prevents implicit conversion from Float -> point
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline point(const point &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline point(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> point
set(arg1);
}
/// pointer to coordinates constructor
inline point(__point_coordinates__, const Float *coordinates) {
set(point_no_e1_e2_ni, coordinates);
}
/// coordinates constructor
inline point(__point_coordinates__, Float c_no, Float c_e1, Float c_e2, Float c_ni) {
set(point_no_e1_e2_ni, c_no, c_e1, c_e2, c_ni);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const point &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__point_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__point_coordinates__, Float c_no, Float c_e1, Float c_e2, Float c_ni);
/// assign copy
point &operator=(const point &arg1);
/// assign general multivector
point &operator=(const mv &arg1);
/// assign scalar
point &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
inline Float no() const {
return m_c[0];
}
inline Float e1() const {
return m_c[1];
}
inline Float e2() const {
return m_c[2];
}
inline Float ni() const {
return m_c[3];
}
/// const coordinate extraction by name
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__point_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[4];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class point
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline point _point(const mv &arg1) {
return point(arg1, 0);
}
/// from const specialization class:
inline const point &_point(const point &arg1) {
return arg1;
}
/// from non-const specialization class:
inline point &_point(point &arg1) {
return arg1;
}
/// from Float:
inline point _point(point::Float arg1) {
return point(arg1, 0); // 0 = filler; can have any value, it simply prevents implicit conversion from mv -> vector
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline point like(const mv &what, const point &example) {return _point(what);}
/// from const specialization class:
inline const point like(const point &what, const point &example) {return _point(what);}
/// from non-const specialization class:
inline point like(point &what, const point &example) {return _point(what);}
// underscore 'constructors' for float types:
/// returns scalar part of v as float
inline float _float(const point & v) {
return (float)0;
}
/// returns scalar part of v as double
inline double _double(const point & v) {
return (double)0;
}
/// returns scalar part of v as Float
inline float _Float(const point & v) {
return (float)0;
}
/// enum for the coordinates of normalizedPoint
enum __normalizedPoint_coordinates__ {normalizedPoint_e1_e2_ni_nof1_0};
class normalizedPoint {
public:
typedef float Float;
/// zero constructor
inline normalizedPoint() {
set();
}
/// scalar constructor
inline normalizedPoint(Float s, int filler) { // filler can have any value, it simply prevents implicit conversion from Float -> normalizedPoint
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline normalizedPoint(const normalizedPoint &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline normalizedPoint(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> normalizedPoint
set(arg1);
}
/// pointer to coordinates constructor
inline normalizedPoint(__normalizedPoint_coordinates__, const Float *coordinates) {
set(normalizedPoint_e1_e2_ni_nof1_0, coordinates);
}
/// coordinates constructor
inline normalizedPoint(__normalizedPoint_coordinates__, Float c_e1, Float c_e2, Float c_ni) {
set(normalizedPoint_e1_e2_ni_nof1_0, c_e1, c_e2, c_ni);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const normalizedPoint &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__normalizedPoint_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__normalizedPoint_coordinates__, Float c_e1, Float c_e2, Float c_ni);
/// assign copy
normalizedPoint &operator=(const normalizedPoint &arg1);
/// assign general multivector
normalizedPoint &operator=(const mv &arg1);
/// assign scalar
normalizedPoint &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
inline Float e1() const {
return m_c[0];
}
inline Float e2() const {
return m_c[1];
}
inline Float ni() const {
return m_c[2];
}
/// const coordinate extraction by name
inline Float no() const {
return 1.0f;
}
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__normalizedPoint_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[3];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class normalizedPoint
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline normalizedPoint _normalizedPoint(const mv &arg1) {
return normalizedPoint(arg1, 0);
}
/// from const specialization class:
inline const normalizedPoint &_normalizedPoint(const normalizedPoint &arg1) {
return arg1;
}
/// from non-const specialization class:
inline normalizedPoint &_normalizedPoint(normalizedPoint &arg1) {
return arg1;
}
/// from Float:
inline normalizedPoint _normalizedPoint(normalizedPoint::Float arg1) {
return normalizedPoint(arg1, 0); // 0 = filler; can have any value, it simply prevents implicit conversion from mv -> vector
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline normalizedPoint like(const mv &what, const normalizedPoint &example) {return _normalizedPoint(what);}
/// from const specialization class:
inline const normalizedPoint like(const normalizedPoint &what, const normalizedPoint &example) {return _normalizedPoint(what);}
/// from non-const specialization class:
inline normalizedPoint like(normalizedPoint &what, const normalizedPoint &example) {return _normalizedPoint(what);}
// underscore 'constructors' for float types:
/// returns scalar part of v as float
inline float _float(const normalizedPoint & v) {
return (float)0;
}
/// returns scalar part of v as double
inline double _double(const normalizedPoint & v) {
return (double)0;
}
/// returns scalar part of v as Float
inline float _Float(const normalizedPoint & v) {
return (float)0;
}
/// enum for the coordinates of flatPoint
enum __flatPoint_coordinates__ {flatPoint_e1ni_e2ni_noni};
class flatPoint {
public:
typedef float Float;
/// zero constructor
inline flatPoint() {
set();
}
/// scalar constructor
inline flatPoint(Float s, int filler) { // filler can have any value, it simply prevents implicit conversion from Float -> flatPoint
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline flatPoint(const flatPoint &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline flatPoint(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> flatPoint
set(arg1);
}
/// pointer to coordinates constructor
inline flatPoint(__flatPoint_coordinates__, const Float *coordinates) {
set(flatPoint_e1ni_e2ni_noni, coordinates);
}
/// coordinates constructor
inline flatPoint(__flatPoint_coordinates__, Float c_e1ni, Float c_e2ni, Float c_noni) {
set(flatPoint_e1ni_e2ni_noni, c_e1ni, c_e2ni, c_noni);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const flatPoint &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__flatPoint_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__flatPoint_coordinates__, Float c_e1ni, Float c_e2ni, Float c_noni);
/// assign copy
flatPoint &operator=(const flatPoint &arg1);
/// assign general multivector
flatPoint &operator=(const mv &arg1);
/// assign scalar
flatPoint &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
inline Float e1ni() const {
return m_c[0];
}
inline Float e2ni() const {
return m_c[1];
}
inline Float noni() const {
return m_c[2];
}
/// const coordinate extraction by name
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__flatPoint_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[3];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class flatPoint
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline flatPoint _flatPoint(const mv &arg1) {
return flatPoint(arg1, 0);
}
/// from const specialization class:
inline const flatPoint &_flatPoint(const flatPoint &arg1) {
return arg1;
}
/// from non-const specialization class:
inline flatPoint &_flatPoint(flatPoint &arg1) {
return arg1;
}
/// from Float:
inline flatPoint _flatPoint(flatPoint::Float arg1) {
return flatPoint(arg1, 0); // 0 = filler; can have any value, it simply prevents implicit conversion from mv -> vector
}
// like example constructors, for use with templates
/// underscore constructor from general multivector:
inline flatPoint like(const mv &what, const flatPoint &example) {return _flatPoint(what);}
/// from const specialization class:
inline const flatPoint like(const flatPoint &what, const flatPoint &example) {return _flatPoint(what);}
/// from non-const specialization class:
inline flatPoint like(flatPoint &what, const flatPoint &example) {return _flatPoint(what);}
// underscore 'constructors' for float types:
/// returns scalar part of v as float
inline float _float(const flatPoint & v) {
return (float)0;
}
/// returns scalar part of v as double
inline double _double(const flatPoint & v) {
return (double)0;
}
/// returns scalar part of v as Float
inline float _Float(const flatPoint & v) {
return (float)0;
}
/// enum for the coordinates of normalizedFlatPoint
enum __normalizedFlatPoint_coordinates__ {normalizedFlatPoint_e1ni_e2ni_nonif1_0};
class normalizedFlatPoint {
public:
typedef float Float;
/// zero constructor
inline normalizedFlatPoint() {
set();
}
/// scalar constructor
inline normalizedFlatPoint(Float s, int filler) { // filler can have any value, it simply prevents implicit conversion from Float -> normalizedFlatPoint
set(s);
}
/// copy constructor (MUST PASS BY REFERENCE)
inline normalizedFlatPoint(const normalizedFlatPoint &arg1) {
set(arg1);
}
/// general multivector constructor (that can not be selected for implicit conversion by C++)
inline normalizedFlatPoint(const mv &arg1, int filler) { // filler can have any value, it simply prevents implicit conversion from mv -> normalizedFlatPoint
set(arg1);
}
/// pointer to coordinates constructor
inline normalizedFlatPoint(__normalizedFlatPoint_coordinates__, const Float *coordinates) {
set(normalizedFlatPoint_e1ni_e2ni_nonif1_0, coordinates);
}
/// coordinates constructor
inline normalizedFlatPoint(__normalizedFlatPoint_coordinates__, Float c_e1ni, Float c_e2ni) {
set(normalizedFlatPoint_e1ni_e2ni_nonif1_0, c_e1ni, c_e2ni);
}
/// set to null
void set();
/// set to scalar
void set(Float s);
/// set to copy
void set(const normalizedFlatPoint &arg1);
/// set to copy of general multivector
void set(const mv &arg1);
/// pointer to coordinates constructor
void set(__normalizedFlatPoint_coordinates__, const Float *coordinates);
/// set to coordinates
void set(__normalizedFlatPoint_coordinates__, Float c_e1ni, Float c_e2ni);
/// assign copy
normalizedFlatPoint &operator=(const normalizedFlatPoint &arg1);
/// assign general multivector
normalizedFlatPoint &operator=(const mv &arg1);
/// assign scalar
normalizedFlatPoint &operator=(Float scalarVal);
/// returns absolute largest coordinate
Float largestCoordinate() const;
/// returns the absolute largest coordinate, and the corresponding basis blade bitmap
Float largestBasisBlade(unsigned int &bm) const;
/// coordinate extraction by name
inline Float e1ni() const {
return m_c[0];
}
inline Float e2ni() const {
return m_c[1];
}
/// const coordinate extraction by name
inline Float noni() const {
return 1.0f;
}
/// get all coordinates (returns NULL for fully constant specialization
const Float *getC(__normalizedFlatPoint_coordinates__ sanityCheckValue) const {
return m_c;
}
/// coordinate storage
Float m_c[2];
inline const char * c_str(const char *fp = NULL) const {
return ::c2ga::c_str(*this, fp);
}
inline const char * c_str_f() const {return c_str("%f");}
inline const char * c_str_e() const {return c_str("%e");}
inline const char * c_str_e20() const {return c_str("%2.20e");}
inline std::string toString(const char *fp = NULL) const {
return ::c2ga::toString(*this, fp);
}
inline std::string toString_f() const {return toString("%f");}
inline std::string toString_e() const {return toString("%e");}
inline std::string toString_e20() const {return toString("%2.20e");}
}; // end of class normalizedFlatPoint
/* 'underscore constructors' */
/// underscore constructor from general multivector:
inline normalizedFlatPoint _normalizedFlatPoint(const mv &arg1) {
return normalizedFlatPoint(arg1, 0