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