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