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