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