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