if (bbGetInputType()==17) bbSetOutputOut( std::max( bbGetInputIn1(),bbGetInputIn2() ) );
if (bbGetInputType()==18) bbSetOutputOut( fabs( bbGetInputIn1() ) );
if (bbGetInputType()==19) bbSetOutputOut( (int)bbGetInputIn1() % (int)bbGetInputIn2() );
+ if (bbGetInputType()==20) if (bbGetInputIn1()<(int)bbGetInputIn2()) { bbSetOutputOut(1); } else { bbSetOutputOut(0); } ;
+ if (bbGetInputType()==21) if (bbGetInputIn1()>(int)bbGetInputIn2()) { bbSetOutputOut(1); } else { bbSetOutputOut(0); } ;
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
BBTK_CATEGORY("empty");
BBTK_INPUT(MathOperation,In1,"First input",double,"");
BBTK_INPUT(MathOperation,In2,"Second input",double,"");
- BBTK_INPUT(MathOperation,Type,"Type (defalult 0): 0 adition (default), 1 sustraction In1-In2, 2 multiplication In1*In2, 3 divisiuon In1/In2, 4 sqrt In1, 5 log In1, 6 exp In1, 7 incremental int [In1..In2], 8 random int [In1..In2], 9 sin In1-rad, 10 cos In1-rad, 11 tan In1-rad, 12 asin In 1, 13 acos In1, 14 atan In1, 15 atan2 In1 In2 , 16 min, 17 max, 18 abs In1, 19 module In1%In2 ",int,"");
+ BBTK_INPUT(MathOperation,Type,"Type (defalult 0): 0 adition (default), 1 sustraction In1-In2, 2 multiplication In1*In2, 3 divisiuon In1/In2, 4 sqrt In1, 5 log In1, 6 exp In1, 7 incremental int [In1..In2], 8 random int [In1..In2], 9 sin In1-rad, 10 cos In1-rad, 11 tan In1-rad, 12 asin In 1, 13 acos In1, 14 atan In1, 15 atan2 In1 In2 , 16 min, 17 max, 18 abs In1, 19 module In1%In2 , 20 lessThan In1<In2, 21 greaterThan In1>In2",int,"");
BBTK_OUTPUT(MathOperation,Out,"Output",double,"");
BBTK_END_DESCRIBE_BLACK_BOX(MathOperation);
resultVec.push_back( (int)bbGetInputIn0()[i] % (int)bbGetInputIn1()[i] );
} // for i
bbSetOutputOut( resultVec );
- } // Type 18
+ } // Type 19
+
+ if (bbGetInputType()==20)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ if (bbGetInputIn0()[i] < bbGetInputIn1()[i])
+ {
+ resultVec.push_back( 1 );
+ } else {
+ resultVec.push_back( 0 );
+ }
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 20
+
+ if (bbGetInputType()==21)
+ {
+ for (i=0;i<sizeVec;i++)
+ {
+ if (bbGetInputIn0()[i] > bbGetInputIn1()[i])
+ {
+ resultVec.push_back( 1 );
+ } else {
+ resultVec.push_back( 0 );
+ }
+ } // for i
+ bbSetOutputOut( resultVec );
+ } // Type 21
}
BBTK_INPUT(MathOperationVector,In7,"Input vector 7",std::vector<double>,"");
BBTK_INPUT(MathOperationVector,In8,"Input vector 8",std::vector<double>,"");
BBTK_INPUT(MathOperationVector,In9,"Input vector 9",std::vector<double>,"");
- BBTK_INPUT(MathOperationVector,Type,"Type (defalult 0): 0 adition (default) In0[i]+In1[i]+..+In9[i], -99 adition In0[i] In1[i] ... In[9], 1 sustraction In0[i]-In1[i]-..-In9[i], 2 multiplication In0[i]*In2[i]*...*In9[i], 3 division In0/In1/.../In9, 4 sqrt In1, 5 log10 In1, 6 exp In1, 7 incremental int [In0..In1], 8 random int [In0..In1], 9 (rad) sin In0, 10 (rad) cos In0, 11 tan (rad) In0, 12 asin In0, 13 acos In0, 14 atan In0, 15 atan2 In0 In1 , 16 min (In0[i],In1[i]..In9[i]), -16 min(In0) min(In1) ... min(In9) , 17 max (In0[i],In1[i]..In9[i]), -17 max(In0) max(In1) ... max(In9) , 18 abs In0 , 19 module In0[i]%In1[i] " ,int,"");
+ BBTK_INPUT(MathOperationVector,Type,"Type (defalult 0): 0 adition (default) In0[i]+In1[i]+..+In9[i], -99 adition In0[i] In1[i] ... In[9], 1 sustraction In0[i]-In1[i]-..-In9[i], 2 multiplication In0[i]*In2[i]*...*In9[i], 3 division In0/In1/.../In9, 4 sqrt In1, 5 log10 In1, 6 exp In1, 7 incremental int [In0..In1], 8 random int [In0..In1], 9 (rad) sin In0, 10 (rad) cos In0, 11 tan (rad) In0, 12 asin In0, 13 acos In0, 14 atan In0, 15 atan2 In0 In1 , 16 min (In0[i],In1[i]..In9[i]), -16 min(In0) min(In1) ... min(In9) , 17 max (In0[i],In1[i]..In9[i]), -17 max(In0) max(In1) ... max(In9) , 18 abs In0 , 19 module In0[i]%In1[i] , 20 lessThan In0[i]<In1[i], 21 greaterThan In0[i]>In1[i] " ,int,"");
BBTK_OUTPUT(MathOperationVector,Out,"Output vector",std::vector<double>,"");
int ipLstvec2;
double iLine;
int sizeLines = (*pLstVec[0]).size();
- double step = (double)sizeLines/(double)bbGetInputk1();
+ double step = (double)sizeLines/((double)bbGetInputk1()-1);
for (iLine=0 ; iLine<sizeLines ; iLine=iLine+step)
{
for (ipLstvec2=0 ; ipLstvec2<pLstVec.size() ; ipLstvec2++)
(*pLstVecOut[ipLstvec2]).push_back( (*pLstVec[ipLstvec2])[(int)iLine] );
} // for
} // for ipLstVec
+
+ // adding the lastone
+ for (ipLstvec2=0 ; ipLstvec2<pLstVec.size() ; ipLstvec2++)
+ {
+ (*pLstVecOut[ipLstvec2]).push_back( (*pLstVec[ipLstvec2])[(int)(sizeLines-1)] );
+ } // for
+
} // Type==1
if (bbGetInputType()==2) // Insert intermediate points