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