2 // 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)
4 #ifndef __bbstdMathOperationVector_h_INCLUDED__
5 #define __bbstdMathOperationVector_h_INCLUDED__
6 #include "bbstd_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
13 class bbstd_EXPORT MathOperationVector
15 public bbtk::AtomicBlackBox
17 BBTK_BLACK_BOX_INTERFACE(MathOperationVector,bbtk::AtomicBlackBox);
19 // 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)
21 BBTK_DECLARE_INPUT(In0,std::vector <double>);
22 BBTK_DECLARE_INPUT(In1,std::vector <double>);
23 BBTK_DECLARE_INPUT(In2,std::vector <double>);
24 BBTK_DECLARE_INPUT(In3,std::vector <double>);
25 BBTK_DECLARE_INPUT(In4,std::vector <double>);
26 BBTK_DECLARE_INPUT(In5,std::vector <double>);
27 BBTK_DECLARE_INPUT(In6,std::vector <double>);
28 BBTK_DECLARE_INPUT(In7,std::vector <double>);
29 BBTK_DECLARE_INPUT(In8,std::vector <double>);
30 BBTK_DECLARE_INPUT(In9,std::vector <double>);
31 BBTK_DECLARE_INPUT(Type,int);
32 BBTK_DECLARE_OUTPUT(Out,std::vector <double>);
33 BBTK_PROCESS(Process);
37 std::vector<double> acum;
39 double g(std::vector<double>*v,unsigned int i,double defValue );
40 void SumVector(std::vector<double> *v,std::vector<double> *vr);
41 void MinVector(std::vector<double> *v,std::vector<double> *vr);
42 void MaxVector(std::vector<double> *v,std::vector<double> *vr);
46 // 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)
50 BBTK_BEGIN_DESCRIBE_BLACK_BOX(MathOperationVector,bbtk::AtomicBlackBox);
51 BBTK_NAME("MathOperationVector");
52 BBTK_AUTHOR("Info-Dev");
53 BBTK_DESCRIPTION("Out[i] = In0[i] <operation> In1[i] <operation> In2[i] ... In8[i] <operation> In9[i]");
54 BBTK_CATEGORY("empty");
56 BBTK_INPUT(MathOperationVector,In0,"Input vector 0",std::vector<double>,"");
57 BBTK_INPUT(MathOperationVector,In1,"Input vector 1",std::vector<double>,"");
58 BBTK_INPUT(MathOperationVector,In2,"Input vector 2",std::vector<double>,"");
59 BBTK_INPUT(MathOperationVector,In3,"Input vector 3",std::vector<double>,"");
60 BBTK_INPUT(MathOperationVector,In4,"Input vector 4",std::vector<double>,"");
61 BBTK_INPUT(MathOperationVector,In5,"Input vector 5",std::vector<double>,"");
62 BBTK_INPUT(MathOperationVector,In6,"Input vector 6",std::vector<double>,"");
63 BBTK_INPUT(MathOperationVector,In7,"Input vector 7",std::vector<double>,"");
64 BBTK_INPUT(MathOperationVector,In8,"Input vector 8",std::vector<double>,"");
65 BBTK_INPUT(MathOperationVector,In9,"Input vector 9",std::vector<double>,"");
66 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], 22 Centre of Mass In0=lstX In1=lstY In2=lstZ In3=lstValues, 23 round In0[i], 24 rint In0[i], 25 floor In0[i], 26 ceil In0[i], 27 trunc In0[i]" ,int,"");
68 BBTK_OUTPUT(MathOperationVector,Out,"Output vector",std::vector<double>,"");
70 BBTK_END_DESCRIBE_BLACK_BOX(MathOperationVector);
72 // 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)
77 #endif // __bbstdMathOperationVector_h_INCLUDED__