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