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