Salome HOME
Merge from MrgToV7main1804
[modules/med.git] / src / MEDCoupling_Swig / MEDCouplingMemArray.i
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony Geay (CEA/DEN)
20
21 namespace ParaMEDMEM
22 {
23   class DataArray : public RefCountObject, public TimeLabel
24   {
25   public:
26     void setName(const char *name);
27     void copyStringInfoFrom(const DataArray& other) throw(INTERP_KERNEL::Exception);
28     void copyPartOfStringInfoFrom(const DataArray& other, const std::vector<int>& compoIds) throw(INTERP_KERNEL::Exception);
29     void copyPartOfStringInfoFrom2(const std::vector<int>& compoIds, const DataArray& other) throw(INTERP_KERNEL::Exception);
30     bool areInfoEqualsIfNotWhy(const DataArray& other, std::string& reason) const throw(INTERP_KERNEL::Exception);
31     bool areInfoEquals(const DataArray& other) const throw(INTERP_KERNEL::Exception);
32     std::string cppRepr(const char *varName) const throw(INTERP_KERNEL::Exception);
33     std::string getName() const;
34     void setInfoOnComponents(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
35     std::vector<std::string> getVarsOnComponent() const throw(INTERP_KERNEL::Exception);
36     std::vector<std::string> getUnitsOnComponent() const throw(INTERP_KERNEL::Exception);
37     std::string getInfoOnComponent(int i) const throw(INTERP_KERNEL::Exception);
38     std::string getVarOnComponent(int i) const throw(INTERP_KERNEL::Exception);
39     std::string getUnitOnComponent(int i) const throw(INTERP_KERNEL::Exception);
40     void setInfoOnComponent(int i, const char *info) throw(INTERP_KERNEL::Exception);
41     int getNumberOfComponents() const;
42     virtual int getNumberOfTuples() const throw(INTERP_KERNEL::Exception);
43     virtual std::size_t getNbOfElems() const throw(INTERP_KERNEL::Exception);
44     virtual std::size_t getNbOfElemAllocated() const throw(INTERP_KERNEL::Exception);
45     void checkNbOfTuples(int nbOfTuples, const char *msg) const throw(INTERP_KERNEL::Exception);
46     void checkNbOfComps(int nbOfCompo, const char *msg) const throw(INTERP_KERNEL::Exception);
47     void checkNbOfTuplesAndComp(const DataArray& other, const char *msg) const throw(INTERP_KERNEL::Exception);
48     void checkNbOfTuplesAndComp(int nbOfTuples, int nbOfCompo, const char *msg) const throw(INTERP_KERNEL::Exception);
49     void checkNbOfElems(std::size_t nbOfElems, const char *msg) const throw(INTERP_KERNEL::Exception);
50     static int GetNumberOfItemGivenBES(int begin, int end, int step, const char *msg) throw(INTERP_KERNEL::Exception);
51     static int GetNumberOfItemGivenBESRelative(int begin, int end, int step, const char *msg) throw(INTERP_KERNEL::Exception);
52     static int GetPosOfItemGivenBESRelativeNoThrow(int value, int begin, int end, int step) throw(INTERP_KERNEL::Exception);
53     static std::string GetVarNameFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception);
54     static std::string GetUnitFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception);
55     void updateTime() const;
56     %extend
57     {
58       PyObject *getInfoOnComponents() const throw(INTERP_KERNEL::Exception)
59       {
60         const std::vector<std::string>& comps=self->getInfoOnComponents();
61         PyObject *ret=PyList_New((int)comps.size());
62         for(int i=0;i<(int)comps.size();i++)
63           PyList_SetItem(ret,i,PyString_FromString(comps[i].c_str()));
64         return ret;
65       }
66       
67       void copyPartOfStringInfoFrom(const DataArray& other, PyObject *li) throw(INTERP_KERNEL::Exception)
68       {
69         std::vector<int> tmp;
70         convertPyToNewIntArr3(li,tmp);
71         self->copyPartOfStringInfoFrom(other,tmp);
72       }
73
74       void copyPartOfStringInfoFrom2(PyObject *li, const DataArray& other) throw(INTERP_KERNEL::Exception)
75       {
76         std::vector<int> tmp;
77         convertPyToNewIntArr3(li,tmp);
78         self->copyPartOfStringInfoFrom2(tmp,other);
79       }
80     }
81   };
82   
83   class DataArrayInt;
84   class DataArrayDoubleIterator;
85   
86   class DataArrayDouble : public DataArray
87   {
88   public:
89     static DataArrayDouble *New();
90     bool isAllocated() const throw(INTERP_KERNEL::Exception);
91     void checkAllocated() const throw(INTERP_KERNEL::Exception);
92     void setInfoAndChangeNbOfCompo(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
93     double doubleValue() const throw(INTERP_KERNEL::Exception);
94     bool empty() const throw(INTERP_KERNEL::Exception);
95     DataArrayDouble *deepCpy() const throw(INTERP_KERNEL::Exception);
96     DataArrayDouble *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception);
97     void cpyFrom(const DataArrayDouble& other) throw(INTERP_KERNEL::Exception);
98     void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception);
99     void pushBackSilent(double val) throw(INTERP_KERNEL::Exception);
100     void pushBackValsSilent(const double *valsBg, const double *valsEnd) throw(INTERP_KERNEL::Exception);
101     double popBackSilent() throw(INTERP_KERNEL::Exception);
102     void pack() const throw(INTERP_KERNEL::Exception);
103     void alloc(int nbOfTuple, int nbOfCompo=1) throw(INTERP_KERNEL::Exception);
104     void allocIfNecessary(int nbOfTuple, int nbOfCompo) throw(INTERP_KERNEL::Exception);
105     void fillWithZero() throw(INTERP_KERNEL::Exception);
106     void fillWithValue(double val) throw(INTERP_KERNEL::Exception);
107     void iota(double init=0.) throw(INTERP_KERNEL::Exception);
108     bool isUniform(double val, double eps) const throw(INTERP_KERNEL::Exception);
109     void sort(bool asc=true) throw(INTERP_KERNEL::Exception);
110     void reverse() throw(INTERP_KERNEL::Exception);
111     void checkMonotonic(bool increasing, double eps) const throw(INTERP_KERNEL::Exception);
112     bool isMonotonic(bool increasing, double eps) const throw(INTERP_KERNEL::Exception);
113     std::string repr() const throw(INTERP_KERNEL::Exception);
114     std::string reprZip() const throw(INTERP_KERNEL::Exception);
115     bool isEqual(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception);
116     bool isEqualWithoutConsideringStr(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception);
117     void reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception);
118     DataArrayInt *convertToIntArr() const;
119     DataArrayDouble *fromNoInterlace() const throw(INTERP_KERNEL::Exception);
120     DataArrayDouble *toNoInterlace() const throw(INTERP_KERNEL::Exception);
121     DataArrayDouble *selectByTupleId2(int bg, int end2, int step) const throw(INTERP_KERNEL::Exception);
122     DataArrayDouble *substr(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception);
123     void rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception);
124     void transpose() throw(INTERP_KERNEL::Exception);
125     DataArrayDouble *changeNbOfComponents(int newNbOfComp, double dftValue) const throw(INTERP_KERNEL::Exception);
126     void meldWith(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
127     DataArrayDouble *duplicateEachTupleNTimes(int nbTimes) const throw(INTERP_KERNEL::Exception);
128     DataArrayDouble *getDifferentValues(double prec, int limitTupleId=-1) const throw(INTERP_KERNEL::Exception);
129     DataArrayInt *findClosestTupleId(const DataArrayDouble *other) const throw(INTERP_KERNEL::Exception);
130     void setPartOfValues1(const DataArrayDouble *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw(INTERP_KERNEL::Exception);
131     void setPartOfValuesSimple1(double a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception);
132     void setPartOfValuesAdv(const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception);
133     void setContigPartOfSelectedValues(int tupleIdStart, const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception);
134     void setContigPartOfSelectedValues2(int tupleIdStart, const DataArrayDouble *a, int bg, int end2, int step) throw(INTERP_KERNEL::Exception);
135     double getIJ(int tupleId, int compoId) const;
136     double back() const throw(INTERP_KERNEL::Exception);
137     double getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
138     void setIJ(int tupleId, int compoId, double newVal) throw(INTERP_KERNEL::Exception);
139     void setIJSilent(int tupleId, int compoId, double newVal) throw(INTERP_KERNEL::Exception);
140     double *getPointer() throw(INTERP_KERNEL::Exception);
141     void checkNoNullValues() const throw(INTERP_KERNEL::Exception);
142     DataArrayDouble *computeBBoxPerTuple(double epsilon=0.0) const throw(INTERP_KERNEL::Exception);
143     void recenterForMaxPrecision(double eps) throw(INTERP_KERNEL::Exception);
144     double getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
145     double getMaxValueInArray() const throw(INTERP_KERNEL::Exception);
146     double getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
147     double getMinValueInArray() const throw(INTERP_KERNEL::Exception);
148     double getAverageValue() const throw(INTERP_KERNEL::Exception);
149     double norm2() const throw(INTERP_KERNEL::Exception);
150     double normMax() const throw(INTERP_KERNEL::Exception);
151     void accumulate(double *res) const throw(INTERP_KERNEL::Exception);
152     double accumulate(int compId) const throw(INTERP_KERNEL::Exception);
153     DataArrayDouble *fromPolarToCart() const throw(INTERP_KERNEL::Exception);
154     DataArrayDouble *fromCylToCart() const throw(INTERP_KERNEL::Exception);
155     DataArrayDouble *fromSpherToCart() const throw(INTERP_KERNEL::Exception);
156     DataArrayDouble *doublyContractedProduct() const throw(INTERP_KERNEL::Exception);
157     DataArrayDouble *determinant() const throw(INTERP_KERNEL::Exception);
158     DataArrayDouble *eigenValues() const throw(INTERP_KERNEL::Exception);
159     DataArrayDouble *eigenVectors() const throw(INTERP_KERNEL::Exception);
160     DataArrayDouble *inverse() const throw(INTERP_KERNEL::Exception);
161     DataArrayDouble *trace() const throw(INTERP_KERNEL::Exception);
162     DataArrayDouble *deviator() const throw(INTERP_KERNEL::Exception);
163     DataArrayDouble *magnitude() const throw(INTERP_KERNEL::Exception);
164     DataArrayDouble *maxPerTuple() const throw(INTERP_KERNEL::Exception);
165     DataArrayDouble *buildEuclidianDistanceDenseMatrix() const throw(INTERP_KERNEL::Exception);
166     DataArrayDouble *buildEuclidianDistanceDenseMatrixWith(const DataArrayDouble *other) const throw(INTERP_KERNEL::Exception);
167     void sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception);
168     void abs() throw(INTERP_KERNEL::Exception);
169     void applyLin(double a, double b, int compoId) throw(INTERP_KERNEL::Exception);
170     void applyLin(double a, double b) throw(INTERP_KERNEL::Exception);
171     void applyInv(double numerator) throw(INTERP_KERNEL::Exception);
172     void applyPow(double val) throw(INTERP_KERNEL::Exception);
173     void applyRPow(double val) throw(INTERP_KERNEL::Exception);
174     DataArrayDouble *negate() const throw(INTERP_KERNEL::Exception);
175     DataArrayDouble *applyFunc(int nbOfComp, FunctionToEvaluate func) const throw(INTERP_KERNEL::Exception);
176     DataArrayDouble *applyFunc(int nbOfComp, const char *func) const throw(INTERP_KERNEL::Exception);
177     DataArrayDouble *applyFunc(const char *func) const throw(INTERP_KERNEL::Exception);
178     DataArrayDouble *applyFunc2(int nbOfComp, const char *func) const throw(INTERP_KERNEL::Exception);
179     DataArrayDouble *applyFunc3(int nbOfComp, const std::vector<std::string>& varsOrder, const char *func) const throw(INTERP_KERNEL::Exception);
180     void applyFuncFast32(const char *func) throw(INTERP_KERNEL::Exception);
181     void applyFuncFast64(const char *func) throw(INTERP_KERNEL::Exception);
182     DataArrayInt *getIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
183     static DataArrayDouble *Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
184     static DataArrayDouble *Aggregate(const std::vector<const DataArrayDouble *>& arr) throw(INTERP_KERNEL::Exception);
185     static DataArrayDouble *Meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
186     static DataArrayDouble *Meld(const std::vector<const DataArrayDouble *>& arr) throw(INTERP_KERNEL::Exception);
187     static DataArrayDouble *Dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
188     static DataArrayDouble *CrossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
189     static DataArrayDouble *Max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
190     static DataArrayDouble *Min(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
191     static DataArrayDouble *Add(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
192     void addEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
193     static DataArrayDouble *Substract(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
194     void substractEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
195     static DataArrayDouble *Multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
196     void multiplyEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
197     static DataArrayDouble *Divide(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
198     void divideEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
199     static DataArrayDouble *Pow(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
200     void powEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
201     %extend
202     {
203       DataArrayDouble() throw(INTERP_KERNEL::Exception)
204         {
205           return DataArrayDouble::New();
206         }
207
208       static DataArrayDouble *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *elt2=0) throw(INTERP_KERNEL::Exception)
209       {
210         const char *msg="ParaMEDMEM::DataArrayDouble::New : Available API are : \n-DataArrayDouble.New()\n-DataArrayDouble.New([1.,3.,4.])\n-DataArrayDouble.New([1.,3.,4.],3)\n-DataArrayDouble.New([1.,3.,4.,5.],2,2)\n-DataArrayDouble.New([1.,3.,4.,5.,7,8.],3,2)\n-DataArrayDouble.New(5)\n-DataArrayDouble.New(5,2) !";
211         if(PyList_Check(elt0) || PyTuple_Check(elt0))
212           {
213             if(nbOfTuples)
214               {
215                 if(PyInt_Check(nbOfTuples))
216                   {
217                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
218                     if(nbOfTuples1<0)
219                       throw INTERP_KERNEL::Exception("DataArrayDouble::New : should be a positive set of allocated memory !");
220                     if(elt2)
221                       {
222                         if(PyInt_Check(elt2))
223                           {//DataArrayDouble.New([1.,3.,4.,5.],2,2)
224                             int nbOfCompo=PyInt_AS_LONG(elt2);
225                             if(nbOfCompo<0)
226                               throw INTERP_KERNEL::Exception("DataArrayDouble::New : should be a positive number of components !");
227                             MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::New();
228                             std::vector<double> tmp=fillArrayWithPyListDbl2(elt0,nbOfTuples1,nbOfCompo);
229                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
230                             return ret.retn();
231                           }
232                         else
233                           throw INTERP_KERNEL::Exception(msg);
234                       }
235                     else
236                       {//DataArrayDouble.New([1.,3.,4.],3)
237                         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::New();
238                         int tmpp1=-1;
239                         std::vector<double> tmp=fillArrayWithPyListDbl2(elt0,nbOfTuples1,tmpp1);
240                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
241                         return ret.retn();
242                       }
243                   }
244                 else
245                   throw INTERP_KERNEL::Exception(msg);
246               }
247             else
248               {// DataArrayDouble.New([1.,3.,4.])
249                 MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::New();
250                 int tmpp1=-1,tmpp2=-1;
251                 std::vector<double> tmp=fillArrayWithPyListDbl2(elt0,tmpp1,tmpp2);
252                 ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
253                 return ret.retn();
254               }
255           }
256         else if(PyInt_Check(elt0))
257           {
258             int nbOfTuples1=PyInt_AS_LONG(elt0);
259             if(nbOfTuples1<0)
260               throw INTERP_KERNEL::Exception("DataArrayDouble::New : should be a positive set of allocated memory !");
261             if(nbOfTuples)
262               {
263                 if(!elt2)
264                   {
265                     if(PyInt_Check(nbOfTuples))
266                       {//DataArrayDouble.New(5,2)
267                         int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
268                         if(nbOfCompo<0)
269                           throw INTERP_KERNEL::Exception("DataArrayDouble::New : should be a positive number of components !");
270                         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::New();
271                         ret->alloc(nbOfTuples1,nbOfCompo);
272                         return ret.retn();
273                       }
274                     else
275                       throw INTERP_KERNEL::Exception(msg);
276                   }
277                 else
278                   throw INTERP_KERNEL::Exception(msg);
279               }
280             else
281               {//DataArrayDouble.New(5)
282                 MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::New();
283                 ret->alloc(nbOfTuples1,1);
284                 return ret.retn();
285               }
286           }
287 #ifdef WITH_NUMPY
288         else if(PyArray_Check(elt0))
289           {//DataArrayDouble.New(numpyArray)
290             return BuildNewInstance<DataArrayDouble,double>(elt0,NPY_DOUBLE,&PyCallBackDataArrayDouble_RefType,"FLOAT64");
291           }
292 #endif
293         else
294           throw INTERP_KERNEL::Exception(msg);
295       }
296    
297       DataArrayDouble(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *elt2=0) throw(INTERP_KERNEL::Exception)
298         {
299           return ParaMEDMEM_DataArrayDouble_New__SWIG_1(elt0,nbOfTuples,elt2);
300         }
301
302       void pushBackValsSilent(PyObject *li) throw(INTERP_KERNEL::Exception)
303       {
304         double val;
305         std::vector<double> bb;
306         int sw,nbTuples=-1;
307         const char msg[]="Python wrap of DataArrayDouble::pushBackValsSilent : ";
308         const double *tmp=convertObjToPossibleCpp5_SingleCompo(li,sw,val,bb,msg,true,nbTuples);
309         self->pushBackValsSilent(tmp,tmp+nbTuples);
310       }
311
312       std::string __repr__() const throw(INTERP_KERNEL::Exception)
313       {
314         std::ostringstream oss;
315         self->reprQuickOverview(oss);
316         return oss.str();
317       }
318
319       std::string __str__() const throw(INTERP_KERNEL::Exception)
320       {
321         return self->repr();
322       }
323
324       double __float__() const throw(INTERP_KERNEL::Exception)
325       {
326         return self->doubleValue();
327       }
328
329       int __len__() const throw(INTERP_KERNEL::Exception)
330       {
331         if(self->isAllocated())
332           {
333             return self->getNumberOfTuples();
334           }
335         else
336           {
337             throw INTERP_KERNEL::Exception("DataArrayDouble::__len__ : Instance is NOT allocated !");
338           }
339       }
340
341       DataArrayDoubleIterator *__iter__()
342       {
343         return self->iterator();
344       }
345    
346       void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
347       {
348         const char *msg="ParaMEDMEM::DataArrayDouble::setValues : Available API are : \n-DataArrayDouble.setValues([1.,3.,4.])\n-DataArrayDouble.setValues([1.,3.,4.],3)\n-DataArrayDouble.setValues([1.,3.,4.,5.],2,2)\n-DataArrayDouble.setValues([(1.,1.7),(3.,3.7),(4.,4.7)])\n !";
349         if(PyList_Check(li) || PyTuple_Check(li))
350           {
351             if(nbOfTuples)
352               {
353                 if(PyInt_Check(nbOfTuples))
354                   {
355                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
356                     if(nbOfTuples1<0)
357                       throw INTERP_KERNEL::Exception("DataArrayDouble::setValues : should be a positive set of allocated memory !");
358                     if(nbOfComp)
359                       {
360                         if(PyInt_Check(nbOfComp))
361                           {//DataArrayDouble.setValues([1.,3.,4.,5.],2,2)
362                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
363                             if(nbOfCompo<0)
364                               throw INTERP_KERNEL::Exception("DataArrayDouble::setValues : should be a positive number of components !");
365                             std::vector<double> tmp=fillArrayWithPyListDbl2(li,nbOfTuples1,nbOfCompo);
366                             self->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),self->getPointer());
367                           }
368                         else
369                           throw INTERP_KERNEL::Exception(msg);
370                       }
371                     else
372                       {//DataArrayDouble.setValues([1.,3.,4.],3)
373                         int tmpp1=-1;
374                         std::vector<double> tmp=fillArrayWithPyListDbl2(li,nbOfTuples1,tmpp1);
375                         self->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),self->getPointer());
376                       }
377                   }
378                 else
379                   throw INTERP_KERNEL::Exception(msg);
380               }
381             else
382               {// DataArrayDouble.setValues([1.,3.,4.])
383                 int tmpp1=-1,tmpp2=-1;
384                 std::vector<double> tmp=fillArrayWithPyListDbl2(li,tmpp1,tmpp2);
385                 self->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),self->getPointer());
386               }
387           }
388         else
389           throw INTERP_KERNEL::Exception(msg);
390       }
391
392       PyObject *getValues() const throw(INTERP_KERNEL::Exception)
393       {
394         const double *vals=self->getConstPointer();
395         return convertDblArrToPyList(vals,self->getNbOfElems());
396       }
397
398 #ifdef WITH_NUMPY
399       PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
400       {
401         return ToNumPyArray<DataArrayDouble,double>(self,NPY_DOUBLE,"DataArrayDouble");
402       }
403 #endif
404
405       PyObject *isEqualIfNotWhy(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception)
406       {
407         std::string ret1;
408         bool ret0=self->isEqualIfNotWhy(other,prec,ret1);
409         PyObject *ret=PyTuple_New(2);
410         PyObject *ret0Py=ret0?Py_True:Py_False;
411         Py_XINCREF(ret0Py);
412         PyTuple_SetItem(ret,0,ret0Py);
413         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
414         return ret;
415       }
416
417       PyObject *getValuesAsTuple() const throw(INTERP_KERNEL::Exception)
418       {
419         const double *vals=self->getConstPointer();
420         int nbOfComp=self->getNumberOfComponents();
421         int nbOfTuples=self->getNumberOfTuples();
422         return convertDblArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
423       }
424
425       DataArrayDouble *renumber(PyObject *li) throw(INTERP_KERNEL::Exception)
426       {
427         void *da=0;
428         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
429         if (!SWIG_IsOK(res1))
430           {
431             int size;
432             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
433             if(size!=self->getNumberOfTuples())
434               {
435                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
436               }
437             return self->renumber(tmp);
438           }
439         else
440           {
441             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
442             if(!da2)
443               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
444             da2->checkAllocated();
445             int size=self->getNumberOfTuples();
446             if(size!=self->getNumberOfTuples())
447               {
448                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
449               }
450             return self->renumber(da2->getConstPointer());
451           }
452       }
453
454       DataArrayDouble *renumberR(PyObject *li) throw(INTERP_KERNEL::Exception)
455       {
456         void *da=0;
457         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
458         if (!SWIG_IsOK(res1))
459           {
460             int size;
461             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
462             if(size!=self->getNumberOfTuples())
463               {
464                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
465               }
466             return self->renumberR(tmp);
467           }
468         else
469           {
470             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
471             if(!da2)
472               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
473             da2->checkAllocated();
474             int size=self->getNumberOfTuples();
475             if(size!=self->getNumberOfTuples())
476               {
477                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
478               }
479             return self->renumberR(da2->getConstPointer());
480           }
481       }
482
483       DataArrayDouble *renumberAndReduce(PyObject *li, int newNbOfTuple) throw(INTERP_KERNEL::Exception)
484       {
485         void *da=0;
486         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
487         if (!SWIG_IsOK(res1))
488           {
489             int size;
490             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
491             if(size!=self->getNumberOfTuples())
492               {
493                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
494               }
495             return self->renumberAndReduce(tmp,newNbOfTuple);
496           }
497         else
498           {
499             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
500             if(!da2)
501               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
502             da2->checkAllocated();
503             int size=self->getNumberOfTuples();
504             if(size!=self->getNumberOfTuples())
505               {
506                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
507               }
508             return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
509           }
510       }
511
512       void renumberInPlace(PyObject *li) throw(INTERP_KERNEL::Exception)
513       {
514         void *da=0;
515         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
516         if (!SWIG_IsOK(res1))
517           {
518             int size;
519             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
520             if(size!=self->getNumberOfTuples())
521               {
522                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
523               }
524             self->renumberInPlace(tmp);
525           }
526         else
527           {
528             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
529             if(!da2)
530               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
531             da2->checkAllocated();
532             int size=self->getNumberOfTuples();
533             if(size!=self->getNumberOfTuples())
534               {
535                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
536               }
537             self->renumberInPlace(da2->getConstPointer());
538           }
539       }
540
541       void renumberInPlaceR(PyObject *li) throw(INTERP_KERNEL::Exception)
542       {
543         void *da=0;
544         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
545         if (!SWIG_IsOK(res1))
546           {
547             int size;
548             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
549             if(size!=self->getNumberOfTuples())
550               {
551                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
552               }
553             self->renumberInPlaceR(tmp);
554           }
555         else
556           {
557             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
558             if(!da2)
559               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
560             da2->checkAllocated();
561             int size=self->getNumberOfTuples();
562             if(size!=self->getNumberOfTuples())
563               {
564                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
565               }
566             self->renumberInPlaceR(da2->getConstPointer());
567           }
568       }
569
570       DataArrayDouble *selectByTupleId(PyObject *li) const throw(INTERP_KERNEL::Exception)
571       {
572         void *da=0;
573         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
574         if (!SWIG_IsOK(res1))
575           {
576             int size;
577             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
578             return self->selectByTupleId(tmp,tmp+size);
579           }
580         else
581           {
582             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
583             if(!da2)
584               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
585             da2->checkAllocated();
586             return self->selectByTupleId(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
587           }
588       }
589
590       DataArrayDouble *selectByTupleIdSafe(PyObject *li) const throw(INTERP_KERNEL::Exception)
591       {
592         void *da=0;
593         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
594         if (!SWIG_IsOK(res1))
595           {
596             int size;
597             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
598             return self->selectByTupleIdSafe(tmp,tmp+size);
599           }
600         else
601           {
602             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
603             if(!da2)
604               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
605             da2->checkAllocated();
606             return self->selectByTupleIdSafe(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
607           }
608       }
609
610       PyObject *minimalDistanceTo(const DataArrayDouble *other) const throw(INTERP_KERNEL::Exception)
611       {
612         int thisTupleId,otherTupleId;
613         double r0=self->minimalDistanceTo(other,thisTupleId,otherTupleId);
614         PyObject *ret=PyTuple_New(3);
615         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r0));
616         PyTuple_SetItem(ret,1,PyInt_FromLong(thisTupleId));
617         PyTuple_SetItem(ret,2,PyInt_FromLong(otherTupleId));
618         return ret;
619       }
620
621       PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
622       {
623         int tmp;
624         double r1=self->getMaxValue(tmp);
625         PyObject *ret=PyTuple_New(2);
626         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
627         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
628         return ret;
629       }
630
631       PyObject *getMaxValue2() const throw(INTERP_KERNEL::Exception)
632       {
633         DataArrayInt *tmp;
634         double r1=self->getMaxValue2(tmp);
635         PyObject *ret=PyTuple_New(2);
636         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
637         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
638         return ret;
639       }
640
641       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
642       {
643         int tmp;
644         double r1=self->getMinValue(tmp);
645         PyObject *ret=PyTuple_New(2);
646         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
647         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
648         return ret;
649       }
650
651       PyObject *getMinValue2() const throw(INTERP_KERNEL::Exception)
652       {
653         DataArrayInt *tmp;
654         double r1=self->getMinValue2(tmp);
655         PyObject *ret=PyTuple_New(2);
656         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
657         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
658         return ret;
659       }
660
661       PyObject *getMinMaxPerComponent() const throw(INTERP_KERNEL::Exception)
662       {
663         int nbOfCompo=self->getNumberOfComponents();
664         INTERP_KERNEL::AutoPtr<double> tmp=new double[2*nbOfCompo];
665         self->getMinMaxPerComponent(tmp);
666         PyObject *ret=convertDblArrToPyListOfTuple(tmp,2,nbOfCompo);
667         return ret;
668       }
669
670       PyObject *accumulate() const throw(INTERP_KERNEL::Exception)
671       {
672         int sz=self->getNumberOfComponents();
673         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
674         self->accumulate(tmp);
675         return convertDblArrToPyList(tmp,sz);
676       }
677    
678       DataArrayDouble *keepSelectedComponents(PyObject *li) const throw(INTERP_KERNEL::Exception)
679       {
680         std::vector<int> tmp;
681         convertPyToNewIntArr3(li,tmp);
682         return self->keepSelectedComponents(tmp);
683       }
684
685       PyObject *findCommonTuples(double prec, int limitNodeId=-1) const throw(INTERP_KERNEL::Exception)
686       {
687         DataArrayInt *comm, *commIndex;
688         self->findCommonTuples(prec,limitNodeId,comm,commIndex);
689         PyObject *res = PyList_New(2);
690         PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(comm),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
691         PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(commIndex),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
692         return res;
693       }
694
695       PyObject *distanceToTuple(PyObject *tuple) const throw(INTERP_KERNEL::Exception)
696       {
697         double val;
698         DataArrayDouble *a;
699         DataArrayDoubleTuple *aa;
700         std::vector<double> bb;
701         int sw;
702         int tupleId=-1,nbOfCompo=self->getNumberOfComponents();
703         const double *pt=convertObjToPossibleCpp5_Safe(tuple,sw,val,a,aa,bb,"Python wrap of DataArrayDouble::distanceToTuple",1,nbOfCompo,true);
704         //
705         double ret0=self->distanceToTuple(pt,pt+nbOfCompo,tupleId);
706         PyObject *ret=PyTuple_New(2);
707         PyTuple_SetItem(ret,0,PyFloat_FromDouble(ret0));
708         PyTuple_SetItem(ret,1,PyInt_FromLong(tupleId));
709         return ret;
710       }
711
712       void setSelectedComponents(const DataArrayDouble *a, PyObject *li) throw(INTERP_KERNEL::Exception)
713       {
714         std::vector<int> tmp;
715         convertPyToNewIntArr3(li,tmp);
716         self->setSelectedComponents(a,tmp);
717       }
718    
719       PyObject *getTuple(int tupleId) throw(INTERP_KERNEL::Exception)
720       {
721         int sz=self->getNumberOfComponents();
722         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
723         self->getTuple(tupleId,tmp);
724         return convertDblArrToPyList(tmp,sz);
725       }
726
727       static DataArrayDouble *Aggregate(PyObject *li) throw(INTERP_KERNEL::Exception)
728       {
729         std::vector<const DataArrayDouble *> tmp;
730         convertFromPyObjVectorOfObj<const DataArrayDouble *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayDouble,"DataArrayDouble",tmp);
731         return DataArrayDouble::Aggregate(tmp);
732       }
733
734       static DataArrayDouble *Meld(PyObject *li) throw(INTERP_KERNEL::Exception)
735       {
736         std::vector<const DataArrayDouble *> tmp;
737         convertFromPyObjVectorOfObj<const DataArrayDouble *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayDouble,"DataArrayDouble",tmp);
738         return DataArrayDouble::Meld(tmp);
739       }
740
741       DataArrayDouble *selectByTupleRanges(PyObject *li) const throw(INTERP_KERNEL::Exception)
742       {
743         std::vector<std::pair<int,int> > ranges;
744         convertPyToVectorPairInt(li,ranges);
745         return self->selectByTupleRanges(ranges);
746       }
747
748       PyObject *computeTupleIdsNearTuples(PyObject *pt, double eps) const throw(INTERP_KERNEL::Exception)
749       {
750         double val;
751         DataArrayDouble *a;
752         DataArrayDoubleTuple *aa;
753         std::vector<double> bb;
754         int sw;
755         int nbComp=self->getNumberOfComponents(),nbTuples=-1;
756         const char msg[]="Python wrap of DataArrayDouble::computeTupleIdsNearTuples : ";
757         const double *pos=convertObjToPossibleCpp5_Safe2(pt,sw,val,a,aa,bb,msg,nbComp,true,nbTuples);
758         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> inpu=DataArrayDouble::New(); inpu->useArray(pos,false,CPP_DEALLOC,nbTuples,nbComp);
759         DataArrayInt *c=0,*cI=0;
760         self->computeTupleIdsNearTuples(inpu,eps,c,cI);
761         PyObject *ret=PyTuple_New(2);
762         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
763         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
764         return ret;
765       }
766
767       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
768       {
769         const char msg[]="Unexpected situation in DataArrayDouble::__getitem__ !";
770         const char msg2[]="DataArrayDouble::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
771         self->checkAllocated();
772         int nbOfTuples=self->getNumberOfTuples();
773         int nbOfComponents=self->getNumberOfComponents();
774         int it1,ic1;
775         std::vector<int> vt1,vc1;
776         std::pair<int, std::pair<int,int> > pt1,pc1;
777         DataArrayInt *dt1=0,*dc1=0;
778         int sw;
779         convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
780         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret;
781         switch(sw)
782           {
783           case 1:
784             if(nbOfComponents==1)
785               return PyFloat_FromDouble(self->getIJSafe(it1,0));
786             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&it1,&it1+1)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
787           case 2:
788             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size())),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
789           case 3:
790             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleId2(pt1.first,pt1.second.first,pt1.second.second)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
791           case 4:
792             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems())),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
793           case 5:
794             return PyFloat_FromDouble(self->getIJSafe(it1,ic1));
795           case 6:
796             {
797               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
798               std::vector<int> v2(1,ic1);
799               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
800             }
801           case 7:
802             {
803               ret=self->selectByTupleId2(pt1.first,pt1.second.first,pt1.second.second);
804               std::vector<int> v2(1,ic1);
805               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
806             }
807           case 8:
808             {
809               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
810               std::vector<int> v2(1,ic1);
811               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
812             }
813           case 9:
814             {
815               ret=self->selectByTupleIdSafe(&it1,&it1+1);
816               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
817             }
818           case 10:
819             {
820               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
821               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
822             }
823           case 11:
824             {
825               ret=self->selectByTupleId2(pt1.first,pt1.second.first,pt1.second.second);
826               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
827             }
828           case 12:
829             {
830               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
831               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
832             }
833           case 13:
834             {
835               ret=self->selectByTupleIdSafe(&it1,&it1+1);
836               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
837               std::vector<int> v2(nbOfComp);
838               for(int i=0;i<nbOfComp;i++)
839                 v2[i]=pc1.first+i*pc1.second.second;
840               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
841             }
842           case 14:
843             {
844               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
845               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
846               std::vector<int> v2(nbOfComp);
847               for(int i=0;i<nbOfComp;i++)
848                 v2[i]=pc1.first+i*pc1.second.second;
849               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
850             }
851           case 15:
852             {
853               ret=self->selectByTupleId2(pt1.first,pt1.second.first,pt1.second.second);
854               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
855               std::vector<int> v2(nbOfComp);
856               for(int i=0;i<nbOfComp;i++)
857                 v2[i]=pc1.first+i*pc1.second.second;
858               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
859             }
860           case 16:
861             {
862               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
863               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
864               std::vector<int> v2(nbOfComp);
865               for(int i=0;i<nbOfComp;i++)
866                 v2[i]=pc1.first+i*pc1.second.second;
867               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
868             }
869           default:
870             throw INTERP_KERNEL::Exception(msg);
871           }
872       }
873
874       DataArrayDouble *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
875       {
876         self->checkAllocated();
877         const char msg[]="Unexpected situation in DataArrayDouble::__setitem__ !";
878         int nbOfTuples=self->getNumberOfTuples();
879         int nbOfComponents=self->getNumberOfComponents();
880         int sw1,sw2;
881         double i1;
882         std::vector<double> v1;
883         DataArrayDouble *d1=0;
884         convertObjToPossibleCpp4(value,sw1,i1,v1,d1);
885         int it1,ic1;
886         std::vector<int> vt1,vc1;
887         std::pair<int, std::pair<int,int> > pt1,pc1;
888         DataArrayInt *dt1=0,*dc1=0;
889         convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw2,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
890         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> tmp;
891         switch(sw2)
892           {
893           case 1:
894             {
895               switch(sw1)
896                 {
897                 case 1:
898                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,0,nbOfComponents,1);
899                   return self;
900                 case 2:
901                   tmp=DataArrayDouble::New();
902                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
903                   self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1,false);
904                   return self;
905                 case 3:
906                   self->setPartOfValues1(d1,it1,it1+1,1,0,nbOfComponents,1);
907                   return self;
908                 default:
909                   throw INTERP_KERNEL::Exception(msg);
910                 }
911               break;
912             }
913           case 2:
914             {
915               switch(sw1)
916                 {
917                 case 1:
918                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
919                   return self;
920                 case 2:
921                   tmp=DataArrayDouble::New();
922                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
923                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1,false);
924                   return self;
925                 case 3:
926                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
927                   return self;
928                 default:
929                   throw INTERP_KERNEL::Exception(msg);
930                 }
931               break;
932             }
933           case 3:
934             {
935               switch(sw1)
936                 {
937                 case 1:
938                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
939                   return self;
940                 case 2:
941                   tmp=DataArrayDouble::New();
942                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
943                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1,false);
944                   return self;
945                 case 3:
946                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
947                   return self;
948                 default:
949                   throw INTERP_KERNEL::Exception(msg);
950                 }
951               break;
952             }
953           case 4:
954             {
955               switch(sw1)
956                 {
957                 case 1:
958                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
959                   return self;
960                 case 2:
961                   tmp=DataArrayDouble::New();
962                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
963                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1,false);
964                   return self;
965                 case 3:
966                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
967                   return self;
968                 default:
969                   throw INTERP_KERNEL::Exception(msg);
970                 }
971               break;
972             }
973           case 5:
974             {
975               switch(sw1)
976                 {
977                 case 1:
978                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,ic1,ic1+1,1);
979                   return self;
980                 case 2:
981                   tmp=DataArrayDouble::New();
982                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
983                   self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1,false);
984                   return self;
985                 case 3:
986                   self->setPartOfValues1(d1,it1,it1+1,1,ic1,ic1+1,1);
987                   return self;
988                 default:
989                   throw INTERP_KERNEL::Exception(msg);
990                 }
991               break;
992             }
993           case 6:
994             {
995               switch(sw1)
996                 {
997                 case 1:
998                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
999                   return self;
1000                 case 2:
1001                   tmp=DataArrayDouble::New();
1002                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1003                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1,false);
1004                   return self;
1005                 case 3:
1006                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
1007                   return self;
1008                 default:
1009                   throw INTERP_KERNEL::Exception(msg);
1010                 }
1011               break;
1012             }
1013           case 7:
1014             {
1015               switch(sw1)
1016                 {
1017                 case 1:
1018                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
1019                   return self;
1020                 case 2:
1021                   tmp=DataArrayDouble::New();
1022                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1023                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1,false);
1024                   return self;
1025                 case 3:
1026                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
1027                   return self;
1028                 default:
1029                   throw INTERP_KERNEL::Exception(msg);
1030                 }
1031               break;
1032             }
1033           case 8:
1034             {
1035               switch(sw1)
1036                 {
1037                 case 1:
1038                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
1039                   return self;
1040                 case 2:
1041                   tmp=DataArrayDouble::New();
1042                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1043                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1,false);
1044                   return self;
1045                 case 3:
1046                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
1047                   return self;
1048                 default:
1049                   throw INTERP_KERNEL::Exception(msg);
1050                 }
1051               break;
1052             }
1053           case 9:
1054             {
1055               switch(sw1)
1056                 {
1057                 case 1:
1058                   self->setPartOfValuesSimple2(i1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
1059                   return self;
1060                 case 2:
1061                   tmp=DataArrayDouble::New();
1062                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1063                   self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size(),false);
1064                   return self;
1065                 case 3:
1066                   self->setPartOfValues2(d1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
1067                   return self;
1068                 default:
1069                   throw INTERP_KERNEL::Exception(msg);
1070                 }
1071               break;
1072             }
1073           case 10:
1074             {
1075               switch(sw1)
1076                 {
1077                 case 1:
1078                   self->setPartOfValuesSimple2(i1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
1079                   return self;
1080                 case 2:
1081                   tmp=DataArrayDouble::New();
1082                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1083                   self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size(),false);
1084                   return self;
1085                 case 3:
1086                   self->setPartOfValues2(d1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
1087                   return self;
1088                 default:
1089                   throw INTERP_KERNEL::Exception(msg);
1090                 }
1091               break;
1092             }
1093           case 11:
1094             {
1095               switch(sw1)
1096                 {
1097                 case 1:
1098                   self->setPartOfValuesSimple4(i1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
1099                   return self;
1100                 case 2:
1101                   tmp=DataArrayDouble::New();
1102                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1103                   self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size(),false);
1104                   return self;
1105                 case 3:
1106                   self->setPartOfValues4(d1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
1107                   return self;
1108                 default:
1109                   throw INTERP_KERNEL::Exception(msg);
1110                 }
1111               break;
1112             }
1113           case 12:
1114             {
1115               switch(sw1)
1116                 {
1117                 case 1:
1118                   self->setPartOfValuesSimple2(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
1119                   return self;
1120                 case 2:
1121                   tmp=DataArrayDouble::New();
1122                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1123                   self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size(),false);
1124                   return self;
1125                 case 3:
1126                   self->setPartOfValues2(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
1127                   return self;
1128                 default:
1129                   throw INTERP_KERNEL::Exception(msg);
1130                 }
1131               break;
1132             }
1133           case 13:
1134             {
1135               switch(sw1)
1136                 {
1137                 case 1:
1138                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
1139                   return self;
1140                 case 2:
1141                   tmp=DataArrayDouble::New();
1142                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1143                   self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second,false);
1144                   return self;
1145                 case 3:
1146                   self->setPartOfValues1(d1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
1147                   return self;
1148                 default:
1149                   throw INTERP_KERNEL::Exception(msg);
1150                 }
1151               break;
1152             }
1153           case 14:
1154             {
1155               switch(sw1)
1156                 {
1157                 case 1:
1158                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
1159                   return self;
1160                 case 2:
1161                   tmp=DataArrayDouble::New();
1162                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1163                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second,false);
1164                   return self;
1165                 case 3:
1166                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
1167                   return self;
1168                 default:
1169                   throw INTERP_KERNEL::Exception(msg);
1170                 }
1171               break;
1172             }
1173           case 15:
1174             {
1175               switch(sw1)
1176                 {
1177                 case 1:
1178                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
1179                   return self;
1180                 case 2:
1181                   tmp=DataArrayDouble::New();
1182                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1183                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second,false);
1184                   return self;
1185                 case 3:
1186                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
1187                   return self;
1188                 default:
1189                   throw INTERP_KERNEL::Exception(msg);
1190                 }
1191               break;
1192             }
1193           case 16:
1194             {
1195               switch(sw1)
1196                 {
1197                 case 1:
1198                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
1199                   return self;
1200                 case 2:
1201                   tmp=DataArrayDouble::New();
1202                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
1203                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second,false);
1204                   return self;
1205                 case 3:
1206                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
1207                   return self;
1208                 default:
1209                   throw INTERP_KERNEL::Exception(msg);
1210                 }
1211               break;
1212             }
1213           default:
1214             throw INTERP_KERNEL::Exception(msg);
1215           }
1216         return self;
1217       }
1218
1219       DataArrayDouble *__neg__() const throw(INTERP_KERNEL::Exception)
1220       {
1221         return self->negate();
1222       }
1223
1224       PyObject *__add__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1225       {
1226         const char msg[]="Unexpected situation in DataArrayDouble.__add__ !";
1227         double val;
1228         DataArrayDouble *a;
1229         DataArrayDoubleTuple *aa;
1230         std::vector<double> bb;
1231         int sw;
1232         //
1233         void *argp;
1234         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble,0|0)))
1235           {
1236             MEDCouplingFieldDouble *other=reinterpret_cast< ParaMEDMEM::MEDCouplingFieldDouble * >(argp);
1237             if(other)
1238               {
1239                 PyObject *tmp=SWIG_NewPointerObj(SWIG_as_voidptr(self),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, 0 | 0 );
1240                 MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=ParaMEDMEM_MEDCouplingFieldDouble___radd__Impl(other,tmp);
1241                 Py_XDECREF(tmp);
1242                 return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
1243               }
1244             else
1245               throw INTERP_KERNEL::Exception(msg);
1246           }
1247         //
1248         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1249         switch(sw)
1250           {
1251           case 1:
1252             {
1253               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1254               ret->applyLin(1.,val);
1255               return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1256             }
1257           case 2:
1258             {
1259               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Add(self,a)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1260             }
1261           case 3:
1262             {
1263               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1264               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Add(self,aaa)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1265             }
1266           case 4:
1267             {
1268               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1269               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Add(self,aaa)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1270             }
1271           default:
1272             throw INTERP_KERNEL::Exception(msg);
1273           }
1274       }
1275
1276       DataArrayDouble *__radd__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1277       {
1278         const char msg[]="Unexpected situation in __radd__ !";
1279         double val;
1280         DataArrayDouble *a;
1281         DataArrayDoubleTuple *aa;
1282         std::vector<double> bb;
1283         int sw;
1284         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1285         switch(sw)
1286           {
1287           case 1:
1288             {
1289               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1290               ret->applyLin(1.,val);
1291               return ret.retn();
1292             }
1293           case 3:
1294             {
1295               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1296               return DataArrayDouble::Add(self,aaa);
1297             }
1298           case 4:
1299             {
1300               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1301               return DataArrayDouble::Add(self,aaa);
1302             }
1303           default:
1304             throw INTERP_KERNEL::Exception(msg);
1305           }
1306       }
1307    
1308       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1309       {
1310         const char msg[]="Unexpected situation in __iadd__ !";
1311         double val;
1312         DataArrayDouble *a;
1313         DataArrayDoubleTuple *aa;
1314         std::vector<double> bb;
1315         int sw;
1316         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1317         switch(sw)
1318           {
1319           case 1:
1320             {
1321               self->applyLin(1.,val);
1322               Py_XINCREF(trueSelf);
1323               return trueSelf;
1324             }
1325           case 2:
1326             {
1327               self->addEqual(a);
1328               Py_XINCREF(trueSelf);
1329               return trueSelf;
1330             }
1331           case 3:
1332             {
1333               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1334               self->addEqual(aaa);
1335               Py_XINCREF(trueSelf);
1336               return trueSelf;
1337             }
1338           case 4:
1339             {
1340               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1341               self->addEqual(aaa);
1342               Py_XINCREF(trueSelf);
1343               return trueSelf;
1344             }
1345           default:
1346             throw INTERP_KERNEL::Exception(msg);
1347           }
1348       }
1349
1350       PyObject *__sub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1351       {
1352         const char msg[]="Unexpected situation in __sub__ !";
1353         double val;
1354         DataArrayDouble *a;
1355         DataArrayDoubleTuple *aa;
1356         std::vector<double> bb;
1357         int sw;
1358         //
1359         void *argp;
1360         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble,0|0)))
1361           {
1362             MEDCouplingFieldDouble *other=reinterpret_cast< ParaMEDMEM::MEDCouplingFieldDouble * >(argp);
1363             if(other)
1364               {
1365                 PyObject *tmp=SWIG_NewPointerObj(SWIG_as_voidptr(self),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, 0 | 0 );
1366                 MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=ParaMEDMEM_MEDCouplingFieldDouble___rsub__Impl(other,tmp);
1367                 Py_XDECREF(tmp);
1368                 return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
1369               }
1370             else
1371               throw INTERP_KERNEL::Exception(msg);
1372           }
1373         //
1374         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1375         switch(sw)
1376           {
1377           case 1:
1378             {
1379               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1380               ret->applyLin(1.,-val);
1381               return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1382             }
1383           case 2:
1384             {
1385               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Substract(self,a)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1386             }
1387           case 3:
1388             {
1389               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1390               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Substract(self,aaa)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1391             }
1392           case 4:
1393             {
1394               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1395               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Substract(self,aaa)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1396             }
1397           default:
1398             throw INTERP_KERNEL::Exception(msg);
1399           }
1400       }
1401
1402       DataArrayDouble *__rsub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1403       {
1404         const char msg[]="Unexpected situation in __rsub__ !";
1405         double val;
1406         DataArrayDouble *a;
1407         DataArrayDoubleTuple *aa;
1408         std::vector<double> bb;
1409         int sw;
1410         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1411         switch(sw)
1412           {
1413           case 1:
1414             {
1415               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1416               ret->applyLin(-1.,val);
1417               return ret.retn();
1418             }
1419           case 3:
1420             {
1421               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1422               return DataArrayDouble::Substract(aaa,self);
1423             }
1424           case 4:
1425             {
1426               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1427               return DataArrayDouble::Substract(aaa,self);
1428             }
1429           default:
1430             throw INTERP_KERNEL::Exception(msg);
1431           }
1432       }
1433
1434       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1435       {
1436         const char msg[]="Unexpected situation in __isub__ !";
1437         double val;
1438         DataArrayDouble *a;
1439         DataArrayDoubleTuple *aa;
1440         std::vector<double> bb;
1441         int sw;
1442         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1443         switch(sw)
1444           {
1445           case 1:
1446             {
1447               self->applyLin(1,-val);
1448               Py_XINCREF(trueSelf);
1449               return trueSelf;
1450             }
1451           case 2:
1452             {
1453               self->substractEqual(a);
1454               Py_XINCREF(trueSelf);
1455               return trueSelf;
1456             }
1457           case 3:
1458             {
1459               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1460               self->substractEqual(aaa);
1461               Py_XINCREF(trueSelf);
1462               return trueSelf;
1463             }
1464           case 4:
1465             {
1466               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1467               self->substractEqual(aaa);
1468               Py_XINCREF(trueSelf);
1469               return trueSelf;
1470             }
1471           default:
1472             throw INTERP_KERNEL::Exception(msg);
1473           }
1474       }
1475
1476       PyObject *__mul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1477       {
1478         const char msg[]="Unexpected situation in __mul__ !";
1479         double val;
1480         DataArrayDouble *a;
1481         DataArrayDoubleTuple *aa;
1482         std::vector<double> bb;
1483         int sw;
1484         //
1485         void *argp;
1486         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble,0|0)))
1487           {
1488             MEDCouplingFieldDouble *other=reinterpret_cast< ParaMEDMEM::MEDCouplingFieldDouble * >(argp);
1489             if(other)
1490               {
1491                 PyObject *tmp=SWIG_NewPointerObj(SWIG_as_voidptr(self),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, 0 | 0 );
1492                 MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=ParaMEDMEM_MEDCouplingFieldDouble___rmul__Impl(other,tmp);
1493                 Py_XDECREF(tmp);
1494                 return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
1495               }
1496             else
1497               throw INTERP_KERNEL::Exception(msg);
1498           }
1499         //
1500         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1501         switch(sw)
1502           {
1503           case 1:
1504             {
1505               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1506               ret->applyLin(val,0.);
1507               return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1508             }
1509           case 2:
1510             {
1511               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Multiply(self,a)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1512             }
1513           case 3:
1514             {
1515               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1516               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Multiply(self,aaa)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1517             }
1518           case 4:
1519             {
1520               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1521               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Multiply(self,aaa)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1522             }
1523           default:
1524             throw INTERP_KERNEL::Exception(msg);
1525           }
1526       }
1527
1528       DataArrayDouble *__rmul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1529       {
1530         const char msg[]="Unexpected situation in __rmul__ !";
1531         double val;
1532         DataArrayDouble *a;
1533         DataArrayDoubleTuple *aa;
1534         std::vector<double> bb;
1535         int sw;
1536         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1537         switch(sw)
1538           {
1539           case 1:
1540             {
1541               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1542               ret->applyLin(val,0.);
1543               return ret.retn();
1544             }
1545           case 3:
1546             {
1547               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1548               return DataArrayDouble::Multiply(self,aaa);
1549             }
1550           case 4:
1551             {
1552               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1553               return DataArrayDouble::Multiply(self,aaa);
1554             }
1555           default:
1556             throw INTERP_KERNEL::Exception(msg);
1557           }
1558       }
1559
1560       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1561       {
1562         const char msg[]="Unexpected situation in __imul__ !";
1563         double val;
1564         DataArrayDouble *a;
1565         DataArrayDoubleTuple *aa;
1566         std::vector<double> bb;
1567         int sw;
1568         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1569         switch(sw)
1570           {
1571           case 1:
1572             {
1573               self->applyLin(val,0.);
1574               Py_XINCREF(trueSelf);
1575               return trueSelf;
1576             }
1577           case 2:
1578             {
1579               self->multiplyEqual(a);
1580               Py_XINCREF(trueSelf);
1581               return trueSelf;
1582             }
1583           case 3:
1584             {
1585               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1586               self->multiplyEqual(aaa);
1587               Py_XINCREF(trueSelf);
1588               return trueSelf;
1589             }
1590           case 4:
1591             {
1592               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1593               self->multiplyEqual(aaa);
1594               Py_XINCREF(trueSelf);
1595               return trueSelf;
1596             }
1597           default:
1598             throw INTERP_KERNEL::Exception(msg);
1599           }
1600       }
1601
1602       PyObject *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1603       {
1604         const char msg[]="Unexpected situation in __div__ !";
1605         double val;
1606         DataArrayDouble *a;
1607         DataArrayDoubleTuple *aa;
1608         std::vector<double> bb;
1609         int sw;
1610         //
1611         void *argp;
1612         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble,0|0)))
1613           {
1614             MEDCouplingFieldDouble *other=reinterpret_cast< ParaMEDMEM::MEDCouplingFieldDouble * >(argp);
1615             if(other)
1616               {
1617                 PyObject *tmp=SWIG_NewPointerObj(SWIG_as_voidptr(self),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, 0 | 0 );
1618                 MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=ParaMEDMEM_MEDCouplingFieldDouble___rdiv__Impl(other,tmp);
1619                 Py_XDECREF(tmp);
1620                 return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
1621               }
1622             else
1623               throw INTERP_KERNEL::Exception(msg);
1624           }
1625         //
1626         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1627         switch(sw)
1628           {
1629           case 1:
1630             {
1631               if(val==0.)
1632                 throw INTERP_KERNEL::Exception("DataArrayDouble::__div__ : trying to divide by zero !");
1633               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1634               ret->applyLin(1/val,0.);
1635               return SWIG_NewPointerObj(SWIG_as_voidptr(ret.retn()),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1636             }
1637           case 2:
1638             {
1639               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Divide(self,a)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1640             }
1641           case 3:
1642             {
1643               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1644               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Divide(self,aaa)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1645             }
1646           case 4:
1647             {
1648               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1649               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Divide(self,aaa)),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 );
1650             }
1651           default:
1652             throw INTERP_KERNEL::Exception(msg);
1653           }
1654       }
1655
1656       DataArrayDouble *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1657       {
1658         const char msg[]="Unexpected situation in __rdiv__ !";
1659         double val;
1660         DataArrayDouble *a;
1661         DataArrayDoubleTuple *aa;
1662         std::vector<double> bb;
1663         int sw;
1664         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1665         switch(sw)
1666           {
1667           case 1:
1668             {
1669               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1670               ret->applyInv(val);
1671               return ret.retn();
1672             }
1673           case 3:
1674             {
1675               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1676               return DataArrayDouble::Divide(aaa,self);
1677             }
1678           case 4:
1679             {
1680               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1681               return DataArrayDouble::Divide(aaa,self);
1682             }
1683           default:
1684             throw INTERP_KERNEL::Exception(msg);
1685           }
1686       }
1687
1688       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1689       {
1690         const char msg[]="Unexpected situation in __idiv__ !";
1691         double val;
1692         DataArrayDouble *a;
1693         DataArrayDoubleTuple *aa;
1694         std::vector<double> bb;
1695         int sw;
1696         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1697         switch(sw)
1698           {
1699           case 1:
1700             {
1701               if(val==0.)
1702                 throw INTERP_KERNEL::Exception("DataArrayDouble::__div__ : trying to divide by zero !");
1703               self->applyLin(1./val,0.);
1704               Py_XINCREF(trueSelf);
1705               return trueSelf;
1706             }
1707           case 2:
1708             {
1709               self->divideEqual(a);
1710               Py_XINCREF(trueSelf);
1711               return trueSelf;
1712             }
1713           case 3:
1714             {
1715               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1716               self->divideEqual(aaa);
1717               Py_XINCREF(trueSelf);
1718               return trueSelf;
1719             }
1720           case 4:
1721             {
1722               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1723               self->divideEqual(aaa);
1724               Py_XINCREF(trueSelf);
1725               return trueSelf;
1726             }
1727           default:
1728             throw INTERP_KERNEL::Exception(msg);
1729           }
1730       }
1731    
1732       DataArrayDouble *__pow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1733       {
1734         const char msg[]="Unexpected situation in __pow__ !";
1735         double val;
1736         DataArrayDouble *a;
1737         DataArrayDoubleTuple *aa;
1738         std::vector<double> bb;
1739         int sw;
1740         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1741         switch(sw)
1742           {
1743           case 1:
1744             {
1745               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1746               ret->applyPow(val);
1747               return ret.retn();
1748             }
1749           case 2:
1750             {
1751               return DataArrayDouble::Pow(self,a);
1752             }
1753           case 3:
1754             {
1755               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1756               return DataArrayDouble::Pow(self,aaa);
1757             }
1758           case 4:
1759             {
1760               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1761               return DataArrayDouble::Pow(self,aaa);
1762             }
1763           default:
1764             throw INTERP_KERNEL::Exception(msg);
1765           }
1766       }
1767
1768       DataArrayDouble *__rpow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1769       {
1770         const char msg[]="Unexpected situation in __rpow__ !";
1771         double val;
1772         DataArrayDouble *a;
1773         DataArrayDoubleTuple *aa;
1774         std::vector<double> bb;
1775         int sw;
1776         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1777         switch(sw)
1778           {
1779           case 1:
1780             {
1781               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->deepCpy();
1782               ret->applyRPow(val);
1783               return ret.retn();
1784             }
1785           case 3:
1786             {
1787               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1788               return DataArrayDouble::Pow(aaa,self);
1789             }
1790           case 4:
1791             {
1792               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1793               return DataArrayDouble::Pow(aaa,self);
1794             }
1795           default:
1796             throw INTERP_KERNEL::Exception(msg);
1797           }
1798       }
1799
1800       PyObject *___ipow___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1801       {
1802         const char msg[]="Unexpected situation in __ipow__ !";
1803         double val;
1804         DataArrayDouble *a;
1805         DataArrayDoubleTuple *aa;
1806         std::vector<double> bb;
1807         int sw;
1808         convertObjToPossibleCpp5(obj,sw,val,a,aa,bb);
1809         switch(sw)
1810           {
1811           case 1:
1812             {
1813               self->applyPow(val);
1814               Py_XINCREF(trueSelf);
1815               return trueSelf;
1816             }
1817           case 2:
1818             {
1819               self->powEqual(a);
1820               Py_XINCREF(trueSelf);
1821               return trueSelf;
1822             }
1823           case 3:
1824             {
1825               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
1826               self->powEqual(aaa);
1827               Py_XINCREF(trueSelf);
1828               return trueSelf;
1829             }
1830           case 4:
1831             {
1832               MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
1833               self->powEqual(aaa);
1834               Py_XINCREF(trueSelf);
1835               return trueSelf;
1836             }
1837           default:
1838             throw INTERP_KERNEL::Exception(msg);
1839           }
1840       }
1841    
1842       PyObject *computeTupleIdsNearTuples(const DataArrayDouble *other, double eps)
1843       {
1844         DataArrayInt *c=0,*cI=0;
1845         //
1846         self->computeTupleIdsNearTuples(other,eps,c,cI);
1847         PyObject *ret=PyTuple_New(2);
1848         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1849         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1850         return ret;
1851       }
1852     }
1853   };
1854
1855   class DataArrayDoubleTuple;
1856
1857   class DataArrayDoubleIterator
1858   {
1859   public:
1860     DataArrayDoubleIterator(DataArrayDouble *da);
1861     ~DataArrayDoubleIterator();
1862     %extend
1863     {
1864       PyObject *next()
1865       {
1866         DataArrayDoubleTuple *ret=self->nextt();
1867         if(ret)
1868           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayDoubleTuple,SWIG_POINTER_OWN|0);
1869         else
1870           {
1871             PyErr_SetString(PyExc_StopIteration,"No more data.");
1872             return 0;
1873           }
1874       }
1875     }
1876   };
1877
1878   class DataArrayDoubleTuple
1879   {
1880   public:
1881     int getNumberOfCompo() const;
1882     DataArrayDouble *buildDADouble(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
1883     %extend
1884     {
1885       std::string __str__() const throw(INTERP_KERNEL::Exception)
1886       {
1887         return self->repr();
1888       }
1889
1890       double __float__() const throw(INTERP_KERNEL::Exception)
1891       {
1892         return self->doubleValue();
1893       }
1894
1895       DataArrayDouble *buildDADouble()
1896       {
1897         return self->buildDADouble(1,self->getNumberOfCompo());
1898       }
1899
1900       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1901       {
1902         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
1903         ParaMEDMEM_DataArrayDouble____iadd___(ret,0,obj);
1904         Py_XINCREF(trueSelf);
1905         return trueSelf;
1906       }
1907   
1908       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1909       {
1910         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
1911         ParaMEDMEM_DataArrayDouble____isub___(ret,0,obj);
1912         Py_XINCREF(trueSelf);
1913         return trueSelf;
1914       }
1915   
1916       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1917       {
1918         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
1919         ParaMEDMEM_DataArrayDouble____imul___(ret,0,obj);
1920         Py_XINCREF(trueSelf);
1921         return trueSelf;
1922       }
1923
1924       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
1925       {
1926         MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->buildDADouble(1,self->getNumberOfCompo());
1927         ParaMEDMEM_DataArrayDouble____idiv___(ret,0,obj);
1928         Py_XINCREF(trueSelf);
1929         return trueSelf;
1930       }
1931
1932       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1933       {
1934         const char msg2[]="DataArrayDoubleTuple::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
1935         int sw;
1936         int singleVal;
1937         std::vector<int> multiVal;
1938         std::pair<int, std::pair<int,int> > slic;
1939         ParaMEDMEM::DataArrayInt *daIntTyypp=0;
1940         const double *pt=self->getConstPointer();
1941         int nbc=self->getNumberOfCompo();
1942         convertObjToPossibleCpp2(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
1943         switch(sw)
1944           {
1945           case 1:
1946             {
1947               if(singleVal>=nbc)
1948                 {
1949                   std::ostringstream oss;
1950                   oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
1951                   throw INTERP_KERNEL::Exception(oss.str().c_str());
1952                 }
1953               if(singleVal>=0)
1954                 return PyFloat_FromDouble(pt[singleVal]);
1955               else
1956                 {
1957                   if(nbc+singleVal>0)
1958                     return PyFloat_FromDouble(pt[nbc+singleVal]);
1959                   else
1960                     {
1961                       std::ostringstream oss;
1962                       oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
1963                       throw INTERP_KERNEL::Exception(oss.str().c_str());
1964                     }
1965                 }
1966             }
1967           case 2:
1968             {
1969               PyObject *t=PyTuple_New(multiVal.size());
1970               for(int j=0;j<(int)multiVal.size();j++)
1971                 {
1972                   int cid=multiVal[j];
1973                   if(cid>=nbc)
1974                     {
1975                       std::ostringstream oss;
1976                       oss << "Requesting for id #" << cid << " having only " << nbc << " components !";
1977                       throw INTERP_KERNEL::Exception(oss.str().c_str());
1978                     }
1979                   PyTuple_SetItem(t,j,PyFloat_FromDouble(pt[cid]));
1980                 }
1981               return t;
1982             }
1983           case 3:
1984             {
1985               int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
1986               PyObject *t=PyTuple_New(sz);
1987               for(int j=0;j<sz;j++)
1988                 PyTuple_SetItem(t,j,PyFloat_FromDouble(pt[slic.first+j*slic.second.second]));
1989               return t;
1990             }
1991           default:
1992             throw INTERP_KERNEL::Exception("DataArrayDoubleTuple::__getitem__ : unrecognized type entered !");
1993           }
1994       }
1995
1996       DataArrayDoubleTuple *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
1997       {
1998         const char msg[]="DataArrayDoubleTuple::__setitem__ : unrecognized type entered, int, slice, list<int>, tuple<int> !";
1999         const char msg2[]="DataArrayDoubleTuple::__setitem__ : Mismatch of slice values in 2nd parameter (components) !";
2000         int sw1,sw2;
2001         double singleValV;
2002         std::vector<double> multiValV;
2003         ParaMEDMEM::DataArrayDoubleTuple *daIntTyyppV=0;
2004         int nbc=self->getNumberOfCompo();
2005         convertObjToPossibleCpp44(value,sw1,singleValV,multiValV,daIntTyyppV);
2006         int singleVal;
2007         std::vector<int> multiVal;
2008         std::pair<int, std::pair<int,int> > slic;
2009         ParaMEDMEM::DataArrayInt *daIntTyypp=0;
2010         double *pt=self->getPointer();
2011         convertObjToPossibleCpp2(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
2012         switch(sw2)
2013           {
2014           case 1:
2015             {
2016               if(singleVal>=nbc)
2017                 {
2018                   std::ostringstream oss;
2019                   oss << "Requesting for setting id # " << singleVal << " having only " << nbc << " components !";
2020                   throw INTERP_KERNEL::Exception(oss.str().c_str());
2021                 }
2022               switch(sw1)
2023                 {
2024                 case 1:
2025                   {
2026                     pt[singleVal]=singleValV;
2027                     return self;
2028                   }
2029                 case 2:
2030                   {
2031                     if(multiValV.size()!=1)
2032                       {
2033                         std::ostringstream oss;
2034                         oss << "Requesting for setting id # " << singleVal << " with a list or tuple with size != 1 ! ";
2035                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2036                       }
2037                     pt[singleVal]=multiValV[0];
2038                     return self;
2039                   }
2040                 case 3:
2041                   {
2042                     pt[singleVal]=daIntTyyppV->getConstPointer()[0];
2043                     return self;
2044                   }
2045                 default:
2046                   throw INTERP_KERNEL::Exception(msg);
2047                 }
2048             }
2049           case 2:
2050             {
2051               switch(sw1)
2052                 {
2053                 case 1:
2054                   {
2055                     for(std::vector<int>::const_iterator it=multiVal.begin();it!=multiVal.end();it++)
2056                       {
2057                         if(*it>=nbc)
2058                           {
2059                             std::ostringstream oss;
2060                             oss << "Requesting for setting id # " << *it << " having only " << nbc << " components !";
2061                             throw INTERP_KERNEL::Exception(oss.str().c_str());
2062                           }
2063                         pt[*it]=singleValV;
2064                       }
2065                     return self;
2066                   }
2067                 case 2:
2068                   {
2069                     if(multiVal.size()!=multiValV.size())
2070                       {
2071                         std::ostringstream oss;
2072                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << multiVal.size() << " !";
2073                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2074                       }
2075                     for(int i=0;i<(int)multiVal.size();i++)
2076                       {
2077                         int pos=multiVal[i];
2078                         if(pos>=nbc)
2079                           {
2080                             std::ostringstream oss;
2081                             oss << "Requesting for setting id # " << pos << " having only " << nbc << " components !";
2082                             throw INTERP_KERNEL::Exception(oss.str().c_str());
2083                           }
2084                         pt[multiVal[i]]=multiValV[i];
2085                       }
2086                     return self;
2087                   }
2088                 case 3:
2089                   {
2090                     const double *ptV=daIntTyyppV->getConstPointer();
2091                     if(nbc>daIntTyyppV->getNumberOfCompo())
2092                       {
2093                         std::ostringstream oss;
2094                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
2095                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2096                       }
2097                     std::copy(ptV,ptV+nbc,pt);
2098                     return self;
2099                   }
2100                 default:
2101                   throw INTERP_KERNEL::Exception(msg);
2102                 }
2103             }
2104           case 3:
2105             {
2106               int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
2107               switch(sw1)
2108                 {
2109                 case 1:
2110                   {
2111                     for(int j=0;j<sz;j++)
2112                       pt[slic.first+j*slic.second.second]=singleValV;
2113                     return self;
2114                   }
2115                 case 2:
2116                   {
2117                     if(sz!=(int)multiValV.size())
2118                       {
2119                         std::ostringstream oss;
2120                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << sz << " !";
2121                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2122                       }
2123                     for(int j=0;j<sz;j++)
2124                       pt[slic.first+j*slic.second.second]=multiValV[j];
2125                     return self;
2126                   }
2127                 case 3:
2128                   {
2129                     const double *ptV=daIntTyyppV->getConstPointer();
2130                     if(sz>daIntTyyppV->getNumberOfCompo())
2131                       {
2132                         std::ostringstream oss;
2133                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
2134                         throw INTERP_KERNEL::Exception(oss.str().c_str());
2135                       }
2136                     for(int j=0;j<sz;j++)
2137                       pt[slic.first+j*slic.second.second]=ptV[j];
2138                     return self;
2139                   }
2140                 default:
2141                   throw INTERP_KERNEL::Exception(msg);
2142                 }
2143             }
2144           default:
2145             throw INTERP_KERNEL::Exception(msg);
2146           }
2147       }
2148     }
2149   };
2150
2151   class DataArrayIntIterator;
2152
2153   class DataArrayInt : public DataArray
2154   {
2155   public:
2156     static DataArrayInt *New();
2157     bool isAllocated() const throw(INTERP_KERNEL::Exception);
2158     void checkAllocated() const throw(INTERP_KERNEL::Exception);
2159     void setInfoAndChangeNbOfCompo(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
2160     int intValue() const throw(INTERP_KERNEL::Exception);
2161     int getHashCode() const throw(INTERP_KERNEL::Exception);
2162     bool empty() const throw(INTERP_KERNEL::Exception);
2163     DataArrayInt *deepCpy() const throw(INTERP_KERNEL::Exception);
2164     DataArrayInt *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception);
2165     void cpyFrom(const DataArrayInt& other) throw(INTERP_KERNEL::Exception);
2166     void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception);
2167     void pushBackSilent(int val) throw(INTERP_KERNEL::Exception);
2168     int popBackSilent() throw(INTERP_KERNEL::Exception);
2169     void pack() const throw(INTERP_KERNEL::Exception);
2170     void alloc(int nbOfTuple, int nbOfCompo=1) throw(INTERP_KERNEL::Exception);
2171     void allocIfNecessary(int nbOfTuple, int nbOfCompo) throw(INTERP_KERNEL::Exception);
2172     bool isEqual(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception);
2173     bool isEqualWithoutConsideringStr(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception);
2174     bool isEqualWithoutConsideringStrAndOrder(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception);
2175     DataArrayInt *buildPermutationArr(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception);
2176     void sort(bool asc=true) throw(INTERP_KERNEL::Exception);
2177     void reverse() throw(INTERP_KERNEL::Exception);
2178     void checkMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception);
2179     bool isMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception);
2180     void checkStrictlyMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception);
2181     bool isStrictlyMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception);
2182     void fillWithZero() throw(INTERP_KERNEL::Exception);
2183     void fillWithValue(int val) throw(INTERP_KERNEL::Exception);
2184     void iota(int init=0) throw(INTERP_KERNEL::Exception);
2185     std::string repr() const throw(INTERP_KERNEL::Exception);
2186     std::string reprZip() const throw(INTERP_KERNEL::Exception);
2187     DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const;
2188     DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const;
2189     DataArrayInt *invertArrayO2N2N2OBis(int newNbOfElem) const throw(INTERP_KERNEL::Exception);
2190     void reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception);
2191     DataArrayDouble *convertToDblArr() const;
2192     DataArrayInt *fromNoInterlace() const throw(INTERP_KERNEL::Exception);
2193     DataArrayInt *toNoInterlace() const throw(INTERP_KERNEL::Exception);
2194     DataArrayInt *selectByTupleId2(int bg, int end, int step) const throw(INTERP_KERNEL::Exception);
2195     DataArrayInt *checkAndPreparePermutation() const throw(INTERP_KERNEL::Exception);
2196     DataArrayInt *buildPermArrPerLevel() const throw(INTERP_KERNEL::Exception);
2197     bool isIdentity() const throw(INTERP_KERNEL::Exception);
2198     bool isUniform(int val) const throw(INTERP_KERNEL::Exception);
2199     DataArrayInt *substr(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception);
2200     void rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception);
2201     void transpose() throw(INTERP_KERNEL::Exception);
2202     DataArrayInt *changeNbOfComponents(int newNbOfComp, int dftValue) const throw(INTERP_KERNEL::Exception);
2203     void meldWith(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2204     void setPartOfValues1(const DataArrayInt *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw(INTERP_KERNEL::Exception);
2205     void setPartOfValuesSimple1(int a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception);
2206     void setPartOfValuesAdv(const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception);
2207     void setContigPartOfSelectedValues(int tupleIdStart, const DataArrayInt*a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception);
2208     void setContigPartOfSelectedValues2(int tupleIdStart, const DataArrayInt *a, int bg, int end2, int step) throw(INTERP_KERNEL::Exception);
2209     void getTuple(int tupleId, int *res) const throw(INTERP_KERNEL::Exception);
2210     int getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
2211     int getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
2212     int back() const throw(INTERP_KERNEL::Exception);
2213     void setIJ(int tupleId, int compoId, int newVal) throw(INTERP_KERNEL::Exception);
2214     void setIJSilent(int tupleId, int compoId, int newVal) throw(INTERP_KERNEL::Exception);
2215     int *getPointer() throw(INTERP_KERNEL::Exception);
2216     const int *getConstPointer() const throw(INTERP_KERNEL::Exception);
2217     DataArrayIntIterator *iterator() throw(INTERP_KERNEL::Exception);
2218     const int *begin() const throw(INTERP_KERNEL::Exception);
2219     const int *end() const throw(INTERP_KERNEL::Exception);
2220     DataArrayInt *getIdsEqual(int val) const throw(INTERP_KERNEL::Exception);
2221     DataArrayInt *getIdsNotEqual(int val) const throw(INTERP_KERNEL::Exception);
2222     int changeValue(int oldValue, int newValue) throw(INTERP_KERNEL::Exception);
2223     int locateTuple(const std::vector<int>& tupl) const throw(INTERP_KERNEL::Exception);
2224     int locateValue(int value) const throw(INTERP_KERNEL::Exception);
2225     int locateValue(const std::vector<int>& vals) const throw(INTERP_KERNEL::Exception);
2226     int search(const std::vector<int>& vals) const throw(INTERP_KERNEL::Exception);
2227     bool presenceOfTuple(const std::vector<int>& tupl) const throw(INTERP_KERNEL::Exception);
2228     bool presenceOfValue(int value) const throw(INTERP_KERNEL::Exception);
2229     bool presenceOfValue(const std::vector<int>& vals) const throw(INTERP_KERNEL::Exception);
2230     void accumulate(int *res) const throw(INTERP_KERNEL::Exception);
2231     int accumulate(int compId) const throw(INTERP_KERNEL::Exception);
2232     int getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
2233     int getMaxValueInArray() const throw(INTERP_KERNEL::Exception);
2234     int getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
2235     int getMinValueInArray() const throw(INTERP_KERNEL::Exception);
2236     void abs() throw(INTERP_KERNEL::Exception);
2237     void applyLin(int a, int b, int compoId) throw(INTERP_KERNEL::Exception);
2238     void applyLin(int a, int b) throw(INTERP_KERNEL::Exception);
2239     void applyInv(int numerator) throw(INTERP_KERNEL::Exception);
2240     DataArrayInt *negate() const throw(INTERP_KERNEL::Exception);
2241     void applyDivideBy(int val) throw(INTERP_KERNEL::Exception);
2242     void applyModulus(int val) throw(INTERP_KERNEL::Exception);
2243     void applyRModulus(int val) throw(INTERP_KERNEL::Exception);
2244     void applyPow(int val) throw(INTERP_KERNEL::Exception);
2245     void applyRPow(int val) throw(INTERP_KERNEL::Exception);
2246     DataArrayInt *getIdsInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception);
2247     static DataArrayInt *Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2);
2248     static DataArrayInt *Aggregate(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception);
2249     static DataArrayInt *Meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2250     static DataArrayInt *Meld(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception);
2251     static DataArrayInt *MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups) throw(INTERP_KERNEL::Exception);
2252     static DataArrayInt *BuildUnion(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception);
2253     static DataArrayInt *BuildIntersection(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception);
2254     DataArrayInt *buildComplement(int nbOfElement) const throw(INTERP_KERNEL::Exception);
2255     DataArrayInt *buildSubstraction(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
2256     DataArrayInt *buildSubstractionOptimized(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
2257     DataArrayInt *buildUnion(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
2258     DataArrayInt *buildIntersection(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
2259     DataArrayInt *buildUnique() const throw(INTERP_KERNEL::Exception);
2260     DataArrayInt *deltaShiftIndex() const throw(INTERP_KERNEL::Exception);
2261     void computeOffsets() throw(INTERP_KERNEL::Exception);
2262     void computeOffsets2() throw(INTERP_KERNEL::Exception);
2263     DataArrayInt *buildExplicitArrByRanges(const DataArrayInt *offsets) const throw(INTERP_KERNEL::Exception);
2264     DataArrayInt *findRangeIdForEachTuple(const DataArrayInt *ranges) const throw(INTERP_KERNEL::Exception);
2265     DataArrayInt *findIdInRangeForEachTuple(const DataArrayInt *ranges) const throw(INTERP_KERNEL::Exception);
2266     DataArrayInt *duplicateEachTupleNTimes(int nbTimes) const throw(INTERP_KERNEL::Exception);
2267     DataArrayInt *getDifferentValues() const throw(INTERP_KERNEL::Exception);
2268     static DataArrayInt *Add(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2269     void addEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2270     static DataArrayInt *Substract(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2271     void substractEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2272     static DataArrayInt *Multiply(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2273     void multiplyEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2274     static DataArrayInt *Divide(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2275     void divideEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2276     static DataArrayInt *Modulus(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2277     void modulusEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2278     static DataArrayInt *Pow(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
2279     void powEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception);
2280   public:
2281     static int *CheckAndPreparePermutation(const int *start, const int *end);
2282     static DataArrayInt *Range(int begin, int end, int step) throw(INTERP_KERNEL::Exception);
2283     %extend
2284     {
2285       DataArrayInt() throw(INTERP_KERNEL::Exception)
2286         {
2287           return DataArrayInt::New();
2288         }
2289
2290       static DataArrayInt *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
2291       {
2292         const char *msg="ParaMEDMEM::DataArrayInt::New : Available API are : \n-DataArrayInt.New()\n-DataArrayInt.New([1,3,4])\n-DataArrayInt.New([1,3,4],3)\n-DataArrayInt.New([1,3,4,5],2,2)\n-DataArrayInt.New([1,3,4,5,7,8],3,2)\n-DataArrayInt.New(5)\n-DataArrayInt.New(5,2) !";
2293         if(PyList_Check(elt0) || PyTuple_Check(elt0))
2294           {
2295             if(nbOfTuples)
2296               {
2297                 if(PyInt_Check(nbOfTuples))
2298                   {
2299                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
2300                     if(nbOfTuples1<0)
2301                       throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive set of allocated memory !");
2302                     if(nbOfComp)
2303                       {
2304                         if(PyInt_Check(nbOfComp))
2305                           {//DataArrayInt.New([1,3,4,5],2,2)
2306                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
2307                             if(nbOfCompo<0)
2308                               throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive number of components !");
2309                             MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
2310                             std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
2311                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
2312                             return ret.retn();
2313                           }
2314                         else
2315                           throw INTERP_KERNEL::Exception(msg);
2316                       }
2317                     else
2318                       {//DataArrayInt.New([1,3,4],3)
2319                         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
2320                         int tmpp1=-1;
2321                         std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
2322                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
2323                         return ret.retn();
2324                       }
2325                   }
2326                 else
2327                   throw INTERP_KERNEL::Exception(msg);
2328               }
2329             else
2330               {// DataArrayInt.New([1,3,4])
2331                 MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
2332                 int tmpp1=-1,tmpp2=-1;
2333                 std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
2334                 ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
2335                 return ret.retn();
2336               }
2337           }
2338         else if(PyInt_Check(elt0))
2339           {
2340             int nbOfTuples1=PyInt_AS_LONG(elt0);
2341             if(nbOfTuples1<0)
2342               throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive set of allocated memory !");
2343             if(nbOfTuples)
2344               {
2345                 if(!nbOfComp)
2346                   {
2347                     if(PyInt_Check(nbOfTuples))
2348                       {//DataArrayInt.New(5,2)
2349                         int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
2350                         if(nbOfCompo<0)
2351                           throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive number of components !");
2352                         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
2353                         ret->alloc(nbOfTuples1,nbOfCompo);
2354                         return ret.retn();
2355                       }
2356                     else
2357                       throw INTERP_KERNEL::Exception(msg);
2358                   }
2359                 else
2360                   throw INTERP_KERNEL::Exception(msg);
2361               }
2362             else
2363               {//DataArrayInt.New(5)
2364                 MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
2365                 ret->alloc(nbOfTuples1,1);
2366                 return ret.retn();
2367               }
2368           }
2369 #ifdef WITH_NUMPY
2370         else if(PyArray_Check(elt0))
2371           {//DataArrayInt.New(numpyArray)
2372             return BuildNewInstance<DataArrayInt,int>(elt0,NPY_INT,&PyCallBackDataArrayInt_RefType,"INT32");
2373           }
2374 #endif
2375         else
2376           throw INTERP_KERNEL::Exception(msg);
2377       }
2378
2379       DataArrayInt(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
2380         {
2381           return ParaMEDMEM_DataArrayInt_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
2382         }
2383
2384       std::string __str__() const throw(INTERP_KERNEL::Exception)
2385       {
2386         return self->repr();
2387       }
2388
2389       int __len__() const throw(INTERP_KERNEL::Exception)
2390       {
2391         if(self->isAllocated())
2392           {
2393             return self->getNumberOfTuples();
2394           }
2395         else
2396           {
2397             throw INTERP_KERNEL::Exception("DataArrayInt::__len__ : Instance is NOT allocated !");
2398           }
2399       }
2400
2401       int __int__() const throw(INTERP_KERNEL::Exception)
2402       {
2403         return self->intValue();
2404       }
2405
2406       DataArrayIntIterator *__iter__()
2407       {
2408         return self->iterator();
2409       }
2410    
2411       PyObject *accumulate() const throw(INTERP_KERNEL::Exception)
2412       {
2413         int sz=self->getNumberOfComponents();
2414         INTERP_KERNEL::AutoPtr<int> tmp=new int[sz];
2415         self->accumulate(tmp);
2416         return convertIntArrToPyList(tmp,sz);
2417       }
2418    
2419       static PyObject *BuildOld2NewArrayFromSurjectiveFormat2(int nbOfOldTuples, PyObject *arr, PyObject *arrI) throw(INTERP_KERNEL::Exception)
2420       {
2421         int newNbOfTuples=-1;
2422         int szArr,szArrI,sw,iTypppArr,iTypppArrI;
2423         std::vector<int> stdvecTyyppArr,stdvecTyyppArrI;
2424         const int *arrPtr=convertObjToPossibleCpp1_Safe(arr,sw,szArr,iTypppArr,stdvecTyyppArr);
2425         const int *arrIPtr=convertObjToPossibleCpp1_Safe(arrI,sw,szArrI,iTypppArrI,stdvecTyyppArrI);
2426         DataArrayInt *ret0=ParaMEDMEM::DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2(nbOfOldTuples,arrPtr,arrIPtr,arrIPtr+szArrI,newNbOfTuples);
2427         PyObject *ret=PyTuple_New(2);
2428         PyTuple_SetItem(ret,0,SWIG_NewPointerObj((void*)ret0,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,SWIG_POINTER_OWN | 0));
2429         PyTuple_SetItem(ret,1,PyInt_FromLong(newNbOfTuples));
2430         return ret;
2431       }
2432
2433       void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
2434       {
2435         const char *msg="ParaMEDMEM::DataArrayInt::setValues : Available API are : \n-DataArrayInt.setValues([1,3,4])\n-DataArrayInt.setValues([1,3,4],3)\n-DataArrayInt.setValues([1,3,4,5],2,2)\n-DataArrayInt.New(5)\n !";
2436         if(PyList_Check(li) || PyTuple_Check(li))
2437           {
2438             if(nbOfTuples)
2439               {
2440                 if(PyInt_Check(nbOfTuples))
2441                   {
2442                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
2443                     if(nbOfTuples<0)
2444                       throw INTERP_KERNEL::Exception("DataArrayInt::setValue : should be a positive set of allocated memory !");
2445                     if(nbOfComp)
2446                       {
2447                         if(PyInt_Check(nbOfComp))
2448                           {//DataArrayInt.setValues([1,3,4,5],2,2)
2449                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
2450                             if(nbOfCompo<0)
2451                               throw INTERP_KERNEL::Exception("DataArrayInt::setValue : should be a positive number of components !");
2452                             std::vector<int> tmp=fillArrayWithPyListInt2(li,nbOfTuples1,nbOfCompo);
2453                             self->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),self->getPointer());
2454                           }
2455                         else
2456                           throw INTERP_KERNEL::Exception(msg);
2457                       }
2458                     else
2459                       {//DataArrayInt.setValues([1,3,4],3)
2460                         int tmpp1=-1;
2461                         std::vector<int> tmp=fillArrayWithPyListInt2(li,nbOfTuples1,tmpp1);
2462                         self->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),self->getPointer());
2463                       }
2464                   }
2465                 else
2466                   throw INTERP_KERNEL::Exception(msg);
2467               }
2468             else
2469               {// DataArrayInt.setValues([1,3,4])
2470                 int tmpp1=-1,tmpp2=-1;
2471                 std::vector<int> tmp=fillArrayWithPyListInt2(li,tmpp1,tmpp2);
2472                 self->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),self->getPointer());
2473               }
2474           }
2475         else
2476           throw INTERP_KERNEL::Exception(msg);
2477       }
2478
2479       PyObject *getValues() const throw(INTERP_KERNEL::Exception)
2480       {
2481         const int *vals=self->getConstPointer();
2482         return convertIntArrToPyList(vals,self->getNbOfElems());
2483       }
2484
2485 #ifdef WITH_NUMPY
2486       PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
2487       {
2488         return ToNumPyArray<DataArrayInt,int>(self,NPY_INT,"DataArrayInt");
2489       }
2490 #endif
2491
2492       PyObject *isEqualIfNotWhy(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception)
2493       {
2494         std::string ret1;
2495         bool ret0=self->isEqualIfNotWhy(other,ret1);
2496         PyObject *ret=PyTuple_New(2);
2497         PyObject *ret0Py=ret0?Py_True:Py_False;
2498         Py_XINCREF(ret0Py);
2499         PyTuple_SetItem(ret,0,ret0Py);
2500         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
2501         return ret;
2502       }
2503
2504       PyObject *getValuesAsTuple() const throw(INTERP_KERNEL::Exception)
2505       {
2506         const int *vals=self->getConstPointer();
2507         int nbOfComp=self->getNumberOfComponents();
2508         int nbOfTuples=self->getNumberOfTuples();
2509         return convertIntArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
2510       }
2511
2512       static PyObject *MakePartition(PyObject *gps, int newNb) throw(INTERP_KERNEL::Exception)
2513       {
2514         std::vector<const DataArrayInt *> groups;
2515         std::vector< std::vector<int> > fidsOfGroups;
2516         convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(gps,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",groups);
2517         ParaMEDMEM::DataArrayInt *ret0=ParaMEDMEM::DataArrayInt::MakePartition(groups,newNb,fidsOfGroups);
2518         PyObject *ret = PyList_New(2);
2519         PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2520         int sz=fidsOfGroups.size();
2521         PyObject *ret1 = PyList_New(sz);
2522         for(int i=0;i<sz;i++)
2523           PyList_SetItem(ret1,i,convertIntArrToPyList2(fidsOfGroups[i]));
2524         PyList_SetItem(ret,1,ret1);
2525         return ret;
2526       }
2527
2528       void transformWithIndArr(PyObject *li) throw(INTERP_KERNEL::Exception)
2529       {
2530         void *da=0;
2531         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2532         if (!SWIG_IsOK(res1))
2533           {
2534             int size;
2535             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2536             self->transformWithIndArr(tmp,tmp+size);
2537           }
2538         else
2539           {
2540             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2541             self->transformWithIndArr(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
2542           }
2543       }
2544
2545       DataArrayInt *getIdsEqualList(PyObject *obj) throw(INTERP_KERNEL::Exception)
2546       {
2547         int sw;
2548         int singleVal;
2549         std::vector<int> multiVal;
2550         std::pair<int, std::pair<int,int> > slic;
2551         ParaMEDMEM::DataArrayInt *daIntTyypp=0;
2552         convertObjToPossibleCpp2(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
2553         switch(sw)
2554           {
2555           case 1:
2556             return self->getIdsEqualList(&singleVal,&singleVal+1);
2557           case 2:
2558             return self->getIdsEqualList(&multiVal[0],&multiVal[0]+multiVal.size());
2559           case 4:
2560             return self->getIdsEqualList(daIntTyypp->begin(),daIntTyypp->end());
2561           default:
2562             throw INTERP_KERNEL::Exception("DataArrayInt::getIdsEqualList : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2563           }
2564       }
2565
2566       DataArrayInt *getIdsNotEqualList(PyObject *obj) throw(INTERP_KERNEL::Exception)
2567       {
2568         int sw;
2569         int singleVal;
2570         std::vector<int> multiVal;
2571         std::pair<int, std::pair<int,int> > slic;
2572         ParaMEDMEM::DataArrayInt *daIntTyypp=0;
2573         convertObjToPossibleCpp2(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
2574         switch(sw)
2575           {
2576           case 1:
2577             return self->getIdsNotEqualList(&singleVal,&singleVal+1);
2578           case 2:
2579             return self->getIdsNotEqualList(&multiVal[0],&multiVal[0]+multiVal.size());
2580           case 4:
2581             return self->getIdsNotEqualList(daIntTyypp->begin(),daIntTyypp->end());
2582           default:
2583             throw INTERP_KERNEL::Exception("DataArrayInt::getIdsNotEqualList : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2584           }
2585       }
2586
2587       PyObject *splitByValueRange(PyObject *li) const throw(INTERP_KERNEL::Exception)
2588       {
2589         DataArrayInt *ret0=0,*ret1=0,*ret2=0;
2590         void *da=0;
2591         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2592         if (!SWIG_IsOK(res1))
2593           {
2594             int size;
2595             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2596             self->splitByValueRange(tmp,(int *)tmp+size,ret0,ret1,ret2);
2597           }
2598         else
2599           {
2600             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2601             if(!da2)
2602               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2603             da2->checkAllocated();
2604             int size=self->getNumberOfTuples();
2605             self->splitByValueRange(da2->getConstPointer(),da2->getConstPointer()+size,ret0,ret1,ret2);
2606           }
2607         PyObject *ret = PyList_New(3);
2608         PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2609         PyList_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2610         PyList_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2611         return ret;
2612       }
2613
2614       DataArrayInt *transformWithIndArrR(PyObject *li) const
2615       {
2616         void *da=0;
2617         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2618         if (!SWIG_IsOK(res1))
2619           {
2620             int size;
2621             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2622             return self->transformWithIndArrR(tmp,tmp+size);
2623           }
2624         else
2625           {
2626             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2627             return self->transformWithIndArrR(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
2628           }
2629       }
2630
2631       void renumberInPlace(PyObject *li) throw(INTERP_KERNEL::Exception)
2632       {
2633         void *da=0;
2634         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2635         if (!SWIG_IsOK(res1))
2636           {
2637             int size;
2638             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2639             if(size!=self->getNumberOfTuples())
2640               {
2641                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2642               }
2643             self->renumberInPlace(tmp);
2644           }
2645         else
2646           {
2647             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2648             if(!da2)
2649               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2650             da2->checkAllocated();
2651             int size=self->getNumberOfTuples();
2652             if(size!=self->getNumberOfTuples())
2653               {
2654                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2655               }
2656             self->renumberInPlace(da2->getConstPointer());
2657           }
2658       }
2659
2660       void renumberInPlaceR(PyObject *li) throw(INTERP_KERNEL::Exception)
2661       {
2662         void *da=0;
2663         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2664         if (!SWIG_IsOK(res1))
2665           {
2666             int size;
2667             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2668             if(size!=self->getNumberOfTuples())
2669               {
2670                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2671               }
2672             self->renumberInPlaceR(tmp);
2673           }
2674         else
2675           {
2676             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2677             if(!da2)
2678               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2679             da2->checkAllocated();
2680             int size=self->getNumberOfTuples();
2681             if(size!=self->getNumberOfTuples())
2682               {
2683                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2684               }
2685             self->renumberInPlaceR(da2->getConstPointer());
2686           }
2687       }
2688
2689       DataArrayInt *renumberAndReduce(PyObject *li, int newNbOfTuple) throw(INTERP_KERNEL::Exception)
2690       {
2691         void *da=0;
2692         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2693         if (!SWIG_IsOK(res1))
2694           {
2695             int size;
2696             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2697             if(size!=self->getNumberOfTuples())
2698               {
2699                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2700               }
2701             return self->renumberAndReduce(tmp,newNbOfTuple);
2702           }
2703         else
2704           {
2705             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2706             if(!da2)
2707               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2708             da2->checkAllocated();
2709             int size=self->getNumberOfTuples();
2710             if(size!=self->getNumberOfTuples())
2711               {
2712                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2713               }
2714             return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
2715           }
2716       }
2717
2718       DataArrayInt *renumber(PyObject *li) throw(INTERP_KERNEL::Exception)
2719       {
2720         void *da=0;
2721         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2722         if (!SWIG_IsOK(res1))
2723           {
2724             int size;
2725             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2726             if(size!=self->getNumberOfTuples())
2727               {
2728                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2729               }
2730             return self->renumber(tmp);
2731           }
2732         else
2733           {
2734             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2735             if(!da2)
2736               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2737             da2->checkAllocated();
2738             int size=self->getNumberOfTuples();
2739             if(size!=self->getNumberOfTuples())
2740               {
2741                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2742               }
2743             return self->renumber(da2->getConstPointer());
2744           }
2745       }
2746
2747       DataArrayInt *renumberR(PyObject *li) throw(INTERP_KERNEL::Exception)
2748       {
2749         void *da=0;
2750         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2751         if (!SWIG_IsOK(res1))
2752           {
2753             int size;
2754             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2755             if(size!=self->getNumberOfTuples())
2756               {
2757                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2758               }
2759             return self->renumberR(tmp);
2760           }
2761         else
2762           {
2763             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2764             if(!da2)
2765               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2766             da2->checkAllocated();
2767             int size=self->getNumberOfTuples();
2768             if(size!=self->getNumberOfTuples())
2769               {
2770                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
2771               }
2772             return self->renumberR(da2->getConstPointer());
2773           }
2774       }
2775
2776       DataArrayInt *selectByTupleId(PyObject *li) const throw(INTERP_KERNEL::Exception)
2777       {
2778         void *da=0;
2779         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2780         if (!SWIG_IsOK(res1))
2781           {
2782             int size;
2783             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2784             return self->selectByTupleId(tmp,tmp+size);
2785           }
2786         else
2787           {
2788             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2789             if(!da2)
2790               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2791             da2->checkAllocated();
2792             return self->selectByTupleId(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
2793           }
2794       }
2795
2796       DataArrayInt *selectByTupleIdSafe(PyObject *li) const throw(INTERP_KERNEL::Exception)
2797       {
2798         void *da=0;
2799         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
2800         if (!SWIG_IsOK(res1))
2801           {
2802             int size;
2803             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
2804             return self->selectByTupleIdSafe(tmp,tmp+size);
2805           }
2806         else
2807           {
2808             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
2809             if(!da2)
2810               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2811             da2->checkAllocated();
2812             return self->selectByTupleIdSafe(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
2813           }
2814       }
2815
2816       DataArrayInt *keepSelectedComponents(PyObject *li) const throw(INTERP_KERNEL::Exception)
2817       {
2818         std::vector<int> tmp;
2819         convertPyToNewIntArr3(li,tmp);
2820         return self->keepSelectedComponents(tmp);
2821       }
2822
2823       void setSelectedComponents(const DataArrayInt *a, PyObject *li) throw(INTERP_KERNEL::Exception)
2824       {
2825         std::vector<int> tmp;
2826         convertPyToNewIntArr3(li,tmp);
2827         self->setSelectedComponents(a,tmp);
2828       }
2829
2830       PyObject *getTuple(int tupleId) throw(INTERP_KERNEL::Exception)
2831       {
2832         int sz=self->getNumberOfComponents();
2833         INTERP_KERNEL::AutoPtr<int> tmp=new int[sz];
2834         self->getTuple(tupleId,tmp);
2835         return convertIntArrToPyList(tmp,sz);
2836       }
2837
2838       PyObject *changeSurjectiveFormat(int targetNb) const throw(INTERP_KERNEL::Exception)
2839       {
2840         DataArrayInt *arr=0;
2841         DataArrayInt *arrI=0;
2842         self->changeSurjectiveFormat(targetNb,arr,arrI);
2843         PyObject *res = PyList_New(2);
2844         PyList_SetItem(res,0,SWIG_NewPointerObj((void*)arr,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,SWIG_POINTER_OWN | 0));
2845         PyList_SetItem(res,1,SWIG_NewPointerObj((void*)arrI,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,SWIG_POINTER_OWN | 0));
2846         return res;
2847       }
2848
2849       DataArrayInt *selectByTupleRanges(PyObject *li) const throw(INTERP_KERNEL::Exception)
2850       {
2851         std::vector<std::pair<int,int> > ranges;
2852         convertPyToVectorPairInt(li,ranges);
2853         return self->selectByTupleRanges(ranges);
2854       }
2855
2856       static DataArrayInt *Meld(PyObject *li) throw(INTERP_KERNEL::Exception)
2857       {
2858         std::vector<const DataArrayInt *> tmp;
2859         convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",tmp);
2860         return DataArrayInt::Meld(tmp);
2861       }
2862
2863       static DataArrayInt *Aggregate(PyObject *li) throw(INTERP_KERNEL::Exception)
2864       {
2865         std::vector<const DataArrayInt *> tmp;
2866         convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",tmp);
2867         return DataArrayInt::Aggregate(tmp);
2868       }
2869
2870       static DataArrayInt *BuildUnion(PyObject *li) throw(INTERP_KERNEL::Exception)
2871       {
2872         std::vector<const DataArrayInt *> tmp;
2873         convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",tmp);
2874         return DataArrayInt::BuildUnion(tmp);
2875       }
2876
2877       static DataArrayInt *BuildIntersection(PyObject *li) throw(INTERP_KERNEL::Exception)
2878       {
2879         std::vector<const DataArrayInt *> tmp;
2880         convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",tmp);
2881         return DataArrayInt::BuildIntersection(tmp);
2882       }
2883
2884       PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
2885       {
2886         int tmp;
2887         int r1=self->getMaxValue(tmp);
2888         PyObject *ret=PyTuple_New(2);
2889         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
2890         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
2891         return ret;
2892       }
2893
2894       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
2895       {
2896         int tmp;
2897         int r1=self->getMinValue(tmp);
2898         PyObject *ret=PyTuple_New(2);
2899         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
2900         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
2901         return ret;
2902       }
2903
2904       int index(PyObject *obj) const throw(INTERP_KERNEL::Exception)
2905       {
2906         int nbOfCompo=self->getNumberOfComponents();
2907         switch(nbOfCompo)
2908           {
2909           case 1:
2910             {
2911               if(PyInt_Check(obj))
2912                 {
2913                   int val=(int)PyInt_AS_LONG(obj);
2914                   return self->locateValue(val);
2915                 }
2916               else
2917                 throw INTERP_KERNEL::Exception("DataArrayInt::index : 'this' contains one component and trying to find an element which is not an integer !");
2918             }
2919           default:
2920             {
2921               std::vector<int> arr;
2922               convertPyToNewIntArr3(obj,arr);
2923               return self->locateTuple(arr);
2924             }
2925           }
2926       }
2927
2928       bool __contains__(PyObject *obj) const throw(INTERP_KERNEL::Exception)
2929       {
2930         int nbOfCompo=self->getNumberOfComponents();
2931         switch(nbOfCompo)
2932           {
2933           case 0:
2934             return false;
2935           case 1:
2936             {
2937               if(PyInt_Check(obj))
2938                 {
2939                   int val=(int)PyInt_AS_LONG(obj);
2940                   return self->presenceOfValue(val);
2941                 }
2942               else
2943                 throw INTERP_KERNEL::Exception("DataArrayInt::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
2944             }
2945           default:
2946             {
2947               std::vector<int> arr;
2948               convertPyToNewIntArr3(obj,arr);
2949               return self->presenceOfTuple(arr);
2950             }
2951           }
2952       }
2953
2954       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
2955       {
2956         const char msg[]="Unexpected situation in DataArrayInt::__getitem__ !";
2957         const char msg2[]="DataArrayInt::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
2958         self->checkAllocated();
2959         int nbOfTuples=self->getNumberOfTuples();
2960         int nbOfComponents=self->getNumberOfComponents();
2961         int it1,ic1;
2962         std::vector<int> vt1,vc1;
2963         std::pair<int, std::pair<int,int> > pt1,pc1;
2964         DataArrayInt *dt1=0,*dc1=0;
2965         int sw;
2966         convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
2967         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret;
2968         switch(sw)
2969           {
2970           case 1:
2971             {
2972               if(nbOfComponents==1)
2973                 return PyInt_FromLong(self->getIJSafe(it1,0));
2974               return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&it1,&it1+1)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
2975             }
2976           case 2:
2977             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size())),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
2978           case 3:
2979             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleId2(pt1.first,pt1.second.first,pt1.second.second)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
2980           case 4:
2981             return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems())),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
2982           case 5:
2983             return PyInt_FromLong(self->getIJSafe(it1,ic1));
2984           case 6:
2985             {
2986               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
2987               std::vector<int> v2(1,ic1);
2988               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
2989             }
2990           case 7:
2991             {
2992               ret=self->selectByTupleId2(pt1.first,pt1.second.first,pt1.second.second);
2993               std::vector<int> v2(1,ic1);
2994               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
2995             }
2996           case 8:
2997             {
2998               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
2999               std::vector<int> v2(1,ic1);
3000               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3001             }
3002           case 9:
3003             {
3004               ret=self->selectByTupleIdSafe(&it1,&it1+1);
3005               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3006             }
3007           case 10:
3008             {
3009               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
3010               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3011             }
3012           case 11:
3013             {
3014               ret=self->selectByTupleId2(pt1.first,pt1.second.first,pt1.second.second);
3015               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3016             }
3017           case 12:
3018             {
3019               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
3020               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3021             }
3022           case 13:
3023             {
3024               ret=self->selectByTupleIdSafe(&it1,&it1+1);
3025               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
3026               std::vector<int> v2(nbOfComp);
3027               for(int i=0;i<nbOfComp;i++)
3028                 v2[i]=pc1.first+i*pc1.second.second;
3029               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3030             }
3031           case 14:
3032             {
3033               ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
3034               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
3035               std::vector<int> v2(nbOfComp);
3036               for(int i=0;i<nbOfComp;i++)
3037                 v2[i]=pc1.first+i*pc1.second.second;
3038               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3039             }
3040           case 15:
3041             {
3042               ret=self->selectByTupleId2(pt1.first,pt1.second.first,pt1.second.second);
3043               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
3044               std::vector<int> v2(nbOfComp);
3045               for(int i=0;i<nbOfComp;i++)
3046                 v2[i]=pc1.first+i*pc1.second.second;
3047               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3048             }
3049           case 16:
3050             {
3051               ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
3052               int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
3053               std::vector<int> v2(nbOfComp);
3054               for(int i=0;i<nbOfComp;i++)
3055                 v2[i]=pc1.first+i*pc1.second.second;
3056               return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
3057             }
3058           default:
3059             throw INTERP_KERNEL::Exception(msg);
3060           }
3061       }
3062
3063       DataArrayInt *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
3064       {
3065         self->checkAllocated();
3066         const char msg[]="Unexpected situation in __setitem__ !";
3067         int nbOfTuples=self->getNumberOfTuples();
3068         int nbOfComponents=self->getNumberOfComponents();
3069         int sw1,sw2;
3070         int i1;
3071         std::vector<int> v1;
3072         DataArrayInt *d1=0;
3073         DataArrayIntTuple *dd1=0;
3074         convertObjToPossibleCpp1(value,sw1,i1,v1,d1,dd1);
3075         int it1,ic1;
3076         std::vector<int> vt1,vc1;
3077         std::pair<int, std::pair<int,int> > pt1,pc1;
3078         DataArrayInt *dt1=0,*dc1=0;
3079         convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw2,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
3080         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp;
3081         switch(sw2)
3082           {
3083           case 1:
3084             {
3085               switch(sw1)
3086                 {
3087                 case 1:
3088                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,0,nbOfComponents,1);
3089                   return self;
3090                 case 2:
3091                   tmp=DataArrayInt::New();
3092                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3093                   self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1,false);
3094                   return self;
3095                 case 3:
3096                   self->setPartOfValues1(d1,it1,it1+1,1,0,nbOfComponents,1);
3097                   return self;
3098                 case 4:
3099                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3100                   self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1);
3101                   return self;
3102                 default:
3103                   throw INTERP_KERNEL::Exception(msg);
3104                 }
3105               break;
3106             }
3107           case 2:
3108             {
3109               switch(sw1)
3110                 {
3111                 case 1:
3112                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
3113                   return self;
3114                 case 2:
3115                   tmp=DataArrayInt::New();
3116                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3117                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1,false);
3118                   return self;
3119                 case 3:
3120                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
3121                   return self;
3122                 case 4:
3123                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3124                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
3125                   return self;
3126                 default:
3127                   throw INTERP_KERNEL::Exception(msg);
3128                 }
3129               break;
3130             }
3131           case 3:
3132             {
3133               switch(sw1)
3134                 {
3135                 case 1:
3136                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
3137                   return self;
3138                 case 2:
3139                   tmp=DataArrayInt::New();
3140                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3141                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1,false);
3142                   return self;
3143                 case 3:
3144                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
3145                   return self;
3146                 case 4:
3147                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3148                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
3149                   return self;
3150                 default:
3151                   throw INTERP_KERNEL::Exception(msg);
3152                 }
3153               break;
3154             }
3155           case 4:
3156             {
3157               switch(sw1)
3158                 {
3159                 case 1:
3160                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
3161                   return self;
3162                 case 2:
3163                   tmp=DataArrayInt::New();
3164                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3165                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1,false);
3166                   return self;
3167                 case 3:
3168                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
3169                   return self;
3170                 case 4:
3171                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3172                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
3173                   return self;
3174                 default:
3175                   throw INTERP_KERNEL::Exception(msg);
3176                 }
3177               break;
3178             }
3179           case 5:
3180             {
3181               switch(sw1)
3182                 {
3183                 case 1:
3184                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,ic1,ic1+1,1);
3185                   return self;
3186                 case 2:
3187                   tmp=DataArrayInt::New();
3188                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3189                   self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1,false);
3190                   return self;
3191                 case 3:
3192                   self->setPartOfValues1(d1,it1,it1+1,1,ic1,ic1+1,1);
3193                   return self;
3194                 case 4:
3195                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3196                   self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1);
3197                   return self;
3198                 default:
3199                   throw INTERP_KERNEL::Exception(msg);
3200                 }
3201               break;
3202             }
3203           case 6:
3204             {
3205               switch(sw1)
3206                 {
3207                 case 1:
3208                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
3209                   return self;
3210                 case 2:
3211                   tmp=DataArrayInt::New();
3212                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3213                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1,false);
3214                   return self;
3215                 case 3:
3216                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
3217                   return self;
3218                 case 4:
3219                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3220                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
3221                   return self;
3222                 default:
3223                   throw INTERP_KERNEL::Exception(msg);
3224                 }
3225               break;
3226             }
3227           case 7:
3228             {
3229               switch(sw1)
3230                 {
3231                 case 1:
3232                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
3233                   return self;
3234                 case 2:
3235                   tmp=DataArrayInt::New();
3236                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3237                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1,false);
3238                   return self;
3239                 case 3:
3240                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
3241                   return self;
3242                 case 4:
3243                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3244                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
3245                   return self;
3246                 default:
3247                   throw INTERP_KERNEL::Exception(msg);
3248                 }
3249               break;
3250             }
3251           case 8:
3252             {
3253               switch(sw1)
3254                 {
3255                 case 1:
3256                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
3257                   return self;
3258                 case 2:
3259                   tmp=DataArrayInt::New();
3260                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3261                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1,false);
3262                   return self;
3263                 case 3:
3264                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
3265                   return self;
3266                 case 4:
3267                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3268                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
3269                   return self;
3270                 default:
3271                   throw INTERP_KERNEL::Exception(msg);
3272                 }
3273               break;
3274             }
3275           case 9:
3276             {
3277               switch(sw1)
3278                 {
3279                 case 1:
3280                   self->setPartOfValuesSimple2(i1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
3281                   return self;
3282                 case 2:
3283                   tmp=DataArrayInt::New();
3284                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3285                   self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size(),false);
3286                   return self;
3287                 case 3:
3288                   self->setPartOfValues2(d1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
3289                   return self;
3290                 case 4:
3291                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3292                   self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
3293                   return self;
3294                 default:
3295                   throw INTERP_KERNEL::Exception(msg);
3296                 }
3297               break;
3298             }
3299           case 10:
3300             {
3301               switch(sw1)
3302                 {
3303                 case 1:
3304                   self->setPartOfValuesSimple2(i1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
3305                   return self;
3306                 case 2:
3307                   tmp=DataArrayInt::New();
3308                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3309                   self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size(),false);
3310                   return self;
3311                 case 3:
3312                   self->setPartOfValues2(d1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
3313                   return self;
3314                 case 4:
3315                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3316                   self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
3317                   return self;
3318                 default:
3319                   throw INTERP_KERNEL::Exception(msg);
3320                 }
3321               break;
3322             }
3323           case 11:
3324             {
3325               switch(sw1)
3326                 {
3327                 case 1:
3328                   self->setPartOfValuesSimple4(i1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
3329                   return self;
3330                 case 2:
3331                   tmp=DataArrayInt::New();
3332                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3333                   self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size(),false);
3334                   return self;
3335                 case 3:
3336                   self->setPartOfValues4(d1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
3337                   return self;
3338                 case 4:
3339                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3340                   self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
3341                   return self;
3342                 default:
3343                   throw INTERP_KERNEL::Exception(msg);
3344                 }
3345               break;
3346             }
3347           case 12:
3348             {
3349               switch(sw1)
3350                 {
3351                 case 1:
3352                   self->setPartOfValuesSimple2(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
3353                   return self;
3354                 case 2:
3355                   tmp=DataArrayInt::New();
3356                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3357                   self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size(),false);
3358                   return self;
3359                 case 3:
3360                   self->setPartOfValues2(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
3361                   return self;
3362                 case 4:
3363                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3364                   self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
3365                   return self;
3366                 default:
3367                   throw INTERP_KERNEL::Exception(msg);
3368                 }
3369               break;
3370             }
3371           case 13:
3372             {
3373               switch(sw1)
3374                 {
3375                 case 1:
3376                   self->setPartOfValuesSimple1(i1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
3377                   return self;
3378                 case 2:
3379                   tmp=DataArrayInt::New();
3380                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3381                   self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second,false);
3382                   return self;
3383                 case 3:
3384                   self->setPartOfValues1(d1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
3385                   return self;
3386                 case 4:
3387                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3388                   self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
3389                   return self;
3390                 default:
3391                   throw INTERP_KERNEL::Exception(msg);
3392                 }
3393               break;
3394             }
3395           case 14:
3396             {
3397               switch(sw1)
3398                 {
3399                 case 1:
3400                   self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
3401                   return self;
3402                 case 2:
3403                   tmp=DataArrayInt::New();
3404                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3405                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second,false);
3406                   return self;
3407                 case 3:
3408                   self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
3409                   return self;
3410                 case 4:
3411                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3412                   self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
3413                   return self;
3414                 default:
3415                   throw INTERP_KERNEL::Exception(msg);
3416                 }
3417               break;
3418             }
3419           case 15:
3420             {
3421               switch(sw1)
3422                 {
3423                 case 1:
3424                   self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
3425                   return self;
3426                 case 2:
3427                   tmp=DataArrayInt::New();
3428                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3429                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second,false);
3430                   return self;
3431                 case 3:
3432                   self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
3433                   return self;
3434                 case 4:
3435                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3436                   self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
3437                   return self;
3438                 default:
3439                   throw INTERP_KERNEL::Exception(msg);
3440                 }
3441               break;
3442             }
3443           case 16:
3444             {
3445               switch(sw1)
3446                 {
3447                 case 1:
3448                   self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
3449                   return self;
3450                 case 2:
3451                   tmp=DataArrayInt::New();
3452                   tmp->useArray(&v1[0],false,CPP_DEALLOC,1,v1.size());
3453                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second,false);
3454                   return self;
3455                 case 3:
3456                   self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
3457                   return self;
3458                 case 4:
3459                   tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
3460                   self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
3461                   return self;
3462                 default:
3463                   throw INTERP_KERNEL::Exception(msg);
3464                 }
3465               break;
3466             }
3467           default:
3468             throw INTERP_KERNEL::Exception(msg);
3469           }
3470         return self;
3471       }
3472
3473       DataArrayInt *__neg__() const throw(INTERP_KERNEL::Exception)
3474       {
3475         return self->negate();
3476       }
3477  
3478       DataArrayInt *__add__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3479       {
3480         const char msg[]="Unexpected situation in __add__ !";
3481         int val;
3482         DataArrayInt *a;
3483         std::vector<int> aa;
3484         DataArrayIntTuple *aaa;
3485         int sw;
3486         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3487         switch(sw)
3488           {
3489           case 1:
3490             {
3491               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3492               ret->applyLin(1,val);
3493               return ret.retn();
3494             }
3495           case 2:
3496             {
3497               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3498               return DataArrayInt::Add(self,aaaa);
3499             }
3500           case 3:
3501             {
3502               return DataArrayInt::Add(self,a);
3503             }
3504           case 4:
3505             {
3506               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3507               return DataArrayInt::Add(self,aaaa);
3508             }
3509           default:
3510             throw INTERP_KERNEL::Exception(msg);
3511           }
3512       }
3513
3514       DataArrayInt *__radd__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3515       {
3516         const char msg[]="Unexpected situation in __radd__ !";
3517         int val;
3518         DataArrayInt *a;
3519         std::vector<int> aa;
3520         DataArrayIntTuple *aaa;
3521         int sw;
3522         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3523         switch(sw)
3524           {
3525           case 1:
3526             {
3527               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3528               ret->applyLin(1,val);
3529               return ret.retn();
3530             }
3531           case 2:
3532             {
3533               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3534               return DataArrayInt::Add(self,aaaa);
3535             }
3536           case 4:
3537             {
3538               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3539               return DataArrayInt::Add(self,aaaa);
3540             }
3541           default:
3542             throw INTERP_KERNEL::Exception(msg);
3543           }
3544       }
3545
3546       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3547       {
3548         const char msg[]="Unexpected situation in __iadd__ !";
3549         int val;
3550         DataArrayInt *a;
3551         std::vector<int> aa;
3552         DataArrayIntTuple *aaa;
3553         int sw;
3554         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3555         switch(sw)
3556           {
3557           case 1:
3558             {
3559               self->applyLin(1,val);
3560               Py_XINCREF(trueSelf);
3561               return trueSelf;
3562             }
3563           case 2:
3564             {
3565               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3566               self->addEqual(bb);
3567               Py_XINCREF(trueSelf);
3568               return trueSelf;
3569             }
3570           case 3:
3571             {
3572               self->addEqual(a);
3573               Py_XINCREF(trueSelf);
3574               return trueSelf;
3575             }
3576           case 4:
3577             {
3578               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3579               self->addEqual(aaaa);
3580               Py_XINCREF(trueSelf);
3581               return trueSelf;
3582             }
3583           default:
3584             throw INTERP_KERNEL::Exception(msg);
3585           }
3586       }
3587
3588       DataArrayInt *__sub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3589       {
3590         const char msg[]="Unexpected situation in __sub__ !";
3591         int val;
3592         DataArrayInt *a;
3593         std::vector<int> aa;
3594         DataArrayIntTuple *aaa;
3595         int sw;
3596         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3597         switch(sw)
3598           {
3599           case 1:
3600             {
3601               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3602               ret->applyLin(1,-val);
3603               return ret.retn();
3604             }
3605           case 2:
3606             {
3607               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3608               return DataArrayInt::Substract(self,aaaa);
3609             }
3610           case 3:
3611             {
3612               return DataArrayInt::Substract(self,a);
3613             }
3614           case 4:
3615             {
3616               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3617               return DataArrayInt::Substract(self,aaaa);
3618             }
3619           default:
3620             throw INTERP_KERNEL::Exception(msg);
3621           }
3622       }
3623
3624       DataArrayInt *__rsub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3625       {
3626         const char msg[]="Unexpected situation in __rsub__ !";
3627         int val;
3628         DataArrayInt *a;
3629         std::vector<int> aa;
3630         DataArrayIntTuple *aaa;
3631         int sw;
3632         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3633         switch(sw)
3634           {
3635           case 1:
3636             {
3637               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3638               ret->applyLin(-1,val);
3639               return ret.retn();
3640             }
3641           case 2:
3642             {
3643               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3644               return DataArrayInt::Substract(aaaa,self);
3645             }
3646           case 4:
3647             {
3648               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3649               return DataArrayInt::Substract(aaaa,self);
3650             }
3651           default:
3652             throw INTERP_KERNEL::Exception(msg);
3653           }
3654       }
3655
3656       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3657       {
3658         const char msg[]="Unexpected situation in __isub__ !";
3659         int val;
3660         DataArrayInt *a;
3661         std::vector<int> aa;
3662         DataArrayIntTuple *aaa;
3663         int sw;
3664         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3665         switch(sw)
3666           {
3667           case 1:
3668             {
3669               self->applyLin(1,-val);
3670               Py_XINCREF(trueSelf);
3671               return trueSelf;
3672             }
3673           case 2:
3674             {
3675               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3676               self->substractEqual(bb);
3677               Py_XINCREF(trueSelf);
3678               return trueSelf;
3679             }
3680           case 3:
3681             {
3682               self->substractEqual(a);
3683               Py_XINCREF(trueSelf);
3684               return trueSelf;
3685             }
3686           case 4:
3687             {
3688               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3689               self->substractEqual(aaaa);
3690               Py_XINCREF(trueSelf);
3691               return trueSelf;
3692             }
3693           default:
3694             throw INTERP_KERNEL::Exception(msg);
3695           }
3696       }
3697
3698       DataArrayInt *__mul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3699       {
3700         const char msg[]="Unexpected situation in __mul__ !";
3701         int val;
3702         DataArrayInt *a;
3703         std::vector<int> aa;
3704         DataArrayIntTuple *aaa;
3705         int sw;
3706         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3707         switch(sw)
3708           {
3709           case 1:
3710             {
3711               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3712               ret->applyLin(val,0);
3713               return ret.retn();
3714             }
3715           case 2:
3716             {
3717               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3718               return DataArrayInt::Multiply(self,aaaa);
3719             }
3720           case 3:
3721             {
3722               return DataArrayInt::Multiply(self,a);
3723             }
3724           case 4:
3725             {
3726               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3727               return DataArrayInt::Multiply(self,aaaa);
3728             }
3729           default:
3730             throw INTERP_KERNEL::Exception(msg);
3731           }
3732       }
3733
3734       DataArrayInt *__rmul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3735       {
3736         const char msg[]="Unexpected situation in __rmul__ !";
3737         int val;
3738         DataArrayInt *a;
3739         std::vector<int> aa;
3740         DataArrayIntTuple *aaa;
3741         int sw;
3742         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3743         switch(sw)
3744           {
3745           case 1:
3746             {
3747               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3748               ret->applyLin(val,0);
3749               return ret.retn();
3750             }
3751           case 2:
3752             {
3753               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3754               return DataArrayInt::Multiply(self,aaaa);
3755             }
3756           case 4:
3757             {
3758               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3759               return DataArrayInt::Multiply(self,aaaa);
3760             }
3761           default:
3762             throw INTERP_KERNEL::Exception(msg);
3763           }
3764       }
3765
3766       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3767       {
3768         const char msg[]="Unexpected situation in __imul__ !";
3769         int val;
3770         DataArrayInt *a;
3771         std::vector<int> aa;
3772         DataArrayIntTuple *aaa;
3773         int sw;
3774         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3775         switch(sw)
3776           {
3777           case 1:
3778             {
3779               self->applyLin(val,0);
3780               Py_XINCREF(trueSelf);
3781               return trueSelf;
3782             }
3783           case 2:
3784             {
3785               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3786               self->multiplyEqual(bb);
3787               Py_XINCREF(trueSelf);
3788               return trueSelf;
3789             }
3790           case 3:
3791             {
3792               self->multiplyEqual(a);
3793               Py_XINCREF(trueSelf);
3794               return trueSelf;
3795             }
3796           case 4:
3797             {
3798               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3799               self->multiplyEqual(aaaa);
3800               Py_XINCREF(trueSelf);
3801               return trueSelf;
3802             }
3803           default:
3804             throw INTERP_KERNEL::Exception(msg);
3805           }
3806       }
3807
3808       DataArrayInt *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3809       {
3810         const char msg[]="Unexpected situation in __div__ !";
3811         int val;
3812         DataArrayInt *a;
3813         std::vector<int> aa;
3814         DataArrayIntTuple *aaa;
3815         int sw;
3816         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3817         switch(sw)
3818           {
3819           case 1:
3820             {
3821               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3822               ret->applyDivideBy(val);
3823               return ret.retn();
3824             }
3825           case 2:
3826             {
3827               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3828               return DataArrayInt::Divide(self,aaaa);
3829             }
3830           case 3:
3831             {
3832               return DataArrayInt::Divide(self,a);
3833             }
3834           case 4:
3835             {
3836               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3837               return DataArrayInt::Divide(self,aaaa);
3838             }
3839           default:
3840             throw INTERP_KERNEL::Exception(msg);
3841           }
3842       }
3843
3844       DataArrayInt *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3845       {
3846         const char msg[]="Unexpected situation in __rdiv__ !";
3847         int val;
3848         DataArrayInt *a;
3849         std::vector<int> aa;
3850         DataArrayIntTuple *aaa;
3851         int sw;
3852         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3853         switch(sw)
3854           {
3855           case 1:
3856             {
3857               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3858               ret->applyInv(val);
3859               return ret.retn();
3860             }
3861           case 2:
3862             {
3863               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3864               return DataArrayInt::Divide(aaaa,self);
3865             }
3866           case 4:
3867             {
3868               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3869               return DataArrayInt::Divide(aaaa,self);
3870             }
3871           default:
3872             throw INTERP_KERNEL::Exception(msg);
3873           }
3874       }
3875
3876       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3877       {
3878         const char msg[]="Unexpected situation in __idiv__ !";
3879         int val;
3880         DataArrayInt *a;
3881         std::vector<int> aa;
3882         DataArrayIntTuple *aaa;
3883         int sw;
3884         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3885         switch(sw)
3886           {
3887           case 1:
3888             {
3889               self->applyDivideBy(val);
3890               Py_XINCREF(trueSelf);
3891               return trueSelf;
3892             }
3893           case 2:
3894             {
3895               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3896               self->divideEqual(bb);
3897               Py_XINCREF(trueSelf);
3898               return trueSelf;
3899             }
3900           case 3:
3901             {
3902               self->divideEqual(a);
3903               Py_XINCREF(trueSelf);
3904               return trueSelf;
3905             }
3906           case 4:
3907             {
3908               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3909               self->divideEqual(aaaa);
3910               Py_XINCREF(trueSelf);
3911               return trueSelf;
3912             }
3913           default:
3914             throw INTERP_KERNEL::Exception(msg);
3915           }
3916       }
3917
3918       DataArrayInt *__mod__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3919       {
3920         const char msg[]="Unexpected situation in __mod__ !";
3921         int val;
3922         DataArrayInt *a;
3923         std::vector<int> aa;
3924         DataArrayIntTuple *aaa;
3925         int sw;
3926         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3927         switch(sw)
3928           {
3929           case 1:
3930             {
3931               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3932               ret->applyModulus(val);
3933               return ret.retn();
3934             }
3935           case 2:
3936             {
3937               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3938               return DataArrayInt::Modulus(self,aaaa);
3939             }
3940           case 3:
3941             {
3942               return DataArrayInt::Modulus(self,a);
3943             }
3944           case 4:
3945             {
3946               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3947               return DataArrayInt::Modulus(self,aaaa);
3948             }
3949           default:
3950             throw INTERP_KERNEL::Exception(msg);
3951           }
3952       }
3953
3954       DataArrayInt *__rmod__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3955       {
3956         const char msg[]="Unexpected situation in __rmod__ !";
3957         int val;
3958         DataArrayInt *a;
3959         std::vector<int> aa;
3960         DataArrayIntTuple *aaa;
3961         int sw;
3962         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3963         switch(sw)
3964           {
3965           case 1:
3966             {
3967               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
3968               ret->applyRModulus(val);
3969               return ret.retn();
3970             }
3971           case 2:
3972             {
3973               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
3974               return DataArrayInt::Modulus(aaaa,self);
3975             }
3976           case 3:
3977             {
3978               return DataArrayInt::Modulus(a,self);
3979             }
3980           case 4:
3981             {
3982               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
3983               return DataArrayInt::Modulus(aaaa,self);
3984             }
3985           default:
3986             throw INTERP_KERNEL::Exception(msg);
3987           }
3988       }
3989
3990       PyObject *___imod___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
3991       {
3992         const char msg[]="Unexpected situation in __imod__ !";
3993         int val;
3994         DataArrayInt *a;
3995         std::vector<int> aa;
3996         DataArrayIntTuple *aaa;
3997         int sw;
3998         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
3999         switch(sw)
4000           {
4001           case 1:
4002             {
4003               self->applyModulus(val);
4004               Py_XINCREF(trueSelf);
4005               return trueSelf;
4006             }
4007           case 3:
4008             {
4009               self->modulusEqual(a);
4010               Py_XINCREF(trueSelf);
4011               return trueSelf;
4012             }
4013           case 4:
4014             {
4015               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4016               self->modulusEqual(aaaa);
4017               Py_XINCREF(trueSelf);
4018               return trueSelf;
4019             }
4020           default:
4021             throw INTERP_KERNEL::Exception(msg);
4022           }
4023       }
4024
4025       DataArrayInt *__pow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4026       {
4027         const char msg[]="Unexpected situation in __pow__ !";
4028         int val;
4029         DataArrayInt *a;
4030         std::vector<int> aa;
4031         DataArrayIntTuple *aaa;
4032         int sw;
4033         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
4034         switch(sw)
4035           {
4036           case 1:
4037             {
4038               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
4039               ret->applyPow(val);
4040               return ret.retn();
4041             }
4042           case 2:
4043             {
4044               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
4045               return DataArrayInt::Pow(self,aaaa);
4046             }
4047           case 3:
4048             {
4049               return DataArrayInt::Pow(self,a);
4050             }
4051           case 4:
4052             {
4053               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4054               return DataArrayInt::Pow(self,aaaa);
4055             }
4056           default:
4057             throw INTERP_KERNEL::Exception(msg);
4058           }
4059       }
4060
4061       DataArrayInt *__rpow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4062       {
4063         const char msg[]="Unexpected situation in __rpow__ !";
4064         int val;
4065         DataArrayInt *a;
4066         std::vector<int> aa;
4067         DataArrayIntTuple *aaa;
4068         int sw;
4069         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
4070         switch(sw)
4071           {
4072           case 1:
4073             {
4074               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->deepCpy();
4075               ret->applyRPow(val);
4076               return ret.retn();
4077             }
4078           case 2:
4079             {
4080               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,CPP_DEALLOC,1,(int)aa.size());
4081               return DataArrayInt::Pow(aaaa,self);
4082             }
4083           case 3:
4084             {
4085               return DataArrayInt::Pow(a,self);
4086             }
4087           case 4:
4088             {
4089               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4090               return DataArrayInt::Pow(aaaa,self);
4091             }
4092           default:
4093             throw INTERP_KERNEL::Exception(msg);
4094           }
4095       }
4096    
4097       PyObject *___ipow___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4098       {
4099         const char msg[]="Unexpected situation in __ipow__ !";
4100         int val;
4101         DataArrayInt *a;
4102         std::vector<int> aa;
4103         DataArrayIntTuple *aaa;
4104         int sw;
4105         convertObjToPossibleCpp1(obj,sw,val,aa,a,aaa);
4106         switch(sw)
4107           {
4108           case 1:
4109             {
4110               self->applyPow(val);
4111               Py_XINCREF(trueSelf);
4112               return trueSelf;
4113             }
4114           case 3:
4115             {
4116               self->powEqual(a);
4117               Py_XINCREF(trueSelf);
4118               return trueSelf;
4119             }
4120           case 4:
4121             {
4122               MEDCouplingAutoRefCountObjectPtr<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
4123               self->powEqual(aaaa);
4124               Py_XINCREF(trueSelf);
4125               return trueSelf;
4126             }
4127           default:
4128             throw INTERP_KERNEL::Exception(msg);
4129           }
4130       }
4131
4132       std::string __repr__() const throw(INTERP_KERNEL::Exception)
4133       {
4134         std::ostringstream oss;
4135         self->reprQuickOverview(oss);
4136         return oss.str();
4137       }
4138       
4139       void pushBackValsSilent(PyObject *li) throw(INTERP_KERNEL::Exception)
4140       {
4141         int szArr,sw,iTypppArr;
4142         std::vector<int> stdvecTyyppArr;
4143         const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
4144         self->pushBackValsSilent(tmp,tmp+szArr);
4145       }
4146       
4147       PyObject *partitionByDifferentValues() const throw(INTERP_KERNEL::Exception)
4148       {
4149         std::vector<int> ret1;
4150         std::vector<DataArrayInt *> ret0=self->partitionByDifferentValues(ret1);
4151         std::size_t sz=ret0.size();
4152         PyObject *pyRet=PyTuple_New(2);
4153         PyObject *pyRet0=PyList_New((int)sz);
4154         PyObject *pyRet1=PyList_New((int)sz);
4155         for(std::size_t i=0;i<sz;i++)
4156           {
4157             PyList_SetItem(pyRet0,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret0[i]),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
4158             PyList_SetItem(pyRet1,i,PyInt_FromLong(ret1[i]));
4159           }
4160         PyTuple_SetItem(pyRet,0,pyRet0);
4161         PyTuple_SetItem(pyRet,1,pyRet1);
4162         return pyRet;
4163       }
4164       
4165       PyObject *searchRangesInListOfIds(const DataArrayInt *listOfIds) const throw(INTERP_KERNEL::Exception)
4166       {
4167         DataArrayInt *ret0=0,*ret1=0;
4168         self->searchRangesInListOfIds(listOfIds,ret0,ret1);
4169         PyObject *pyRet=PyTuple_New(2);
4170         PyTuple_SetItem(pyRet,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
4171         PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
4172         return pyRet;
4173       }
4174     }
4175   };
4176
4177   class DataArrayIntTuple;
4178
4179   class DataArrayIntIterator
4180   {
4181   public:
4182     DataArrayIntIterator(DataArrayInt *da);
4183     ~DataArrayIntIterator();
4184     %extend
4185     {
4186       PyObject *next()
4187       {
4188         DataArrayIntTuple *ret=self->nextt();
4189         if(ret)
4190           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayIntTuple,SWIG_POINTER_OWN | 0);
4191         else
4192           {
4193             PyErr_SetString(PyExc_StopIteration,"No more data.");
4194             return 0;
4195           }
4196       }
4197     }
4198   };
4199
4200   class DataArrayIntTuple
4201   {
4202   public:
4203     int getNumberOfCompo() const;
4204     DataArrayInt *buildDAInt(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
4205     %extend
4206     {
4207       std::string __str__() const throw(INTERP_KERNEL::Exception)
4208       {
4209         return self->repr();
4210       }
4211
4212       int __int__() const throw(INTERP_KERNEL::Exception)
4213       {
4214         return self->intValue();
4215       }
4216
4217       DataArrayInt *buildDAInt() throw(INTERP_KERNEL::Exception)
4218       {
4219         return self->buildDAInt(1,self->getNumberOfCompo());
4220       }
4221
4222       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4223       {
4224         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4225         ParaMEDMEM_DataArrayInt____iadd___(ret,0,obj);
4226         Py_XINCREF(trueSelf);
4227         return trueSelf;
4228       }
4229   
4230       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4231       {
4232         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4233         ParaMEDMEM_DataArrayInt____isub___(ret,0,obj);
4234         Py_XINCREF(trueSelf);
4235         return trueSelf;
4236       }
4237   
4238       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4239       {
4240         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4241         ParaMEDMEM_DataArrayInt____imul___(ret,0,obj);
4242         Py_XINCREF(trueSelf);
4243         return trueSelf;
4244       }
4245
4246       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4247       {
4248         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4249         ParaMEDMEM_DataArrayInt____idiv___(ret,0,obj);
4250         Py_XINCREF(trueSelf);
4251         return trueSelf;
4252       }
4253
4254       PyObject *___imod___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4255       {
4256         MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
4257         ParaMEDMEM_DataArrayInt____imod___(ret,0,obj);
4258         Py_XINCREF(trueSelf);
4259         return trueSelf;
4260       }
4261   
4262       PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4263       {
4264         const char msg2[]="DataArrayIntTuple::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
4265         int sw;
4266         int singleVal;
4267         std::vector<int> multiVal;
4268         std::pair<int, std::pair<int,int> > slic;
4269         ParaMEDMEM::DataArrayInt *daIntTyypp=0;
4270         const int *pt=self->getConstPointer();
4271         int nbc=self->getNumberOfCompo();
4272         convertObjToPossibleCpp2(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
4273         switch(sw)
4274           {
4275           case 1:
4276             {
4277               if(singleVal>=nbc)
4278                 {
4279                   std::ostringstream oss;
4280                   oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
4281                   throw INTERP_KERNEL::Exception(oss.str().c_str());
4282                 }
4283               if(singleVal>=0)
4284                 return PyInt_FromLong(pt[singleVal]);
4285               else
4286                 {
4287                   if(nbc+singleVal>0)
4288                     return PyInt_FromLong(pt[nbc+singleVal]);
4289                   else
4290                     {
4291                       std::ostringstream oss;
4292                       oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
4293                       throw INTERP_KERNEL::Exception(oss.str().c_str());
4294                     }
4295                 }
4296             }
4297           case 2:
4298             {
4299               PyObject *t=PyTuple_New(multiVal.size());
4300               for(int j=0;j<(int)multiVal.size();j++)
4301                 {
4302                   int cid=multiVal[j];
4303                   if(cid>=nbc)
4304                     {
4305                       std::ostringstream oss;
4306                       oss << "Requesting for id #" << cid << " having only " << nbc << " components !";
4307                       throw INTERP_KERNEL::Exception(oss.str().c_str());
4308                     }
4309                   PyTuple_SetItem(t,j,PyInt_FromLong(pt[cid]));
4310                 }
4311               return t;
4312             }
4313           case 3:
4314             {
4315               int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
4316               PyObject *t=PyTuple_New(sz);
4317               for(int j=0;j<sz;j++)
4318                 PyTuple_SetItem(t,j,PyInt_FromLong(pt[slic.first+j*slic.second.second]));
4319               return t;
4320             }
4321           default:
4322             throw INTERP_KERNEL::Exception("DataArrayIntTuple::__getitem__ : unrecognized type entered !");
4323           }
4324       }
4325
4326       DataArrayIntTuple *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
4327       {
4328         const char msg[]="DataArrayIntTuple::__setitem__ : unrecognized type entered, int, slice, list<int>, tuple<int> !";
4329         const char msg2[]="DataArrayIntTuple::__setitem__ : Mismatch of slice values in 2nd parameter (components) !";
4330         int sw1,sw2;
4331         int singleValV;
4332         std::vector<int> multiValV;
4333         std::pair<int, std::pair<int,int> > slicV;
4334         ParaMEDMEM::DataArrayIntTuple *daIntTyyppV=0;
4335         int nbc=self->getNumberOfCompo();
4336         convertObjToPossibleCpp22(value,nbc,sw1,singleValV,multiValV,slicV,daIntTyyppV);
4337         int singleVal;
4338         std::vector<int> multiVal;
4339         std::pair<int, std::pair<int,int> > slic;
4340         ParaMEDMEM::DataArrayInt *daIntTyypp=0;
4341         int *pt=self->getPointer();
4342         convertObjToPossibleCpp2(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
4343         switch(sw2)
4344           {
4345           case 1:
4346             {
4347               if(singleVal>=nbc)
4348                 {
4349                   std::ostringstream oss;
4350                   oss << "Requesting for setting id # " << singleVal << " having only " << nbc << " components !";
4351                   throw INTERP_KERNEL::Exception(oss.str().c_str());
4352                 }
4353               switch(sw1)
4354                 {
4355                 case 1:
4356                   {
4357                     pt[singleVal]=singleValV;
4358                     return self;
4359                   }
4360                 case 2:
4361                   {
4362                     if(multiValV.size()!=1)
4363                       {
4364                         std::ostringstream oss;
4365                         oss << "Requesting for setting id # " << singleVal << " with a list or tuple with size != 1 ! ";
4366                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4367                       }
4368                     pt[singleVal]=multiValV[0];
4369                     return self;
4370                   }
4371                 case 4:
4372                   {
4373                     pt[singleVal]=daIntTyyppV->getConstPointer()[0];
4374                     return self;
4375                   }
4376                 default:
4377                   throw INTERP_KERNEL::Exception(msg);
4378                 }
4379             }
4380           case 2:
4381             {
4382               switch(sw1)
4383                 {
4384                 case 1:
4385                   {
4386                     for(std::vector<int>::const_iterator it=multiVal.begin();it!=multiVal.end();it++)
4387                       {
4388                         if(*it>=nbc)
4389                           {
4390                             std::ostringstream oss;
4391                             oss << "Requesting for setting id # " << *it << " having only " << nbc << " components !";
4392                             throw INTERP_KERNEL::Exception(oss.str().c_str());
4393                           }
4394                         pt[*it]=singleValV;
4395                       }
4396                     return self;
4397                   }
4398                 case 2:
4399                   {
4400                     if(multiVal.size()!=multiValV.size())
4401                       {
4402                         std::ostringstream oss;
4403                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << multiVal.size() << " !";
4404                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4405                       }
4406                     for(int i=0;i<(int)multiVal.size();i++)
4407                       {
4408                         int pos=multiVal[i];
4409                         if(pos>=nbc)
4410                           {
4411                             std::ostringstream oss;
4412                             oss << "Requesting for setting id # " << pos << " having only " << nbc << " components !";
4413                             throw INTERP_KERNEL::Exception(oss.str().c_str());
4414                           }
4415                         pt[multiVal[i]]=multiValV[i];
4416                       }
4417                     return self;
4418                   }
4419                 case 4:
4420                   {
4421                     const int *ptV=daIntTyyppV->getConstPointer();
4422                     if(nbc>daIntTyyppV->getNumberOfCompo())
4423                       {
4424                         std::ostringstream oss;
4425                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
4426                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4427                       }
4428                     std::copy(ptV,ptV+nbc,pt);
4429                     return self;
4430                   }
4431                 default:
4432                   throw INTERP_KERNEL::Exception(msg);
4433                 }
4434             }
4435           case 3:
4436             {
4437               int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
4438               switch(sw1)
4439                 {
4440                 case 1:
4441                   {
4442                     for(int j=0;j<sz;j++)
4443                       pt[slic.first+j*slic.second.second]=singleValV;
4444                     return self;
4445                   }
4446                 case 2:
4447                   {
4448                     if(sz!=(int)multiValV.size())
4449                       {
4450                         std::ostringstream oss;
4451                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << sz << " !";
4452                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4453                       }
4454                     for(int j=0;j<sz;j++)
4455                       pt[slic.first+j*slic.second.second]=multiValV[j];
4456                     return self;
4457                   }
4458                 case 4:
4459                   {
4460                     const int *ptV=daIntTyyppV->getConstPointer();
4461                     if(sz>daIntTyyppV->getNumberOfCompo())
4462                       {
4463                         std::ostringstream oss;
4464                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
4465                         throw INTERP_KERNEL::Exception(oss.str().c_str());
4466                       }
4467                     for(int j=0;j<sz;j++)
4468                       pt[slic.first+j*slic.second.second]=ptV[j];
4469                     return self;
4470                   }
4471                 default:
4472                   throw INTERP_KERNEL::Exception(msg);
4473                 }
4474             }
4475           default:
4476             throw INTERP_KERNEL::Exception(msg);
4477           }
4478       }
4479     }
4480   };
4481
4482   class DataArrayChar : public DataArray
4483   {
4484   public:
4485     virtual DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception) = 0;
4486     bool isAllocated() const throw(INTERP_KERNEL::Exception);
4487     void checkAllocated() const throw(INTERP_KERNEL::Exception);
4488     void setInfoAndChangeNbOfCompo(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception);
4489     int getHashCode() const throw(INTERP_KERNEL::Exception);
4490     bool empty() const throw(INTERP_KERNEL::Exception);
4491     void cpyFrom(const DataArrayChar& other) throw(INTERP_KERNEL::Exception);
4492     void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception);
4493     void pushBackSilent(char val) throw(INTERP_KERNEL::Exception);
4494     void pushBackValsSilent(const char *valsBg, const char *valsEnd) throw(INTERP_KERNEL::Exception);
4495     char popBackSilent() throw(INTERP_KERNEL::Exception);
4496     void pack() const throw(INTERP_KERNEL::Exception);
4497     void alloc(int nbOfTuple, int nbOfCompo=1) throw(INTERP_KERNEL::Exception);
4498     void allocIfNecessary(int nbOfTuple, int nbOfCompo) throw(INTERP_KERNEL::Exception);
4499     bool isEqual(const DataArrayChar& other) const throw(INTERP_KERNEL::Exception);
4500     bool isEqualWithoutConsideringStr(const DataArrayChar& other) const throw(INTERP_KERNEL::Exception);
4501     void reverse() throw(INTERP_KERNEL::Exception);
4502     void fillWithZero() throw(INTERP_KERNEL::Exception);
4503     void fillWithValue(char val) throw(INTERP_KERNEL::Exception);
4504     std::string repr() const throw(INTERP_KERNEL::Exception);
4505     std::string reprZip() const throw(INTERP_KERNEL::Exception);
4506     void reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception);
4507     DataArrayInt *convertToIntArr() const throw(INTERP_KERNEL::Exception);
4508     void renumberInPlace(const int *old2New) throw(INTERP_KERNEL::Exception);
4509     void renumberInPlaceR(const int *new2Old) throw(INTERP_KERNEL::Exception);
4510     DataArrayChar *renumber(const int *old2New) const throw(INTERP_KERNEL::Exception);
4511     DataArrayChar *renumberR(const int *new2Old) const throw(INTERP_KERNEL::Exception);
4512     DataArrayChar *renumberAndReduce(const int *old2NewBg, int newNbOfTuple) const throw(INTERP_KERNEL::Exception);
4513     DataArrayChar *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const throw(INTERP_KERNEL::Exception);
4514     DataArrayChar *selectByTupleId2(int bg, int end, int step) const throw(INTERP_KERNEL::Exception);
4515     bool isUniform(char val) const throw(INTERP_KERNEL::Exception);
4516     void rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception);
4517     DataArrayChar *substr(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception);
4518     DataArrayChar *changeNbOfComponents(int newNbOfComp, char dftValue) const throw(INTERP_KERNEL::Exception);
4519     void meldWith(const DataArrayChar *other) throw(INTERP_KERNEL::Exception);
4520     void setPartOfValuesAdv(const DataArrayChar *a, const DataArrayChar *tuplesSelec) throw(INTERP_KERNEL::Exception);
4521     char back() const throw(INTERP_KERNEL::Exception);
4522     void setIJ(int tupleId, int compoId, char newVal);
4523     void setIJSilent(int tupleId, int compoId, char newVal);
4524     char *getPointer();
4525     DataArrayInt *getIdsEqual(char val) const throw(INTERP_KERNEL::Exception);
4526     DataArrayInt *getIdsNotEqual(char val) const throw(INTERP_KERNEL::Exception);
4527     int locateTuple(const std::vector<char>& tupl) const throw(INTERP_KERNEL::Exception);
4528     bool presenceOfTuple(const std::vector<char>& tupl) const throw(INTERP_KERNEL::Exception);
4529     char getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
4530     char getMaxValueInArray() const throw(INTERP_KERNEL::Exception);
4531     char getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
4532     char getMinValueInArray() const throw(INTERP_KERNEL::Exception);
4533     DataArrayInt *getIdsInRange(char vmin, char vmax) const throw(INTERP_KERNEL::Exception);
4534     static DataArrayChar *Aggregate(const DataArrayChar *a1, const DataArrayChar *a2);
4535     static DataArrayChar *Aggregate(const std::vector<const DataArrayChar *>& arr) throw(INTERP_KERNEL::Exception);
4536     static DataArrayChar *Meld(const DataArrayChar *a1, const DataArrayChar *a2) throw(INTERP_KERNEL::Exception);
4537     static DataArrayChar *Meld(const std::vector<const DataArrayChar *>& arr) throw(INTERP_KERNEL::Exception);
4538     %extend
4539     {
4540       int __len__() const throw(INTERP_KERNEL::Exception)
4541       {
4542         if(self->isAllocated())
4543           {
4544             return self->getNumberOfTuples();
4545           }
4546         else
4547           {
4548             throw INTERP_KERNEL::Exception("DataArrayChar::__len__ : Instance is NOT allocated !");
4549           }
4550       }
4551       
4552       PyObject *isEqualIfNotWhy(const DataArrayChar& other) const throw(INTERP_KERNEL::Exception)
4553       {
4554         std::string ret1;
4555         bool ret0=self->isEqualIfNotWhy(other,ret1);
4556         PyObject *ret=PyTuple_New(2);
4557         PyObject *ret0Py=ret0?Py_True:Py_False;
4558         Py_XINCREF(ret0Py);
4559         PyTuple_SetItem(ret,0,ret0Py);
4560         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
4561         return ret;
4562       }
4563       
4564       void renumberInPlace(PyObject *li) throw(INTERP_KERNEL::Exception)
4565       {
4566         void *da=0;
4567         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
4568         if (!SWIG_IsOK(res1))
4569           {
4570             int size;
4571             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4572             if(size!=self->getNumberOfTuples())
4573               {
4574                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4575               }
4576             self->renumberInPlace(tmp);
4577           }
4578         else
4579           {
4580             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4581             if(!da2)
4582               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4583             da2->checkAllocated();
4584             int size=self->getNumberOfTuples();
4585             if(size!=self->getNumberOfTuples())
4586               {
4587                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4588               }
4589             self->renumberInPlace(da2->getConstPointer());
4590           }
4591       }
4592       
4593       void renumberInPlaceR(PyObject *li) throw(INTERP_KERNEL::Exception)
4594       {
4595         void *da=0;
4596         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
4597         if (!SWIG_IsOK(res1))
4598           {
4599             int size;
4600             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4601             if(size!=self->getNumberOfTuples())
4602               {
4603                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4604               }
4605             self->renumberInPlaceR(tmp);
4606           }
4607         else
4608           {
4609             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4610             if(!da2)
4611            throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4612             da2->checkAllocated();
4613             int size=self->getNumberOfTuples();
4614             if(size!=self->getNumberOfTuples())
4615               {
4616                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4617               }
4618             self->renumberInPlaceR(da2->getConstPointer());
4619           }
4620       }
4621       
4622       DataArrayChar *renumber(PyObject *li) throw(INTERP_KERNEL::Exception)
4623       {
4624         void *da=0;
4625         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
4626         if (!SWIG_IsOK(res1))
4627           {
4628             int size;
4629             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4630             if(size!=self->getNumberOfTuples())
4631               {
4632                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4633               }
4634             return self->renumber(tmp);
4635           }
4636         else
4637           {
4638             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4639             if(!da2)
4640               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4641             da2->checkAllocated();
4642             int size=self->getNumberOfTuples();
4643             if(size!=self->getNumberOfTuples())
4644               {
4645                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4646               }
4647             return self->renumber(da2->getConstPointer());
4648           }
4649       }
4650       
4651       DataArrayChar *renumberR(PyObject *li) throw(INTERP_KERNEL::Exception)
4652       {
4653         void *da=0;
4654         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
4655         if (!SWIG_IsOK(res1))
4656           {
4657             int size;
4658             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4659             if(size!=self->getNumberOfTuples())
4660               {
4661                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4662               }
4663             return self->renumberR(tmp);
4664           }
4665         else
4666           {
4667             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4668             if(!da2)
4669               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4670             da2->checkAllocated();
4671             int size=self->getNumberOfTuples();
4672             if(size!=self->getNumberOfTuples())
4673               {
4674                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4675               }
4676             return self->renumberR(da2->getConstPointer());
4677           }
4678       }
4679       
4680       DataArrayChar *renumberAndReduce(PyObject *li, int newNbOfTuple) throw(INTERP_KERNEL::Exception)
4681       {
4682         void *da=0;
4683         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
4684         if (!SWIG_IsOK(res1))
4685           {
4686             int size;
4687             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4688             if(size!=self->getNumberOfTuples())
4689               {
4690                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4691               }
4692             return self->renumberAndReduce(tmp,newNbOfTuple);
4693           }
4694         else
4695           {
4696             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4697             if(!da2)
4698               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4699             da2->checkAllocated();
4700             int size=self->getNumberOfTuples();
4701             if(size!=self->getNumberOfTuples())
4702               {
4703                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
4704               }
4705             return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
4706           }
4707       }
4708       
4709       DataArrayChar *selectByTupleIdSafe(PyObject *li) const throw(INTERP_KERNEL::Exception)
4710       {
4711         void *da=0;
4712         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 |  0 );
4713         if (!SWIG_IsOK(res1))
4714           {
4715             int size;
4716             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
4717             return self->selectByTupleIdSafe(tmp,tmp+size);
4718           }
4719         else
4720           {
4721             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
4722             if(!da2)
4723               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
4724             da2->checkAllocated();
4725             return self->selectByTupleIdSafe(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
4726           }
4727       }
4728       
4729       DataArrayChar *keepSelectedComponents(PyObject *li) const throw(INTERP_KERNEL::Exception)
4730       {
4731         std::vector<int> tmp;
4732         convertPyToNewIntArr3(li,tmp);
4733         return self->keepSelectedComponents(tmp);
4734       }
4735       
4736       static DataArrayChar *Aggregate(PyObject *dachs) throw(INTERP_KERNEL::Exception)
4737       {
4738         std::vector<const ParaMEDMEM::DataArrayChar *> tmp;
4739         convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayChar *>(dachs,SWIGTYPE_p_ParaMEDMEM__DataArrayChar,"DataArrayChar",tmp);
4740         return DataArrayChar::Aggregate(tmp);
4741       }
4742       
4743       static DataArrayChar *Meld(PyObject *dachs) throw(INTERP_KERNEL::Exception)
4744       {
4745         std::vector<const ParaMEDMEM::DataArrayChar *> tmp;
4746         convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayChar *>(dachs,SWIGTYPE_p_ParaMEDMEM__DataArrayChar,"DataArrayChar",tmp);
4747         return DataArrayChar::Meld(tmp);
4748       }
4749     }
4750   };
4751   
4752   class DataArrayByteIterator;
4753
4754   class DataArrayByte : public DataArrayChar
4755   {
4756   public:
4757     static DataArrayByte *New();
4758     DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception);
4759     DataArrayByteIterator *iterator();
4760     DataArrayByte *deepCpy() const;
4761     DataArrayByte *performCpy(bool deepCpy) const;
4762     char byteValue() const throw(INTERP_KERNEL::Exception);
4763     %extend
4764     {
4765       DataArrayByte() throw(INTERP_KERNEL::Exception)
4766         {
4767           return DataArrayByte::New();
4768         }
4769
4770       static DataArrayByte *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
4771       {
4772         const char *msg="ParaMEDMEM::DataArrayByte::New : Available API are : \n-DataArrayByte.New()\n--DataArrayByte.New([1,3,4])\n-DataArrayByte.New([1,3,4],3)\n-DataArrayByte.New([1,3,4,5],2,2)\n-DataArrayByte.New(5)\n-DataArrayByte.New(5,2) !";
4773         if(PyList_Check(elt0) || PyTuple_Check(elt0))
4774           {
4775             if(nbOfTuples)
4776               {
4777                 if(PyInt_Check(nbOfTuples))
4778                   {
4779                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
4780                     if(nbOfTuples1<0)
4781                       throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive set of allocated memory !");
4782                     if(nbOfComp)
4783                       {
4784                         if(PyInt_Check(nbOfComp))
4785                           {//DataArrayByte.New([1,3,4,5],2,2)
4786                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
4787                             if(nbOfCompo<0)
4788                               throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive number of components !");
4789                             MEDCouplingAutoRefCountObjectPtr<DataArrayByte> ret=DataArrayByte::New();
4790                             std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
4791                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
4792                             return ret.retn();
4793                           }
4794                         else
4795                           throw INTERP_KERNEL::Exception(msg);
4796                       }
4797                     else
4798                       {//DataArrayByte.New([1,3,4],3)
4799                         MEDCouplingAutoRefCountObjectPtr<DataArrayByte> ret=DataArrayByte::New();
4800                         int tmpp1=-1;
4801                         std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
4802                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
4803                         return ret.retn();
4804                       }
4805                   }
4806                 else
4807                   throw INTERP_KERNEL::Exception(msg);
4808               }
4809             else
4810               {// DataArrayByte.New([1,3,4])
4811                 MEDCouplingAutoRefCountObjectPtr<DataArrayByte> ret=DataArrayByte::New();
4812                 int tmpp1=-1,tmpp2=-1;
4813                 std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
4814                 ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
4815                 return ret.retn();
4816               }
4817           }
4818         else if(PyInt_Check(elt0))
4819           {
4820             int nbOfTuples1=PyInt_AS_LONG(elt0);
4821             if(nbOfTuples1<0)
4822               throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive set of allocated memory !");
4823             if(nbOfTuples)
4824               {
4825                 if(!nbOfComp)
4826                   {
4827                     if(PyInt_Check(nbOfTuples))
4828                       {//DataArrayByte.New(5,2)
4829                         int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
4830                         if(nbOfCompo<0)
4831                           throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive number of components !");
4832                         MEDCouplingAutoRefCountObjectPtr<DataArrayByte> ret=DataArrayByte::New();
4833                         ret->alloc(nbOfTuples1,nbOfCompo);
4834                         return ret.retn();
4835                       }
4836                     else
4837                       throw INTERP_KERNEL::Exception(msg);
4838                   }
4839                 else
4840                   throw INTERP_KERNEL::Exception(msg);
4841               }
4842             else
4843               {//DataArrayByte.New(5)
4844                 MEDCouplingAutoRefCountObjectPtr<DataArrayByte> ret=DataArrayByte::New();
4845                 ret->alloc(nbOfTuples1,1);
4846                 return ret.retn();
4847               }
4848           }
4849         else
4850           throw INTERP_KERNEL::Exception(msg);
4851       }
4852
4853       DataArrayByte(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
4854         {
4855           return ParaMEDMEM_DataArrayByte_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
4856         }
4857    
4858       std::string __repr__() const throw(INTERP_KERNEL::Exception)
4859       {
4860         std::ostringstream oss;
4861         self->reprQuickOverview(oss);
4862         return oss.str();
4863       }
4864   
4865       int __int__() const throw(INTERP_KERNEL::Exception)
4866       {
4867         return (int) self->byteValue();
4868       }
4869
4870       DataArrayByteIterator *__iter__() throw(INTERP_KERNEL::Exception)
4871       {
4872         return self->iterator();
4873       }
4874
4875       int getIJ(int tupleId, int compoId) const
4876       {
4877         return (int)self->getIJ(tupleId,compoId);
4878       }
4879       
4880       int getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
4881       {
4882         return (int)self->getIJSafe(tupleId,compoId);
4883       }
4884
4885       std::string __str__() const throw(INTERP_KERNEL::Exception)
4886       {
4887         return self->repr();
4888       }
4889
4890       PyObject *toStrList() const throw(INTERP_KERNEL::Exception)
4891       {
4892         const char *vals=self->getConstPointer();
4893         int nbOfComp=self->getNumberOfComponents();
4894         int nbOfTuples=self->getNumberOfTuples();
4895         return convertCharArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
4896       }
4897    
4898       bool presenceOfTuple(PyObject *tupl) const throw(INTERP_KERNEL::Exception)
4899       {
4900         int sz=-1,sw=-1;
4901         int ival=-1; std::vector<int> ivval;
4902         const int *pt=convertObjToPossibleCpp1_Safe(tupl,sw,sz,ival,ivval);
4903         std::vector<char> vals(sz);
4904         std::copy(pt,pt+sz,vals.begin());
4905         return self->presenceOfTuple(vals);
4906       }
4907
4908       bool presenceOfValue(PyObject *vals) const throw(INTERP_KERNEL::Exception)
4909       {
4910         int sz=-1,sw=-1;
4911         int ival=-1; std::vector<int> ivval;
4912         const int *pt=convertObjToPossibleCpp1_Safe(vals,sw,sz,ival,ivval);
4913         std::vector<char> vals2(sz);
4914         std::copy(pt,pt+sz,vals2.begin());
4915         return self->presenceOfValue(vals2);
4916       }
4917
4918       int locateValue(PyObject *vals) const throw(INTERP_KERNEL::Exception)
4919       {
4920         int sz=-1,sw=-1;
4921         int ival=-1; std::vector<int> ivval;
4922         const int *pt=convertObjToPossibleCpp1_Safe(vals,sw,sz,ival,ivval);
4923         std::vector<char> vals2(sz);
4924         std::copy(pt,pt+sz,vals2.begin());
4925         return self->locateValue(vals2);
4926       }
4927
4928       int locateTuple(PyObject *tupl) const throw(INTERP_KERNEL::Exception)
4929       {
4930         int sz=-1,sw=-1;
4931         int ival=-1; std::vector<int> ivval;
4932         const int *pt=convertObjToPossibleCpp1_Safe(tupl,sw,sz,ival,ivval);
4933         std::vector<char> vals(sz);
4934         std::copy(pt,pt+sz,vals.begin());
4935         return self->locateTuple(vals);
4936       }
4937
4938       int search(PyObject *strOrListOfInt) const throw(INTERP_KERNEL::Exception)
4939       {
4940         int sz=-1,sw=-1;
4941         int ival=-1; std::vector<int> ivval;
4942         const int *pt=convertObjToPossibleCpp1_Safe(strOrListOfInt,sw,sz,ival,ivval);
4943         std::vector<char> vals(sz);
4944         std::copy(pt,pt+sz,vals.begin());
4945         return self->search(vals);
4946       }
4947
4948       PyObject *getTuple(int tupleId) throw(INTERP_KERNEL::Exception)
4949       {
4950         int sz=self->getNumberOfComponents();
4951         INTERP_KERNEL::AutoPtr<char> tmp=new char[sz];
4952         self->getTuple(tupleId,tmp);
4953         PyObject *ret=PyTuple_New(sz);
4954         for(int i=0;i<sz;i++) PyTuple_SetItem(ret,i,PyInt_FromLong((int)tmp[i]));
4955         return ret;
4956       }
4957
4958       PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
4959       {
4960         int tmp;
4961         int r1=(int)self->getMaxValue(tmp);
4962         PyObject *ret=PyTuple_New(2);
4963         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
4964         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
4965         return ret;
4966       }
4967
4968       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
4969       {
4970         int tmp;
4971         int r1=(int)self->getMinValue(tmp);
4972         PyObject *ret=PyTuple_New(2);
4973         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
4974         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
4975         return ret;
4976       }
4977
4978       int index(PyObject *obj) const throw(INTERP_KERNEL::Exception)
4979       {
4980         int nbOfCompo=self->getNumberOfComponents();
4981         switch(nbOfCompo)
4982           {
4983           case 1:
4984             {
4985               if(PyInt_Check(obj))
4986                 {
4987                   int val=(int)PyInt_AS_LONG(obj);
4988                   return self->locateValue(val);
4989                 }
4990               else
4991                 throw INTERP_KERNEL::Exception("DataArrayByte::index : 'this' contains one component and trying to find an element which is not an integer !");
4992             }
4993           default:
4994             return ParaMEDMEM_DataArrayByte_locateTuple(self,obj);
4995           }
4996       }
4997
4998       bool __contains__(PyObject *obj) const throw(INTERP_KERNEL::Exception)
4999       {
5000         int nbOfCompo=self->getNumberOfComponents();
5001         switch(nbOfCompo)
5002           {
5003           case 0:
5004             return false;
5005           case 1:
5006             {
5007               if(PyInt_Check(obj))
5008                 {
5009                   int val=(int)PyInt_AS_LONG(obj);
5010                   return self->presenceOfValue(val);
5011                 }
5012               else
5013                 throw INTERP_KERNEL::Exception("DataArrayByte::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
5014             }
5015           default:
5016             return ParaMEDMEM_DataArrayByte_presenceOfTuple(self,obj);
5017           }
5018       }
5019     }
5020   };
5021
5022   class DataArrayByteTuple;
5023
5024   class DataArrayByteIterator
5025   {
5026   public:
5027     DataArrayByteIterator(DataArrayByte *da);
5028     ~DataArrayByteIterator();
5029   };
5030
5031   class DataArrayByteTuple
5032   {
5033   public:
5034     std::string repr() const throw(INTERP_KERNEL::Exception);
5035     DataArrayByte *buildDAByte(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
5036     %extend
5037     {
5038       std::string __str__() const
5039       {
5040         return self->repr();
5041       }
5042       
5043       char __int__() const throw(INTERP_KERNEL::Exception)
5044       {
5045         return self->byteValue();
5046       }
5047       
5048       DataArrayByte *buildDAByte()
5049       {
5050         return self->buildDAByte(1,self->getNumberOfCompo());
5051       }
5052     }
5053   };
5054   
5055   class DataArrayAsciiCharIterator;
5056   
5057   class DataArrayAsciiChar : public DataArrayChar
5058   {
5059   public:
5060     static DataArrayAsciiChar *New();
5061     DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception);
5062     DataArrayAsciiCharIterator *iterator();
5063     DataArrayAsciiChar *deepCpy() const;
5064     DataArrayAsciiChar *performCpy(bool deepCpy) const;
5065     char asciiCharValue() const throw(INTERP_KERNEL::Exception);
5066     %extend
5067     {
5068       DataArrayAsciiChar() throw(INTERP_KERNEL::Exception)
5069         {
5070           return DataArrayAsciiChar::New();
5071         }
5072
5073       static DataArrayAsciiChar *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
5074       {
5075         const char *msg="ParaMEDMEM::DataArrayAsciiChar::New : Available API are : \n-DataArrayAsciiChar.New()\n-DataArrayAsciiChar.New([1,3,4])\n-DataArrayAsciiChar.New([\"abc\",\"de\",\"fghi\"])\n-DataArrayAsciiChar.New([\"abc\",\"de\",\"fghi\"],\"t\")\n-DataArrayAsciiChar.New([1,3,4],3)\n-DataArrayAsciiChar.New([1,3,4,5],2,2)\n-DataArrayAsciiChar.New(5)\n-DataArrayAsciiChar.New(5,2) !";
5076         if(PyList_Check(elt0) || PyTuple_Check(elt0))
5077           {
5078             if(nbOfTuples)
5079               {
5080                 if(PyInt_Check(nbOfTuples))
5081                   {
5082                     int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
5083                     if(nbOfTuples1<0)
5084                       throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive set of allocated memory !");
5085                     if(nbOfComp)
5086                       {
5087                         if(PyInt_Check(nbOfComp))
5088                           {//DataArrayAsciiChar.New([1,3,4,5],2,2)
5089                             int nbOfCompo=PyInt_AS_LONG(nbOfComp);
5090                             if(nbOfCompo<0)
5091                               throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive number of components !");
5092                             MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5093                             std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
5094                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
5095                             return ret.retn();
5096                           }
5097                         else
5098                           throw INTERP_KERNEL::Exception(msg);
5099                       }
5100                     else
5101                       {//DataArrayAsciiChar.New([1,3,4],3)
5102                         MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5103                         int tmpp1=-1;
5104                         std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
5105                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
5106                         return ret.retn();
5107                       }
5108                   }
5109                 else if(PyString_Check(nbOfTuples))
5110                   {
5111                     if(PyString_Size(nbOfTuples)!=1)
5112                       throw INTERP_KERNEL::Exception(msg);
5113                     //DataArrayAsciiChar.New(["abc","de","fghi"],"t")
5114                     std::vector<std::string> tmp;
5115                     if(fillStringVector(elt0,tmp))
5116                       return DataArrayAsciiChar::New(tmp,PyString_AsString(nbOfTuples)[0]);
5117                     else
5118                       throw INTERP_KERNEL::Exception(msg);
5119                   }
5120                 else
5121                   throw INTERP_KERNEL::Exception(msg);
5122               }
5123             else
5124               {
5125                 std::vector<std::string> tmmp;
5126                 if(fillStringVector(elt0,tmmp))
5127                   //DataArrayAsciiChar.New(["abc","de","fghi"])
5128                   return DataArrayAsciiChar::New(tmmp,' ');
5129                 else
5130                   {
5131                     // DataArrayAsciiChar.New([1,3,4])
5132                     MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5133                     int tmpp1=-1,tmpp2=-1;
5134                     std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
5135                     ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
5136                     return ret.retn();
5137                   }
5138               }
5139           }
5140         else if(PyInt_Check(elt0))
5141           {
5142             int nbOfTuples1=PyInt_AS_LONG(elt0);
5143             if(nbOfTuples1<0)
5144               throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive set of allocated memory !");
5145             if(nbOfTuples)
5146               {
5147                 if(!nbOfComp)
5148                   {
5149                     if(PyInt_Check(nbOfTuples))
5150                       {//DataArrayAsciiChar.New(5,2)
5151                         int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
5152                         if(nbOfCompo<0)
5153                           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive number of components !");
5154                         MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5155                         ret->alloc(nbOfTuples1,nbOfCompo);
5156                         return ret.retn();
5157                       }
5158                     else
5159                       throw INTERP_KERNEL::Exception(msg);
5160                   }
5161                 else
5162                   throw INTERP_KERNEL::Exception(msg);
5163               }
5164             else
5165               {//DataArrayAsciiChar.New(5)
5166                 MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
5167                 ret->alloc(nbOfTuples1,1);
5168                 return ret.retn();
5169               }
5170           }
5171         else
5172           throw INTERP_KERNEL::Exception(msg);
5173       }
5174
5175       DataArrayAsciiChar(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
5176         {
5177           return ParaMEDMEM_DataArrayAsciiChar_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
5178         }
5179
5180       std::string __repr__() const throw(INTERP_KERNEL::Exception)
5181       {
5182         std::ostringstream oss;
5183         self->reprQuickOverview(oss);
5184         return oss.str();
5185       }
5186
5187       DataArrayAsciiCharIterator *__iter__() throw(INTERP_KERNEL::Exception)
5188       {
5189         return self->iterator();
5190       }
5191
5192       std::string getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
5193       {
5194         char tmp[2]; tmp[1]='\0';
5195         tmp[0]=self->getIJ(tupleId,compoId);
5196         return std::string(tmp);
5197       }
5198    
5199       std::string getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
5200       {
5201         char tmp[2]; tmp[1]='\0';
5202         tmp[0]=self->getIJSafe(tupleId,compoId);
5203         return std::string(tmp);
5204       }
5205
5206       std::string __str__() const throw(INTERP_KERNEL::Exception)
5207       {
5208         return self->repr();
5209       }
5210
5211       PyObject *toStrList() const throw(INTERP_KERNEL::Exception)
5212       {
5213         const char *vals=self->getConstPointer();
5214         int nbOfComp=self->getNumberOfComponents();
5215         int nbOfTuples=self->getNumberOfTuples();
5216         return convertCharArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
5217       }
5218
5219       bool presenceOfTuple(PyObject *tupl) const throw(INTERP_KERNEL::Exception)
5220       {
5221         if(PyString_Check(tupl))
5222           {
5223             Py_ssize_t sz=PyString_Size(tupl);
5224             std::vector<char> vals(sz);
5225             std::copy(PyString_AsString(tupl),PyString_AsString(tupl)+sz,vals.begin());
5226             return self->presenceOfTuple(vals);
5227           }
5228         else
5229           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::presenceOfTuple : only strings in input supported !");
5230       }
5231    
5232       bool presenceOfValue(PyObject *vals) const throw(INTERP_KERNEL::Exception)
5233       {
5234         if(PyString_Check(vals))
5235           {
5236             Py_ssize_t sz=PyString_Size(vals);
5237             std::vector<char> vals2(sz);
5238             std::copy(PyString_AsString(vals),PyString_AsString(vals)+sz,vals2.begin());
5239             return self->presenceOfValue(vals2);
5240           }
5241         else
5242           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::presenceOfValue : only strings in input supported !");
5243       }
5244
5245       int locateValue(PyObject *vals) const throw(INTERP_KERNEL::Exception)
5246       {
5247         if(PyString_Check(vals))
5248           {
5249             Py_ssize_t sz=PyString_Size(vals);
5250             std::vector<char> vals2(sz);
5251             std::copy(PyString_AsString(vals),PyString_AsString(vals)+sz,vals2.begin());
5252             return self->locateValue(vals2);
5253           }
5254         else
5255           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::locateValue : only strings in input supported !");
5256       }
5257
5258       int locateTuple(PyObject *tupl) const throw(INTERP_KERNEL::Exception)
5259       {
5260         if(PyString_Check(tupl))
5261           {
5262             Py_ssize_t sz=PyString_Size(tupl);
5263             std::vector<char> vals(sz);
5264             std::copy(PyString_AsString(tupl),PyString_AsString(tupl)+sz,vals.begin());
5265             return self->locateTuple(vals);
5266           }
5267         else
5268           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::locateTuple : only strings in input supported !");
5269       }
5270
5271       int search(PyObject *strOrListOfInt) const throw(INTERP_KERNEL::Exception)
5272       {
5273         if(PyString_Check(strOrListOfInt))
5274           {
5275             Py_ssize_t sz=PyString_Size(strOrListOfInt);
5276             std::vector<char> vals(sz);
5277             std::copy(PyString_AsString(strOrListOfInt),PyString_AsString(strOrListOfInt)+sz,vals.begin());
5278             return self->search(vals);
5279           }
5280         else
5281           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::search : only strings in input supported !");
5282       }
5283    
5284       PyObject *getTuple(int tupleId) const throw(INTERP_KERNEL::Exception)
5285       {
5286         int sz=self->getNumberOfComponents();
5287         INTERP_KERNEL::AutoPtr<char> tmp=new char[sz+1]; tmp[sz]='\0';
5288         self->getTuple(tupleId,tmp);
5289         return PyString_FromString(tmp);
5290       }
5291
5292       PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
5293       {
5294         int tmp;
5295         char tmp2[2]; tmp2[1]='\0';
5296         tmp2[0]=self->getMaxValue(tmp);
5297         PyObject *ret=PyTuple_New(2);
5298         PyTuple_SetItem(ret,0,PyString_FromString(tmp2));
5299         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
5300         return ret;
5301       }
5302
5303       PyObject *getMinValue() const throw(INTERP_KERNEL::Exception)
5304       {
5305         int tmp;
5306         char tmp2[2]; tmp2[1]='\0';
5307         tmp2[0]=self->getMinValue(tmp);
5308         PyObject *ret=PyTuple_New(2);
5309         PyTuple_SetItem(ret,0,PyString_FromString(tmp2));
5310         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
5311         return ret;
5312       }
5313
5314       int index(PyObject *obj) const throw(INTERP_KERNEL::Exception)
5315       {
5316         int nbOfCompo=self->getNumberOfComponents();
5317         switch(nbOfCompo)
5318           {
5319           case 1:
5320             {
5321               if(PyString_Check(obj))
5322                 {
5323                   Py_ssize_t sz=PyString_Size(obj);
5324                   char *pt=PyString_AsString(obj);
5325                   if(sz==1)
5326                     return self->locateValue(pt[0]);
5327                   else
5328                     throw INTERP_KERNEL::Exception("DataArrayAsciiChar::index : 'this' contains one component and trying to find a string with size different from 1 !");
5329                 }
5330               else
5331                 throw INTERP_KERNEL::Exception("DataArrayAsciiChar::index : 'this' contains one component and trying to find an element which is not an integer !");
5332             }
5333           default:
5334             return ParaMEDMEM_DataArrayAsciiChar_locateTuple(self,obj);
5335           }
5336       }
5337
5338       bool __contains__(PyObject *obj) const throw(INTERP_KERNEL::Exception)
5339       {
5340         int nbOfCompo=self->getNumberOfComponents();
5341         switch(nbOfCompo)
5342           {
5343           case 0:
5344             return false;
5345           case 1:
5346             {
5347               if(PyString_Check(obj))
5348                 {
5349                   Py_ssize_t sz=PyString_Size(obj);
5350                   char *pt=PyString_AsString(obj);
5351                   if(sz==1)
5352                     return self->presenceOfValue(pt[0]);
5353                   else
5354                     throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__contains__ : 'this' contains one component and trying to find a string with size different from 1 !");
5355                 }
5356               else
5357                 throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
5358             }
5359           default:
5360             return ParaMEDMEM_DataArrayAsciiChar_presenceOfTuple(self,obj);
5361           }
5362       }
5363
5364       PyObject *__getitem__(PyObject *obj) const throw(INTERP_KERNEL::Exception)
5365       {
5366         int sw,iTypppArr;
5367         std::vector<int> stdvecTyyppArr;
5368         std::pair<int, std::pair<int,int> > sTyyppArr;
5369         ParaMEDMEM::DataArrayInt *daIntTyypp=0;
5370         convertObjToPossibleCpp2(obj,self->getNumberOfTuples(),sw,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
5371         switch(sw)
5372           {
5373           case 1:
5374             return ParaMEDMEM_DataArrayAsciiChar_getTuple(self,iTypppArr);
5375           case 2:
5376             return convertDataArrayChar(self->selectByTupleIdSafe(&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size()), SWIG_POINTER_OWN | 0 );
5377           case 3:
5378             return convertDataArrayChar(self->selectByTupleId2(sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second), SWIG_POINTER_OWN | 0 );
5379           case 4:
5380             return convertDataArrayChar(self->selectByTupleIdSafe(daIntTyypp->begin(),daIntTyypp->end()), SWIG_POINTER_OWN | 0 );
5381           default:
5382             throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__getitem__ : supporting int, list of int, tuple of int, DataArrayInt and slice in input !");
5383           }
5384       }
5385
5386       DataArrayAsciiChar *__setitem__(PyObject *obj, PyObject *value) throw(INTERP_KERNEL::Exception)
5387       {
5388         static const char msg[]="DataArrayAsciiChar::__setitem__ : supporting int, list of int, tuple of int, DataArrayInt and slice in input, and 4 types accepted in value : string, list or tuple of strings having same size, not null DataArrayChar instance.";
5389         int sw1,iTypppArr;
5390         std::vector<int> stdvecTyyppArr;
5391         std::pair<int, std::pair<int,int> > sTyyppArr;
5392         ParaMEDMEM::DataArrayInt *daIntTyypp=0;
5393         int nbOfCompo=self->getNumberOfComponents();
5394         int nbOfTuples=self->getNumberOfTuples();
5395         convertObjToPossibleCpp2(obj,nbOfTuples,sw1,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
5396         int sw2;
5397         char vc; std::string sc; std::vector<std::string> vsc; DataArrayChar *dacc=0;
5398         convertObjToPossibleCpp6(value,sw2,vc,sc,vsc,dacc);
5399         switch(sw1)
5400           {
5401           case 1:
5402             {//obj int
5403               switch(sw2)
5404                 {//value char
5405                 case 1:
5406                   {
5407                     self->setPartOfValuesSimple3(vc,&iTypppArr,&iTypppArr+1,0,nbOfCompo,1);
5408                     return self;
5409                   }
5410                   //value string
5411                 case 2:
5412                   {
5413                     MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(sc);
5414                     self->setPartOfValues3(tmp,&iTypppArr,&iTypppArr+1,0,nbOfCompo,1,false);
5415                     return self;
5416                   }
5417                   //value vector<string>
5418                 case 3:
5419                   {
5420                     MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(vsc,' ');
5421                     self->setPartOfValues3(tmp,&iTypppArr,&iTypppArr+1,0,nbOfCompo,1,false);
5422                     return self;
5423                   }
5424                   //value DataArrayChar
5425                 case 4:
5426                   {
5427                     self->setPartOfValues3(dacc,&iTypppArr,&iTypppArr+1,0,nbOfCompo,1,false);
5428                     return self;
5429                   }
5430                 default:
5431                   throw INTERP_KERNEL::Exception(msg);
5432                 }
5433             }
5434           case 2:
5435             {//obj list-tuple[int]
5436               switch(sw2)
5437                 {
5438                   {//value char
5439                   case 1:
5440                     {
5441                       self->setPartOfValuesSimple3(vc,&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size(),0,nbOfCompo,1);
5442                       return self;
5443                     }
5444                     //value string
5445                   case 2:
5446                     {
5447                       MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(sc);
5448                       self->setPartOfValues3(tmp,&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size(),0,nbOfCompo,1,false);
5449                       return self;
5450                     }
5451                     //value vector<string>
5452                   case 3:
5453                     {
5454                       MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(vsc,' ');
5455                       self->setPartOfValues3(tmp,&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size(),0,nbOfCompo,1,false);
5456                       return self;
5457                     }
5458                     //value DataArrayChar
5459                   case 4:
5460                     {
5461                       self->setPartOfValues3(dacc,&stdvecTyyppArr[0],&stdvecTyyppArr[0]+stdvecTyyppArr.size(),0,nbOfCompo,1,false);
5462                       return self;
5463                     }
5464                   default:
5465                     throw INTERP_KERNEL::Exception(msg);
5466                   }
5467                 }
5468             }
5469           case 3:
5470             {//slice
5471               switch(sw2)
5472                 {
5473                   {//value char
5474                   case 1:
5475                     {
5476                       self->setPartOfValuesSimple1(vc,sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second,0,nbOfCompo,1);
5477                       return self;
5478                     }
5479                     //value string
5480                   case 2:
5481                     {
5482                       MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(sc);
5483                       self->setPartOfValues1(tmp,sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second,0,nbOfCompo,1,false);
5484                       return self;
5485                     }
5486                     //value vector<string>
5487                   case 3:
5488                     {
5489                       MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(vsc,' ');
5490                       self->setPartOfValues1(tmp,sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second,0,nbOfCompo,1,false);
5491                       return self;
5492                     }
5493                     //value DataArrayChar
5494                   case 4:
5495                     {
5496                       self->setPartOfValues1(dacc,sTyyppArr.first,sTyyppArr.second.first,sTyyppArr.second.second,0,nbOfCompo,1,false);
5497                       return self;
5498                     }
5499                   default:
5500                     throw INTERP_KERNEL::Exception(msg);
5501                   }
5502                 }
5503             }
5504           case 4:
5505             {//DataArrayInt
5506               switch(sw2)
5507                 {
5508                   {//value char
5509                   case 1:
5510                     {
5511                       self->setPartOfValuesSimple3(vc,daIntTyypp->begin(),daIntTyypp->end(),0,nbOfCompo,1);
5512                       return self;
5513                     }
5514                     //value string
5515                   case 2:
5516                     {
5517                       MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(sc);
5518                       self->setPartOfValues3(tmp,daIntTyypp->begin(),daIntTyypp->end(),0,nbOfCompo,1,false);
5519                       return self;
5520                     }
5521                     //value vector<string>
5522                   case 3:
5523                     {
5524                       MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> tmp=DataArrayAsciiChar::New(vsc,' ');
5525                       self->setPartOfValues3(tmp,daIntTyypp->begin(),daIntTyypp->end(),0,nbOfCompo,1,false);
5526                       return self;
5527                     }
5528                     //value DataArrayChar
5529                   case 4:
5530                     {
5531                       self->setPartOfValues3(dacc,daIntTyypp->begin(),daIntTyypp->end(),0,nbOfCompo,1,false);
5532                       return self;
5533                     }
5534                   default:
5535                     throw INTERP_KERNEL::Exception(msg);
5536                   }
5537                 }
5538             }
5539           default:
5540             throw INTERP_KERNEL::Exception(msg);
5541           }
5542       }
5543     }
5544   };
5545
5546   class DataArrayAsciiCharTuple;
5547
5548   class DataArrayAsciiCharIterator
5549   {
5550   public:
5551     DataArrayAsciiCharIterator(DataArrayAsciiChar *da);
5552     ~DataArrayAsciiCharIterator();
5553     %extend
5554     {
5555       PyObject *next()
5556       {
5557         DataArrayAsciiCharTuple *ret=self->nextt();
5558         if(ret)
5559           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayAsciiCharTuple,SWIG_POINTER_OWN | 0);
5560         else
5561           {
5562             PyErr_SetString(PyExc_StopIteration,"No more data.");
5563             return 0;
5564           }
5565       }
5566     }
5567   };
5568
5569   class DataArrayAsciiCharTuple
5570   {
5571   public:
5572     int getNumberOfCompo() const;
5573     DataArrayAsciiChar *buildDAAsciiChar(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception);
5574     %extend
5575     {
5576       std::string __str__() const
5577       {
5578         return self->repr();
5579       }
5580       
5581       DataArrayAsciiChar *buildDAAsciiChar()
5582       {
5583         return self->buildDAAsciiChar(1,self->getNumberOfCompo());
5584       }
5585     }
5586   };
5587 }