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