232 return seed[run1]->
clone();
241 for( run1 = nNewIS; run1 <
vIndex + 1; run1++ )
247 if( newIS[0][
vIndex] != 0 ){
256 newIS[0][
vIndex]->operator=(*tmp);
282 if( (
vIndex+1)*dim-1 >= nNewIS ){
286 for( run1 = nNewIS; run1 < (
vIndex+1)*dim; run1++ )
292 if( newIS[0][
vIndex*dim] == 0 ){
295 for( run1 = 0; run1 < dim; run1++ ){
300 for( run1 = 0; run1 < dim; run1++ ){
302 newIS[0][
vIndex*dim+run1]->operator=(*results[run1]);
304 delete results[run1];
311 for( run1 = 0; run1 < dim; run1++ ){
317 df[run1] =
myAdd( newIS[0][
vIndex*dim+run1], tmp );
321 df[run1] =
myAdd( projTmp, tmp );
353 return Projection::ADsymmetricProtected( dim, varType, component, l, S, dimS, dfS, ldf, H, nNewLIS, newLIS, nNewSIS, newSIS, nNewHIS, newHIS );
359 if( (
vIndex+1)*dim-1 >= nNewLIS ){
362 for( run1 = nNewLIS; run1 < (
vIndex+1)*dim; run1++ )
367 if( (
vIndex+1)*dimS-1 >= nNewSIS ){
370 for( run1 = nNewSIS; run1 < (
vIndex+1)*dimS; run1++ )
372 nNewSIS = (
vIndex+1)*dimS;
375 if( (
vIndex+1)*dimS*dimS-1 >= nNewHIS ){
378 for( run1 = nNewHIS; run1 < (
vIndex+1)*dimS*dimS; run1++ )
380 nNewHIS = (
vIndex+1)*dimS*dimS;
385 if( newLIS[0][
vIndex*dim] == 0 ){
388 for( run1 = 0; run1 < dim; run1++ ){
394 for( run1 = 0; run1 < dimS; run1++ ){
399 for( run1 = 0; run1 < dimS*dimS; run1++ ){
405 nNewLIS, newLIS, nNewSIS, newSIS, nNewHIS, newHIS );
408 for( run1 = 0; run1 < dim; run1++ ){
410 newLIS[0][
vIndex*dim+run1]->operator=(*lres[run1]);
416 for( run1 = 0; run1 < dimS; run1++ ){
418 newSIS[0][
vIndex*dimS+run1]->operator=(*Sres[run1]);
424 for( run1 = 0; run1 < dimS*dimS; run1++ ){
426 newHIS[0][
vIndex*dimS*dimS+run1]->operator=(*Hres[run1]);
437 for( run1 = 0; run1 < dim; run1++ ){
443 ldf[run1] =
myAdd( newLIS[0][
vIndex*dim+run1], tmp );
447 ldf[run1] =
myAdd( projTmp, tmp );
454 for( run1 = 0; run1 < dimS; run1++ ){
459 for( run1 = 0; run1 < dimS*dimS; run1++ ){
464 H[run1] = newHIS[0][
vIndex*dimS*dimS+run1]->
clone();
495 std::stringstream ss;
496 ss <<
"a" <<
"[" <<
vIndex <<
"]";
512 return implicit_dep[
vIndex];
524 return implicit_dep[
vIndex];
536 return implicit_dep[
vIndex];
548 return implicit_dep[
vIndex];
586 const std::vector< std::string >& _name
Operator * getOperatorClone(uint idx) const
virtual BooleanType isPolynomialIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual BooleanType isDependingOn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual BooleanType isPolynomialIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual returnValue loadIndices(SymbolicIndexList *indexList)
virtual ~TreeProjection()
Abstract base class for all scalar-valued symbolic operators.
VariableType variableType
virtual NeutralElement isOneOrZero() const =0
virtual void copy(const Projection &arg)
Allows to pass back messages to the calling function.
virtual returnValue loadIndices(SymbolicIndexList *indexList)=0
virtual BooleanType isRationalIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual Operator * clone() const =0
virtual returnValue ADsymmetricProtected(int dim, VariableType *varType, int *component, Operator *l, Operator **S, int dimS, Operator **dfS, Operator **ldf, Operator **H, int &nNewLIS, TreeProjection ***newLIS, int &nNewSIS, TreeProjection ***newSIS, int &nNewHIS, TreeProjection ***newHIS)
virtual BooleanType isTrivial() const
virtual Operator * ADforwardProtected(int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)
virtual returnValue setVariableExportName(const VariableType &_type, const std::vector< std::string > &_name)
virtual double getValue() const
virtual TreeProjection * cloneTreeProjection() const
virtual returnValue ADbackwardProtected(int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)
#define CLOSE_NAMESPACE_ACADO
Manages the indices of SymbolicVariables.
virtual OperatorName getName()=0
Base class for all variables within the symbolic expressions family.
virtual Operator * AD_forward(int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)=0
virtual returnValue setVariableExportName(const VariableType &_type, const std::vector< std::string > &_name)
Operator * getArgument() const
virtual Operator * myProd(Operator *a, Operator *b)
virtual returnValue loadIndices(SymbolicIndexList *indexList)
virtual returnValue AD_backward(int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)=0
virtual returnValue ADsymmetricProtected(int dim, VariableType *varType, int *component, Operator *l, Operator **S, int dimS, Operator **dfS, Operator **ldf, Operator **H, int &nNewLIS, TreeProjection ***newLIS, int &nNewSIS, TreeProjection ***newSIS, int &nNewHIS, TreeProjection ***newHIS)
virtual returnValue initDerivative()
virtual returnValue initDerivative()
virtual Operator * myAdd(Operator *a, Operator *b)
Implements the projection operator within the symbolic operators family.
virtual NeutralElement isOneOrZero() const
virtual BooleanType isLinearIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
MonotonicityType monotonicity
returnValue clearStaticCounters()
virtual Operator * passArgument() const
virtual Operator * ADforwardProtected(int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)
virtual returnValue ADbackwardProtected(int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)
Implements the tree-projection operator within the family of SymbolicOperators.
virtual returnValue setVariableExportName(const VariableType &_type, const std::vector< std::string > &_name)
virtual void copy(const Projection &arg)
#define BEGIN_NAMESPACE_ACADO
virtual BooleanType isDependingOn(VariableType var) const
virtual TreeProjection * clone() const
virtual returnValue setCurvature(CurvatureType curvature_)
BooleanType addNewElement(VariableType variableType_, int index_)
virtual BooleanType isRationalIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual BooleanType isLinearIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual returnValue AD_symmetric(int dim, VariableType *varType, int *component, Operator *l, Operator **S, int dimS, Operator **dfS, Operator **ldf, Operator **H, int &nNewLIS, TreeProjection ***newLIS, int &nNewSIS, TreeProjection ***newSIS, int &nNewHIS, TreeProjection ***newHIS)=0
Implements a scalar constant within the symbolic operators family.
Operator & operator=(const Operator &arg)
int addOperatorPointer(Operator *intermediateOperator, int comp_)