1 #ifndef MATH_XorBitwiseOperator_H
2 #define MATH_XorBitwiseOperator_H
49 static inline SP::MATH_XorBitwiseOperator
New() {
96 if (arg1.get()!=
null) retCode=arg1->evaluate(
ALGEBRIC,symbols,var);
101 if (arg2.get()!=
null) retCode=arg2->evaluate(
ALGEBRIC,symbols,var);
107 if ((n==i2) && (i2==3)) {
109 double *var1=&var[0];
110 const double *var2=&var[i2];
111 var1[6]=var1[1]*var2[2]-var1[2]*var2[1];
112 var1[7]=var1[2]*var2[0]-var1[0]*var2[2];
113 var1[8]=var1[0]*var2[1]-var1[1]*var2[0];
119 double *var1=&var[0];
120 const double *var2=&var[i2];
This class decribes a variable class for evaluation.
Definition: MATH_Variable.h:16
static int toInteger(const double &v)
to int
Definition: MATH_Variable.h:302
tBoolean isString() const
retrun true if the type is string
Definition: MATH_Variable.h:287
tBoolean setSize(const int &n)
set the size of the variable be careful of the used of operator[] : the values may be reallocated whi...
Definition: MATH_Variable.cpp:37
SPC::MATH_ChildExpression getArgument(const int &i) const
get argument at index i for reading
Definition: MATH_ParentExpression.h:124
#define null
Definition: types.h:13
void setPriority(const int &p)
set the priority of the operator
Definition: MATH_BinaryOperator.h:49
virtual ~MATH_XorBitwiseOperator(void)
destroy
Definition: MATH_XorBitwiseOperator.h:40
virtual SP::MATH_NodeExpression newInstance() const
create a node expression
Definition: MATH_XorBitwiseOperator.h:57
MATH_XorBitwiseOperator(void)
create
Definition: MATH_XorBitwiseOperator.h:28
static SP::MATH_XorBitwiseOperator New()
create a node expression
Definition: MATH_XorBitwiseOperator.h:49
int getSize() const
get the size
Definition: MATH_Variable.h:237
This class decribes a binary operator.
Definition: MATH_BinaryOperator.h:15
virtual int evaluate(const tFlag &action, MATH_Environment &symbols, MATH_Variable &var) const
void evaluate the expression
Definition: MATH_XorBitwiseOperator.h:89
int getStartIndex() const
get the first index
Definition: MATH_Variable.h:248
static const int TYPE_MISMATCHED
Definition: MATH_Expression.h:43
void setFirstIndex(const int &index)
set the first index
Definition: MATH_Variable.h:118
This class decribes an environment class.
Definition: MATH_Environment.h:14
This class describes an XorBitwise (^) operator or vectorial product (for vector of size 3) ...
Definition: MATH_XorBitwiseOperator.h:15
void setName(const tString &n)
set the operator name
Definition: MATH_Operator.h:45
static const int NULL_OPERAND
Definition: MATH_Expression.h:46
DEFINE_SPTR(MATH_XorBitwiseOperator)
static const tFlag ALGEBRIC
Definition: MATH_Expression.h:31
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106
#define tFlag
Definition: types.h:14