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