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