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