Commit c5a1d492 authored by novikov's avatar novikov
Browse files

copy constructors for expressions fixed

parent c941dd95
......@@ -944,6 +944,7 @@ namespace INMOST
value = arg.GetValue()*dmult;
}
const_multiplication_expression(const const_multiplication_expression & other) : arg(other.arg), value(other.value), dmult(other.dmult) {}
const_multiplication_expression(const const_multiplication_expression & other, const A & parg) : arg(parg), value(other.value), dmult(other.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -970,6 +971,7 @@ namespace INMOST
value = arg.GetValue();
}
variation_multiplication_expression(const variation_multiplication_expression & other) : arg(other.arg), value(other.value), dmult(other.dmult) {}
variation_multiplication_expression(const variation_multiplication_expression & other, const A & parg) : arg(parg), value(other.value), dmult(other.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -998,6 +1000,7 @@ namespace INMOST
value = arg.GetValue()*dmult;
}
const_division_expression(const const_division_expression & other) : arg(other.arg), value(other.value), dmult(other.dmult) {}
const_division_expression(const const_division_expression & other, const A & parg) : arg(parg), value(other.value), dmult(other.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1024,7 +1027,8 @@ namespace INMOST
value = arg.GetValue()+padd;
}
const_addition_expression(const const_addition_expression & other) : arg(other.arg), value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
const_addition_expression(const const_addition_expression & other, const A & parg) : arg(parg), value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(mult,r);
......@@ -1050,7 +1054,8 @@ namespace INMOST
value = pleft-arg.GetValue();
}
const_subtraction_expression(const const_subtraction_expression & other) : arg(other.arg), value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
const_subtraction_expression(const const_subtraction_expression & other, const A & parg) : arg(parg), value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(-mult,r);
......@@ -1080,6 +1085,8 @@ namespace INMOST
}
reciprocal_expression(const reciprocal_expression & other)
: arg(other.arg), value(other.value), reciprocial_val(other.reciprocial_val) {}
reciprocal_expression(const reciprocal_expression & other, const A & parg)
: arg(parg), value(other.value), reciprocial_val(other.reciprocial_val) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1108,7 +1115,8 @@ namespace INMOST
public:
unary_minus_expression(const shell_expression<A> & parg) : arg(parg) {value = -arg.GetValue();}
unary_minus_expression(const unary_minus_expression & b) : arg(b.arg) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const {return value;}
unary_minus_expression(const unary_minus_expression & b, const A & parg) : arg(parg) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const {return value;}
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(-mult,r);
......@@ -1131,7 +1139,8 @@ namespace INMOST
public:
unary_plus_expression(const shell_expression<A> & parg) : arg(parg) {value = arg.GetValue();}
unary_plus_expression(const unary_plus_expression & b) : arg(b.arg) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const {return value;}
unary_plus_expression(const unary_plus_expression & b, const A & parg) : arg(parg) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const {return value;}
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(mult,r);
......@@ -1159,7 +1168,8 @@ namespace INMOST
value = ::fabs(value);
}
abs_expression(const abs_expression & b) : arg(b.arg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const {return value;}
abs_expression(const abs_expression & b, const A & parg) : arg(parg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const {return value;}
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian( (value == 0 ? (mult < 0.0 ? -1 : 1) : 1) * mult * dmult, r);
......@@ -1189,6 +1199,7 @@ namespace INMOST
value = ::exp(value);
}
exp_expression(const exp_expression & b) : arg(b.arg), value(b.value) {}
exp_expression(const exp_expression & b, const A & parg) : arg(parg), value(b.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1222,7 +1233,8 @@ namespace INMOST
value = ::log(value);
}
log_expression(const log_expression & b) : arg(b.arg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
log_expression(const log_expression & b, const A & parg) : arg(parg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(mult*dmult,r);
......@@ -1256,7 +1268,8 @@ namespace INMOST
value = ::sin(value);
}
sin_expression(const sin_expression & b) : arg(b.arg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
sin_expression(const sin_expression & b, const A & parg) : arg(parg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(mult*dmult,r);
......@@ -1290,7 +1303,8 @@ namespace INMOST
value = ::cos(value);
}
cos_expression(const cos_expression & b) : arg(b.arg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
cos_expression(const cos_expression & b, const A & parg) : arg(parg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(mult*dmult,r);
......@@ -1320,7 +1334,8 @@ namespace INMOST
value = ::sqrt(arg.GetValue());
}
sqrt_expression(const sqrt_expression & b) : arg(b.arg), value(b.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
sqrt_expression(const sqrt_expression & b, const A & parg) : arg(parg), value(b.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(0.5*mult/value,r);
......@@ -1355,7 +1370,8 @@ namespace INMOST
dmult = lval/value;
}
soft_abs_expression(const soft_abs_expression & b) : arg(b.arg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
soft_abs_expression(const soft_abs_expression & b, const A & parg) : arg(parg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(mult*dmult,r);
......@@ -1385,7 +1401,8 @@ namespace INMOST
dmult = (1.0 - lval2/div)/sdiv;
}
soft_sign_expression(const soft_sign_expression & b) : arg(b.arg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
soft_sign_expression(const soft_sign_expression & b, const A & parg) : arg(parg), value(b.value), dmult(b.dmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; };
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
arg.GetJacobian(mult*dmult,r);
......@@ -1417,7 +1434,10 @@ namespace INMOST
}
soft_max_expression(const soft_max_expression & other)
: left(other.left), right(other.right), value(other.value), ldmult(other.ldmult), rdmult(other.rdmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
soft_max_expression(const soft_max_expression & other, const A & pleft, const B & pright)
: left(pleft), right(pright), value(other.value), ldmult(other.ldmult), rdmult(other.rdmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
left.GetJacobian(mult*ldmult,r);
......@@ -1451,6 +1471,8 @@ namespace INMOST
}
soft_min_expression(const soft_min_expression & other)
: left(other.left), right(other.right), value(other.value), ldmult(other.ldmult), rdmult(other.rdmult) {}
soft_min_expression(const soft_min_expression & other, const A & pleft, const B & pright)
: left(pleft), right(pright), value(other.value), ldmult(other.ldmult), rdmult(other.rdmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1482,6 +1504,8 @@ namespace INMOST
}
multiplication_expression(const multiplication_expression & other)
: left(other.left), right(other.right), value(other.value) {}
multiplication_expression(const multiplication_expression & other, const A & pleft, const B & pright)
: left(pleft), right(pright), value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1532,7 +1556,10 @@ namespace INMOST
value = lval * reciprocal_rval;
}
division_expression(const division_expression & other) : left(other.left), right(other.right), value(other.value), reciprocal_rval(other.reciprocal_rval) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
division_expression(const division_expression & other, const A & pleft, const B & pright) :
left(pleft), right(pright), value(other.value), reciprocal_rval(other.reciprocal_rval) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
left.GetJacobian(mult * reciprocal_rval,r);
......@@ -1574,6 +1601,8 @@ namespace INMOST
}
addition_expression(const addition_expression & other)
: left(other.left), right(other.right), value(other.value) {}
addition_expression(const addition_expression & other, const A & pleft, const B & pright)
: left(pleft), right(pright), value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1615,6 +1644,8 @@ namespace INMOST
}
subtraction_expression(const subtraction_expression & other)
: left(other.left), right(other.right),value(other.value) {}
subtraction_expression(const subtraction_expression & other, const A & pleft, const B & pright)
: left(pleft), right(pright),value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1664,6 +1695,9 @@ namespace INMOST
pow_expression(const pow_expression & other)
:left(other.left), right(other.right), value(other.value),
ldmult(other.ldmult), rdmult(other.rdmult) {}
pow_expression(const pow_expression & other, const A & pleft, const B & pright)
:left(pleft), right(pright), value(other.value),
ldmult(other.ldmult), rdmult(other.rdmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1700,6 +1734,9 @@ namespace INMOST
atan2_expression(const atan2_expression & other)
:left(other.left), right(other.right), value(other.value),
ldmult(other.ldmult), rdmult(other.rdmult) {}
atan2_expression(const atan2_expression & other, const A & pleft, const B & pright)
:left(pleft), right(pright), value(other.value),
ldmult(other.ldmult), rdmult(other.rdmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1737,6 +1774,8 @@ namespace INMOST
}
pow_const_expression(const pow_const_expression & other)
:left(other.left), value(other.value), ldmult(other.ldmult) {}
pow_const_expression(const pow_const_expression & other, const A & pleft)
:left(pleft), value(other.value), ldmult(other.ldmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1775,6 +1814,8 @@ namespace INMOST
}
const_pow_expression(const const_pow_expression & other)
:right(other.right), value(other.value), rdmult(other.rdmult) {}
const_pow_expression(const const_pow_expression & other, const A & pright)
:right(pright), value(other.value), rdmult(other.rdmult) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1806,6 +1847,9 @@ namespace INMOST
condition_expression(const condition_expression & other)
:cond(other.cond), left(other.left), right(other.right),
value(other.value), cond_value(other.cond_value) {}
condition_expression(const condition_expression & other, const A & pcond, const B & pleft, const C & pright)
:cond(pcond), left(pleft), right(pright),
value(other.value), cond_value(other.cond_value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1849,6 +1893,9 @@ namespace INMOST
branch_expression(const branch_expression & other)
:cond(other.cond), left(other.left), right(other.right),
value(other.value) {}
branch_expression(const branch_expression & other, bool pcond, const A & pleft, const B & pright)
:cond(pcond), left(pleft), right(pright),
value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1891,6 +1938,8 @@ namespace INMOST
value += it->GetValue();
}
stencil_expression(const stencil_expression & other) : arg(other.arg), value(other.value) {}
stencil_expression(const stencil_expression & other, dynarray<const_multiplication_expression<A>,64> & parg) :
arg(parg), value(other.value) {}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return value; }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const
{
......@@ -1934,6 +1983,8 @@ namespace INMOST
function_expression(const function_expression &other)
: arg(other.arg), value(other.value), dmult(other.dmult), ddmult(other.ddmult) {}
function_expression(const function_expression &other, const A & parg)
: arg(parg), value(other.value), dmult(other.dmult), ddmult(other.ddmult) {}
function_expression &operator=(function_expression const &b)
{
......
......@@ -39,28 +39,14 @@ namespace INMOST
Op operand;
public:
unary_pool(const A & parg) : arg(parg), operand(arg) {}
unary_pool(const unary_pool & other) : arg(other.arg), operand(other.operand) {}
unary_pool & operator = (unary_pool const & other) {arg = other.arg; operand = other.operand; return * this;}
unary_pool(const unary_pool & other) : arg(other.arg), operand(other.operand,arg) {}
unary_pool & operator = (unary_pool const & other) {arg = other.arg; operand.assign(other.operand,arg); return * this;}
const shell_expression<A> & get_arg() {return arg;}
Op & get_op() {return operand;}
const Op & get_op() const {return operand;}
};
template<class Op, class A>
class unary_const_pool
{
A left;
INMOST_DATA_REAL_TYPE right;
Op operand;
public:
unary_const_pool(const A & pleft, INMOST_DATA_REAL_TYPE pright) : left(pleft), right(pright), operand(left,right) {}
unary_const_pool(const unary_const_pool & other) : left(other.left), right(other.right), operand(other.operand) {}
unary_const_pool & operator = (unary_const_pool const & other) {left = other.left; right = other.right; operand = other.operand; return * this;}
const shell_expression<A> & get_arg() {return left;}
Op & get_op() {return operand;}
const Op & get_op() const {return operand;}
};
template<class Op, class A, class B>
class binary_pool
......@@ -71,8 +57,8 @@ namespace INMOST
Op operand;
public:
binary_pool(const A & pleft, const B & pright) : left(pleft), right(pright), operand(left,right) {}
binary_pool(const binary_pool & other) : left(other.left), right(other.right), operand(other.operand) {}
binary_pool & operator =(binary_pool const & other) {left = other.left; right = other.right; operand = other.operand; return * this;}
binary_pool(const binary_pool & other) : left(other.left), right(other.right), operand(other.operand,left,right) {}
binary_pool & operator = (binary_pool const & other) {left = other.left; right = other.right; operand.assign(other.operand,left,right); return * this;}
const shell_expression<A> & get_left() {return left;}
const shell_expression<B> & get_right() {return right;}
Op & get_op() {return operand;}
......@@ -89,8 +75,8 @@ namespace INMOST
Op operand;
public:
ternary_pool(const A & pcond, const B & pleft, const C & pright) : cond(pcond), left(pleft), right(pright), operand(cond,left,right) {}
ternary_pool(const ternary_pool & other) : cond(other.cond), left(other.left), right(other.right), operand(other.operand) {}
ternary_pool & operator =(ternary_pool const & other) {cond = other.cond; left = other.left; right = other.right; operand = other.operand; return * this;}
ternary_pool(const ternary_pool & other) : cond(other.cond), left(other.left), right(other.right), operand(other.operand,cond,left,right) {}
ternary_pool & operator =(ternary_pool const & other) {cond = other.cond; left = other.left; right = other.right; operand.assign(other.operand,cond,left,right); return * this;}
const shell_expression<A> & get_cond() {return cond;}
const shell_expression<B> & get_left() {return left;}
const shell_expression<C> & get_right() {return right;}
......@@ -112,21 +98,7 @@ namespace INMOST
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::Row & r) const {pool.get_op().GetJacobian(mult,r);}
__INLINE void GetHessian(INMOST_DATA_REAL_TYPE multJ, Sparse::Row & J, INMOST_DATA_REAL_TYPE multH, Sparse::HessianRow & H) const {pool.get_op().GetHessian(multJ,J,multH,H);}
};
template<class A, class ArgA>
class unary_const_pool_expression : public shell_expression<unary_const_pool_expression<A,ArgA> >
{
unary_const_pool<A,ArgA> pool;
public:
unary_const_pool_expression(const unary_const_pool<A,ArgA> & ppool) : pool(ppool) {}
unary_const_pool_expression(const unary_const_pool_expression & other) : pool(other.pool) {}
unary_const_pool_expression & operator = (unary_const_pool_expression const & other) {pool = other.pool; return * this;}
__INLINE INMOST_DATA_REAL_TYPE GetValue() const { return pool.get_op().GetValue(); }
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::RowMerger & r) const {pool.get_op().GetJacobian(mult,r);}
__INLINE void GetJacobian(INMOST_DATA_REAL_TYPE mult, Sparse::Row & r) const {pool.get_op().GetJacobian(mult,r);}
__INLINE void GetHessian(INMOST_DATA_REAL_TYPE multJ, Sparse::Row & J, INMOST_DATA_REAL_TYPE multH, Sparse::HessianRow & H) const {pool.get_op().GetHessian(multJ,J,multH,H);}
};
template<class A, class ArgA, class ArgB>
class binary_pool_expression : public shell_expression<binary_pool_expression<A,ArgA,ArgB> >
{
......@@ -581,34 +553,7 @@ namespace INMOST
void GetVariation(const Storage & e, Sparse::RowMerger & r) const { (*this)[e].GetJacobian(1.0,r); }
abstract_dynamic_variable * Copy() const {return static_cast<abstract_dynamic_variable *>(new binary_custom_variable(*this));}
};
template<class Expr, class A>
class unary_const_custom_variable : public shell_dynamic_variable< unary_const_pool_expression<Expr, typename A::Var >,unary_const_custom_variable<Expr,A> >
{
private:
A Left;
INMOST_DATA_REAL_TYPE Right;
public:
unary_const_custom_variable(const shell_dynamic_variable<typename A::Var,A> & pleft, INMOST_DATA_REAL_TYPE pright)
: Left(pleft), Right(pright) {}
unary_const_custom_variable(const unary_const_custom_variable & other) : Left(other.Left), Right(other.Right) {}
unary_const_custom_variable & operator =(unary_const_custom_variable const & other) {Left = other.Left; Right = other.Right; return * this;}
INMOST_DATA_REAL_TYPE Value(const Storage & e) const {return (*this)[e].GetValue();}
multivar_expression Variable(const Storage & e) const
{
multivar_expression ret = (*this)[e];
return ret;
}
unary_const_pool_expression<Expr, typename A::Var > operator [](const Storage & e) const
{
unary_const_pool<Expr,typename A::Var> pool(Left[e],Right);
return unary_const_pool_expression<Expr, typename A::Var >(pool);
}
void GetVariation(const Storage & e, Sparse::Row & r) const { (*this)[e].GetJacobian(1.0,r); }
void GetVariation(const Storage & e, Sparse::RowMerger & r) const { (*this)[e].GetJacobian(1.0,r); }
abstract_dynamic_variable * Copy() const {return static_cast<abstract_dynamic_variable *>(new unary_const_custom_variable(*this));}
};
template<class Expr, class A, class B, class C>
class ternary_custom_variable : public shell_dynamic_variable< ternary_pool_expression<Expr, typename A::Var, typename B::Var, typename C::Var >,ternary_custom_variable<Expr,A,B,C> >
{
......@@ -650,22 +595,22 @@ template<class A> __INLINE INMO
template<class A> __INLINE INMOST::unary_custom_variable<INMOST::sin_expression<typename A::Var>,A> sin(INMOST::shell_dynamic_variable<typename A::Var, A> const & Arg) { return INMOST::unary_custom_variable<INMOST::sin_expression<typename A::Var>,A>(Arg ); }
template<class A> __INLINE INMOST::unary_custom_variable<INMOST::cos_expression<typename A::Var>,A> cos(INMOST::shell_dynamic_variable<typename A::Var, A> const & Arg) { return INMOST::unary_custom_variable<INMOST::cos_expression<typename A::Var>,A>(Arg); }
template<class A> __INLINE INMOST::unary_custom_variable<INMOST::sqrt_expression<typename A::Var>,A> sqrt(INMOST::shell_dynamic_variable<typename A::Var, A> const & Arg) { return INMOST::unary_custom_variable<INMOST::sqrt_expression<typename A::Var>,A>(Arg); }
template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::variation_multiplication_expression<typename A::Var>,A> variation(INMOST::shell_dynamic_variable<typename A::Var, A> const & Arg, INMOST_DATA_REAL_TYPE Mult) {return INMOST::unary_const_custom_variable<INMOST::variation_multiplication_expression<typename A::Var>,A>(Arg,Mult);}
//template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::variation_multiplication_expression<typename A::Var>,A> variation(INMOST::shell_dynamic_variable<typename A::Var, A> const & Arg, INMOST_DATA_REAL_TYPE Mult) {return INMOST::unary_const_custom_variable<INMOST::variation_multiplication_expression<typename A::Var>,A>(Arg,Mult);}
template<class A, class B> __INLINE INMOST::binary_custom_variable<INMOST::addition_expression<typename A::Var,typename B::Var>,A, B> operator+(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::binary_custom_variable<INMOST::addition_expression<typename A::Var,typename B::Var>,A, B> (Left, Right); }
template<class A, class B> __INLINE INMOST::binary_custom_variable<INMOST::subtraction_expression<typename A::Var,typename B::Var>,A, B> operator-(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::binary_custom_variable<INMOST::subtraction_expression<typename A::Var,typename B::Var>, A, B> (Left, Right); }
template<class A, class B> __INLINE INMOST::binary_custom_variable<INMOST::multiplication_expression<typename A::Var,typename B::Var>,A, B> operator*(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::binary_custom_variable<INMOST::multiplication_expression<typename A::Var,typename B::Var>, A, B> (Left, Right); }
template<class A, class B> __INLINE INMOST::binary_custom_variable<INMOST::division_expression<typename A::Var,typename B::Var>,A, B> operator/(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::binary_custom_variable<INMOST::division_expression<typename A::Var,typename B::Var>, A, B> (Left, Right); }
template<class A, class B> __INLINE INMOST::binary_custom_variable<INMOST::pow_expression<typename A::Var,typename B::Var>,A, B> pow(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::binary_custom_variable<INMOST::pow_expression<typename A::Var,typename B::Var>,A, B>(Left, Right); }
template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::const_pow_expression<typename B::Var>,B> pow(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::const_pow_expression<typename B::Var>,B>(Left, Right); }
template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::pow_const_expression<typename A::Var>,A> pow(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::pow_const_expression<typename A::Var>,A>(Left, Right); }
template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::const_multiplication_expression<typename B::Var>,B> operator*(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::const_multiplication_expression<typename B::Var>,B>(Right,Left); }
template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::const_multiplication_expression<typename A::Var>,A> operator*(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::const_multiplication_expression<typename A::Var>,A>(Left,Right); }
template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::reciprocal_expression<typename B::Var>,B> operator/(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::reciprocal_expression<typename B::Var>,B>(Right,Left); }
template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::const_division_expression<typename A::Var>,A> operator/(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::const_division_expression<typename A::Var>,A>(Left, Right); }
template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename B::Var>,B> operator+(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename B::Var>,B>(Right,Left); }
template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename A::Var>,A> operator+(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename A::Var>,A>(Left,Right); }
template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::const_subtraction_expression<typename B::Var>,B> operator-(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::const_subtraction_expression<typename B::Var>,B>(Right, Left); }
template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename A::Var>,A> operator-(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename A::Var>,A>(Left, -Right); }
//template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::const_pow_expression<typename B::Var>,B> pow(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::const_pow_expression<typename B::Var>,B>(Left, Right); }
//template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::pow_const_expression<typename A::Var>,A> pow(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::pow_const_expression<typename A::Var>,A>(Left, Right); }
//template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::const_multiplication_expression<typename B::Var>,B> operator*(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::const_multiplication_expression<typename B::Var>,B>(Right,Left); }
//template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::const_multiplication_expression<typename A::Var>,A> operator*(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::const_multiplication_expression<typename A::Var>,A>(Left,Right); }
//template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::reciprocal_expression<typename B::Var>,B> operator/(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::reciprocal_expression<typename B::Var>,B>(Right,Left); }
//template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::const_division_expression<typename A::Var>,A> operator/(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::const_division_expression<typename A::Var>,A>(Left, Right); }
//template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename B::Var>,B> operator+(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename B::Var>,B>(Right,Left); }
//template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename A::Var>,A> operator+(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename A::Var>,A>(Left,Right); }
//template<class B> __INLINE INMOST::unary_const_custom_variable<INMOST::const_subtraction_expression<typename B::Var>,B> operator-(INMOST_DATA_REAL_TYPE Left, INMOST::shell_dynamic_variable<typename B::Var,B> const & Right) { return INMOST::unary_const_custom_variable<INMOST::const_subtraction_expression<typename B::Var>,B>(Right, Left); }
//template<class A> __INLINE INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename A::Var>,A> operator-(INMOST::shell_dynamic_variable<typename A::Var,A> const & Left, INMOST_DATA_REAL_TYPE Right) { return INMOST::unary_const_custom_variable<INMOST::const_addition_expression<typename A::Var>,A>(Left, -Right); }
template<class A> __INLINE INMOST::stencil_variable<A> stencil(INMOST::Tag tag_elems, INMOST::Tag tag_coefs, INMOST::shell_dynamic_variable<typename A::Var,A> const & Arg) { return INMOST::stencil_variable<A>(tag_elems,tag_coefs,Arg); }
template<class A> __INLINE INMOST::table_variable<A> get_table(INMOST::shell_dynamic_variable<typename A::Var,A> const & Arg, const INMOST::keyval_table & Table) {return INMOST::table_variable<A>(Arg,Table);}
template<class A> __INLINE INMOST::stencil_expression<A> stencil(INMOST::HandleType * elems, INMOST_DATA_REAL_TYPE * coefs, INMOST_DATA_ENUM_TYPE num, INMOST::shell_dynamic_variable<typename A::Var,A> const & Arg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment