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