X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdMathOperationVector.h;fp=packages%2Fstd%2Fsrc%2FbbstdMathOperationVector.h;h=78015577974f52c5be935e5ebd108f2c3189f138;hb=427d8c0ac838ab789a57b28f62a7f9ff243e7b60;hp=0000000000000000000000000000000000000000;hpb=c2d2ccbc4bac635e5d0b802d9830efd94b060dab;p=bbtk.git diff --git a/packages/std/src/bbstdMathOperationVector.h b/packages/std/src/bbstdMathOperationVector.h new file mode 100644 index 0000000..7801557 --- /dev/null +++ b/packages/std/src/bbstdMathOperationVector.h @@ -0,0 +1,78 @@ +//===== +// 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) +//===== +#ifndef __bbstdMathOperationVector_h_INCLUDED__ +#define __bbstdMathOperationVector_h_INCLUDED__ +#include "bbstd_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +namespace bbstd +{ + +class bbstd_EXPORT MathOperationVector + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(MathOperationVector,bbtk::AtomicBlackBox); +//===== +// 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_DECLARE_INPUT(In0,std::vector ); + BBTK_DECLARE_INPUT(In1,std::vector ); + BBTK_DECLARE_INPUT(In2,std::vector ); + BBTK_DECLARE_INPUT(In3,std::vector ); + BBTK_DECLARE_INPUT(In4,std::vector ); + BBTK_DECLARE_INPUT(In5,std::vector ); + BBTK_DECLARE_INPUT(In6,std::vector ); + BBTK_DECLARE_INPUT(In7,std::vector ); + BBTK_DECLARE_INPUT(In8,std::vector ); + BBTK_DECLARE_INPUT(In9,std::vector ); + BBTK_DECLARE_INPUT(Type,int); + BBTK_DECLARE_OUTPUT(Out,std::vector ); + BBTK_PROCESS(Process); + void Process(); + + bool firsttime; + std::vector acum; + + double g(std::vector*v,unsigned int i,double defValue ); + void SumVector(std::vector *v,std::vector *vr); + void MinVector(std::vector *v,std::vector *vr); + void MaxVector(std::vector *v,std::vector *vr); + + +//===== +// 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_BEGIN_DESCRIBE_BLACK_BOX(MathOperationVector,bbtk::AtomicBlackBox); + BBTK_NAME("MathOperationVector"); + BBTK_AUTHOR("Info-Dev"); + BBTK_DESCRIPTION("Out[i] = In0[i] In1[i] In2[i] ... In8[i] In9[i]"); + BBTK_CATEGORY("empty"); + + BBTK_INPUT(MathOperationVector,In0,"Input vector 0",std::vector,""); + BBTK_INPUT(MathOperationVector,In1,"Input vector 1",std::vector,""); + BBTK_INPUT(MathOperationVector,In2,"Input vector 2",std::vector,""); + BBTK_INPUT(MathOperationVector,In3,"Input vector 3",std::vector,""); + BBTK_INPUT(MathOperationVector,In4,"Input vector 4",std::vector,""); + BBTK_INPUT(MathOperationVector,In5,"Input vector 5",std::vector,""); + BBTK_INPUT(MathOperationVector,In6,"Input vector 6",std::vector,""); + BBTK_INPUT(MathOperationVector,In7,"Input vector 7",std::vector,""); + BBTK_INPUT(MathOperationVector,In8,"Input vector 8",std::vector,""); + BBTK_INPUT(MathOperationVector,In9,"Input vector 9",std::vector,""); + 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_OUTPUT(MathOperationVector,Out,"Output vector",std::vector,""); + +BBTK_END_DESCRIBE_BLACK_BOX(MathOperationVector); +//===== +// 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) +//===== +} +// EO namespace bbstd + +#endif // __bbstdMathOperationVector_h_INCLUDED__ +