X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling_Swig%2FMEDCouplingMemArray.i;h=aabcd6a1bf7f2a3ca3cddc33a0ad510f42b84318;hb=b79f750df5fc807078f4efbf89d88587a88f7548;hp=8413c49b13b3fdf8c74eeff8f25a3c191b6e43b7;hpb=faa87e53cf612538de051c37eb3dbe1089527113;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling_Swig/MEDCouplingMemArray.i b/src/MEDCoupling_Swig/MEDCouplingMemArray.i index 8413c49b1..aabcd6a1b 100644 --- a/src/MEDCoupling_Swig/MEDCouplingMemArray.i +++ b/src/MEDCoupling_Swig/MEDCouplingMemArray.i @@ -41,11 +41,16 @@ namespace ParaMEDMEM void setInfoOnComponent(int i, const char *info) throw(INTERP_KERNEL::Exception); int getNumberOfComponents() const; virtual void alloc(int nbOfTuple, int nbOfCompo=1) throw(INTERP_KERNEL::Exception); + virtual void reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception); virtual bool isAllocated() const throw(INTERP_KERNEL::Exception); virtual void checkAllocated() const throw(INTERP_KERNEL::Exception); + virtual void desallocate() throw(INTERP_KERNEL::Exception); virtual int getNumberOfTuples() const throw(INTERP_KERNEL::Exception); virtual std::size_t getNbOfElems() const throw(INTERP_KERNEL::Exception); virtual std::size_t getNbOfElemAllocated() const throw(INTERP_KERNEL::Exception); + virtual DataArray *deepCpy() const throw(INTERP_KERNEL::Exception); + virtual DataArray *selectByTupleId2(int bg, int end2, int step) const throw(INTERP_KERNEL::Exception); + virtual void rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception); void checkNbOfTuples(int nbOfTuples, const char *msg) const throw(INTERP_KERNEL::Exception); void checkNbOfComps(int nbOfCompo, const char *msg) const throw(INTERP_KERNEL::Exception); void checkNbOfTuplesAndComp(const DataArray& other, const char *msg) const throw(INTERP_KERNEL::Exception); @@ -169,6 +174,46 @@ namespace ParaMEDMEM return self->selectByTupleRanges(ranges); } + virtual DataArray *selectByTupleId(PyObject *li) const throw(INTERP_KERNEL::Exception) + { + void *da=0; + int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 ); + if (!SWIG_IsOK(res1)) + { + int size; + INTERP_KERNEL::AutoPtr tmp=convertPyToNewIntArr2(li,&size); + return self->selectByTupleId(tmp,tmp+size); + } + else + { + DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da); + if(!da2) + throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !"); + da2->checkAllocated(); + return self->selectByTupleId(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems()); + } + } + + virtual DataArray *selectByTupleIdSafe(PyObject *li) const throw(INTERP_KERNEL::Exception) + { + void *da=0; + int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 ); + if (!SWIG_IsOK(res1)) + { + int size; + INTERP_KERNEL::AutoPtr tmp=convertPyToNewIntArr2(li,&size); + return self->selectByTupleIdSafe(tmp,tmp+size); + } + else + { + DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da); + if(!da2) + throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !"); + da2->checkAllocated(); + return self->selectByTupleIdSafe(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems()); + } + } + virtual PyObject *keepSelectedComponents(PyObject *li) const throw(INTERP_KERNEL::Exception) { std::vector tmp; @@ -230,6 +275,13 @@ namespace ParaMEDMEM throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBESRelative (wrap) : the input slice contains some unknowns that can't be determined in static method !"); return DataArray::GetNumberOfItemGivenBESRelative(strt,stp,step,""); } + + static DataArray *Aggregate(PyObject *arrs) throw(INTERP_KERNEL::Exception) + { + std::vector tmp; + convertFromPyObjVectorOfObj(arrs,SWIGTYPE_p_ParaMEDMEM__DataArray,"DataArray",tmp); + return DataArray::Aggregate(tmp); + } int getNumberOfItemGivenBES(PyObject *slic) const throw(INTERP_KERNEL::Exception) { @@ -264,7 +316,6 @@ namespace ParaMEDMEM static DataArrayDouble *New(); double doubleValue() const throw(INTERP_KERNEL::Exception); bool empty() const throw(INTERP_KERNEL::Exception); - DataArrayDouble *deepCpy() const throw(INTERP_KERNEL::Exception); DataArrayDouble *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception); void cpyFrom(const DataArrayDouble& other) throw(INTERP_KERNEL::Exception); void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception); @@ -285,13 +336,10 @@ namespace ParaMEDMEM std::string reprZip() const throw(INTERP_KERNEL::Exception); bool isEqual(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception); bool isEqualWithoutConsideringStr(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception); - void reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception); - DataArrayInt *convertToIntArr() const; + DataArrayInt *convertToIntArr() const throw(INTERP_KERNEL::Exception); DataArrayDouble *fromNoInterlace() const throw(INTERP_KERNEL::Exception); DataArrayDouble *toNoInterlace() const throw(INTERP_KERNEL::Exception); - DataArrayDouble *selectByTupleId2(int bg, int end2, int step) const throw(INTERP_KERNEL::Exception); DataArrayDouble *substr(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception); - void rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception); void transpose() throw(INTERP_KERNEL::Exception); DataArrayDouble *changeNbOfComponents(int newNbOfComp, double dftValue) const throw(INTERP_KERNEL::Exception); void meldWith(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception); @@ -301,7 +349,8 @@ namespace ParaMEDMEM void setPartOfValues1(const DataArrayDouble *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw(INTERP_KERNEL::Exception); void setPartOfValuesSimple1(double a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception); void setPartOfValuesAdv(const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception); - double getIJ(int tupleId, int compoId) const; + double getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception); + double front() const throw(INTERP_KERNEL::Exception); double back() const throw(INTERP_KERNEL::Exception); double getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception); void setIJ(int tupleId, int compoId, double newVal) throw(INTERP_KERNEL::Exception); @@ -350,9 +399,7 @@ namespace ParaMEDMEM void applyFuncFast64(const char *func) throw(INTERP_KERNEL::Exception); DataArrayInt *getIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception); static DataArrayDouble *Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception); - static DataArrayDouble *Aggregate(const std::vector& arr) throw(INTERP_KERNEL::Exception); static DataArrayDouble *Meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception); - static DataArrayDouble *Meld(const std::vector& arr) throw(INTERP_KERNEL::Exception); static DataArrayDouble *Dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception); static DataArrayDouble *CrossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception); static DataArrayDouble *Max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception); @@ -512,7 +559,7 @@ namespace ParaMEDMEM } } - DataArrayDoubleIterator *__iter__() + DataArrayDoubleIterator *__iter__() throw(INTERP_KERNEL::Exception) { return self->iterator(); } @@ -683,46 +730,6 @@ namespace ParaMEDMEM } } - DataArrayDouble *selectByTupleId(PyObject *li) const throw(INTERP_KERNEL::Exception) - { - void *da=0; - int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 ); - if (!SWIG_IsOK(res1)) - { - int size; - INTERP_KERNEL::AutoPtr tmp=convertPyToNewIntArr2(li,&size); - return self->selectByTupleId(tmp,tmp+size); - } - else - { - DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da); - if(!da2) - throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !"); - da2->checkAllocated(); - return self->selectByTupleId(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems()); - } - } - - DataArrayDouble *selectByTupleIdSafe(PyObject *li) const throw(INTERP_KERNEL::Exception) - { - void *da=0; - int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 ); - if (!SWIG_IsOK(res1)) - { - int size; - INTERP_KERNEL::AutoPtr tmp=convertPyToNewIntArr2(li,&size); - return self->selectByTupleIdSafe(tmp,tmp+size); - } - else - { - DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da); - if(!da2) - throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !"); - da2->checkAllocated(); - return self->selectByTupleIdSafe(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems()); - } - } - PyObject *minimalDistanceTo(const DataArrayDouble *other) const throw(INTERP_KERNEL::Exception) { int thisTupleId,otherTupleId; @@ -874,6 +881,18 @@ namespace ParaMEDMEM return ret; } + PyObject *areIncludedInMe(const DataArrayDouble *other, double prec) const throw(INTERP_KERNEL::Exception) + { + DataArrayInt *ret1=0; + bool ret0=self->areIncludedInMe(other,prec,ret1); + PyObject *ret=PyTuple_New(2); + PyObject *ret0Py=ret0?Py_True:Py_False; + Py_XINCREF(ret0Py); + PyTuple_SetItem(ret,0,ret0Py); + PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 )); + return ret; + } + PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception) { const char msg[]="Unexpected situation in DataArrayDouble::__getitem__ !"; @@ -1998,7 +2017,7 @@ namespace ParaMEDMEM class DataArrayDoubleTuple { public: - int getNumberOfCompo() const; + int getNumberOfCompo() const throw(INTERP_KERNEL::Exception); DataArrayDouble *buildDADouble(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception); %extend { @@ -2012,7 +2031,7 @@ namespace ParaMEDMEM return self->doubleValue(); } - DataArrayDouble *buildDADouble() + DataArrayDouble *buildDADouble() throw(INTERP_KERNEL::Exception) { return self->buildDADouble(1,self->getNumberOfCompo()); } @@ -2277,7 +2296,6 @@ namespace ParaMEDMEM int intValue() const throw(INTERP_KERNEL::Exception); int getHashCode() const throw(INTERP_KERNEL::Exception); bool empty() const throw(INTERP_KERNEL::Exception); - DataArrayInt *deepCpy() const throw(INTERP_KERNEL::Exception); DataArrayInt *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception); void cpyFrom(const DataArrayInt& other) throw(INTERP_KERNEL::Exception); void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception); @@ -2300,11 +2318,10 @@ namespace ParaMEDMEM void iota(int init=0) throw(INTERP_KERNEL::Exception); std::string repr() const throw(INTERP_KERNEL::Exception); std::string reprZip() const throw(INTERP_KERNEL::Exception); - DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const; - DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const; + DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const throw(INTERP_KERNEL::Exception); + DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const throw(INTERP_KERNEL::Exception); DataArrayInt *invertArrayO2N2N2OBis(int newNbOfElem) const throw(INTERP_KERNEL::Exception); - void reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception); - DataArrayDouble *convertToDblArr() const; + DataArrayDouble *convertToDblArr() const throw(INTERP_KERNEL::Exception); DataArrayInt *fromNoInterlace() const throw(INTERP_KERNEL::Exception); DataArrayInt *toNoInterlace() const throw(INTERP_KERNEL::Exception); DataArrayInt *selectByTupleId2(int bg, int end, int step) const throw(INTERP_KERNEL::Exception); @@ -2313,7 +2330,6 @@ namespace ParaMEDMEM bool isIdentity() const throw(INTERP_KERNEL::Exception); bool isUniform(int val) const throw(INTERP_KERNEL::Exception); DataArrayInt *substr(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception); - void rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception); void transpose() throw(INTERP_KERNEL::Exception); DataArrayInt *changeNbOfComponents(int newNbOfComp, int dftValue) const throw(INTERP_KERNEL::Exception); void meldWith(const DataArrayInt *other) throw(INTERP_KERNEL::Exception); @@ -2323,6 +2339,7 @@ namespace ParaMEDMEM void getTuple(int tupleId, int *res) const throw(INTERP_KERNEL::Exception); int getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception); int getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception); + int front() const throw(INTERP_KERNEL::Exception); int back() const throw(INTERP_KERNEL::Exception); void setIJ(int tupleId, int compoId, int newVal) throw(INTERP_KERNEL::Exception); void setIJSilent(int tupleId, int compoId, int newVal) throw(INTERP_KERNEL::Exception); @@ -2358,13 +2375,13 @@ namespace ParaMEDMEM void applyPow(int val) throw(INTERP_KERNEL::Exception); void applyRPow(int val) throw(INTERP_KERNEL::Exception); DataArrayInt *getIdsInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception); - static DataArrayInt *Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2); - static DataArrayInt *Aggregate(const std::vector& arr) throw(INTERP_KERNEL::Exception); + bool checkAllIdsInRange(int vmin, int vmax) const throw(INTERP_KERNEL::Exception); + static DataArrayInt *Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2) throw(INTERP_KERNEL::Exception); static DataArrayInt *Meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception); - static DataArrayInt *Meld(const std::vector& arr) throw(INTERP_KERNEL::Exception); static DataArrayInt *MakePartition(const std::vector& groups, int newNb, std::vector< std::vector >& fidsOfGroups) throw(INTERP_KERNEL::Exception); static DataArrayInt *BuildUnion(const std::vector& arr) throw(INTERP_KERNEL::Exception); static DataArrayInt *BuildIntersection(const std::vector& arr) throw(INTERP_KERNEL::Exception); + static DataArrayInt *FindPermutationFromFirstToSecond(const DataArrayInt *ids1, const DataArrayInt *ids2) throw(INTERP_KERNEL::Exception); DataArrayInt *buildComplement(int nbOfElement) const throw(INTERP_KERNEL::Exception); DataArrayInt *buildSubstraction(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception); DataArrayInt *buildSubstractionOptimized(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception); @@ -2487,7 +2504,7 @@ namespace ParaMEDMEM #ifdef WITH_NUMPY else if(PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL) {//DataArrayInt.New(numpyArray) - return BuildNewInstance(elt0,NPY_INT,&PyCallBackDataArrayInt_RefType,"INT32"); + return BuildNewInstance(elt0,NPY_INT32,&PyCallBackDataArrayInt_RefType,"INT32"); } #endif else @@ -2521,7 +2538,7 @@ namespace ParaMEDMEM return self->intValue(); } - DataArrayIntIterator *__iter__() + DataArrayIntIterator *__iter__() throw(INTERP_KERNEL::Exception) { return self->iterator(); } @@ -2611,7 +2628,7 @@ namespace ParaMEDMEM #ifdef WITH_NUMPY PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug ! { - return ToNumPyArray(self,NPY_INT,"DataArrayInt"); + return ToNumPyArray(self,NPY_INT32,"DataArrayInt"); } #endif @@ -2841,46 +2858,6 @@ namespace ParaMEDMEM } } - DataArrayInt *selectByTupleId(PyObject *li) const throw(INTERP_KERNEL::Exception) - { - void *da=0; - int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 ); - if (!SWIG_IsOK(res1)) - { - int size; - INTERP_KERNEL::AutoPtr tmp=convertPyToNewIntArr2(li,&size); - return self->selectByTupleId(tmp,tmp+size); - } - else - { - DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da); - if(!da2) - throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !"); - da2->checkAllocated(); - return self->selectByTupleId(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems()); - } - } - - DataArrayInt *selectByTupleIdSafe(PyObject *li) const throw(INTERP_KERNEL::Exception) - { - void *da=0; - int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 ); - if (!SWIG_IsOK(res1)) - { - int size; - INTERP_KERNEL::AutoPtr tmp=convertPyToNewIntArr2(li,&size); - return self->selectByTupleIdSafe(tmp,tmp+size); - } - else - { - DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da); - if(!da2) - throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !"); - da2->checkAllocated(); - return self->selectByTupleIdSafe(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems()); - } - } - void setSelectedComponents(const DataArrayInt *a, PyObject *li) throw(INTERP_KERNEL::Exception) { std::vector tmp; @@ -2921,6 +2898,13 @@ namespace ParaMEDMEM return DataArrayInt::Aggregate(tmp); } + static DataArrayInt *AggregateIndexes(PyObject *li) throw(INTERP_KERNEL::Exception) + { + std::vector tmp; + convertFromPyObjVectorOfObj(li,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",tmp); + return DataArrayInt::AggregateIndexes(tmp); + } + static DataArrayInt *BuildUnion(PyObject *li) throw(INTERP_KERNEL::Exception) { std::vector tmp; @@ -4254,7 +4238,7 @@ namespace ParaMEDMEM class DataArrayIntTuple { public: - int getNumberOfCompo() const; + int getNumberOfCompo() const throw(INTERP_KERNEL::Exception); DataArrayInt *buildDAInt(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception); %extend { @@ -4536,8 +4520,7 @@ namespace ParaMEDMEM class DataArrayChar : public DataArray { public: - virtual DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception) = 0; - virtual DataArrayChar *deepCpy() const throw(INTERP_KERNEL::Exception); + virtual DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception); int getHashCode() const throw(INTERP_KERNEL::Exception); bool empty() const throw(INTERP_KERNEL::Exception); void cpyFrom(const DataArrayChar& other) throw(INTERP_KERNEL::Exception); @@ -4554,23 +4537,20 @@ namespace ParaMEDMEM void fillWithValue(char val) throw(INTERP_KERNEL::Exception); std::string repr() const throw(INTERP_KERNEL::Exception); std::string reprZip() const throw(INTERP_KERNEL::Exception); - void reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception); DataArrayInt *convertToIntArr() const throw(INTERP_KERNEL::Exception); DataArrayChar *renumber(const int *old2New) const throw(INTERP_KERNEL::Exception); DataArrayChar *renumberR(const int *new2Old) const throw(INTERP_KERNEL::Exception); DataArrayChar *renumberAndReduce(const int *old2NewBg, int newNbOfTuple) const throw(INTERP_KERNEL::Exception); - DataArrayChar *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const throw(INTERP_KERNEL::Exception); - DataArrayChar *selectByTupleId2(int bg, int end, int step) const throw(INTERP_KERNEL::Exception); bool isUniform(char val) const throw(INTERP_KERNEL::Exception); - void rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception); DataArrayChar *substr(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception); DataArrayChar *changeNbOfComponents(int newNbOfComp, char dftValue) const throw(INTERP_KERNEL::Exception); void meldWith(const DataArrayChar *other) throw(INTERP_KERNEL::Exception); void setPartOfValuesAdv(const DataArrayChar *a, const DataArrayChar *tuplesSelec) throw(INTERP_KERNEL::Exception); + char front() const throw(INTERP_KERNEL::Exception); char back() const throw(INTERP_KERNEL::Exception); - void setIJ(int tupleId, int compoId, char newVal); - void setIJSilent(int tupleId, int compoId, char newVal); - char *getPointer(); + void setIJ(int tupleId, int compoId, char newVal) throw(INTERP_KERNEL::Exception); + void setIJSilent(int tupleId, int compoId, char newVal) throw(INTERP_KERNEL::Exception); + char *getPointer() throw(INTERP_KERNEL::Exception); DataArrayInt *getIdsEqual(char val) const throw(INTERP_KERNEL::Exception); DataArrayInt *getIdsNotEqual(char val) const throw(INTERP_KERNEL::Exception); int locateTuple(const std::vector& tupl) const throw(INTERP_KERNEL::Exception); @@ -4580,10 +4560,8 @@ namespace ParaMEDMEM char getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception); char getMinValueInArray() const throw(INTERP_KERNEL::Exception); DataArrayInt *getIdsInRange(char vmin, char vmax) const throw(INTERP_KERNEL::Exception); - static DataArrayChar *Aggregate(const DataArrayChar *a1, const DataArrayChar *a2); - static DataArrayChar *Aggregate(const std::vector& arr) throw(INTERP_KERNEL::Exception); + static DataArrayChar *Aggregate(const DataArrayChar *a1, const DataArrayChar *a2) throw(INTERP_KERNEL::Exception); static DataArrayChar *Meld(const DataArrayChar *a1, const DataArrayChar *a2) throw(INTERP_KERNEL::Exception); - static DataArrayChar *Meld(const std::vector& arr) throw(INTERP_KERNEL::Exception); %extend { int __len__() const throw(INTERP_KERNEL::Exception) @@ -4697,26 +4675,6 @@ namespace ParaMEDMEM } } - DataArrayChar *selectByTupleIdSafe(PyObject *li) const throw(INTERP_KERNEL::Exception) - { - void *da=0; - int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 ); - if (!SWIG_IsOK(res1)) - { - int size; - INTERP_KERNEL::AutoPtr tmp=convertPyToNewIntArr2(li,&size); - return self->selectByTupleIdSafe(tmp,tmp+size); - } - else - { - DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da); - if(!da2) - throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !"); - da2->checkAllocated(); - return self->selectByTupleIdSafe(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems()); - } - } - static DataArrayChar *Aggregate(PyObject *dachs) throw(INTERP_KERNEL::Exception) { std::vector tmp; @@ -4739,9 +4697,8 @@ namespace ParaMEDMEM { public: static DataArrayByte *New(); - DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception); - DataArrayByteIterator *iterator(); - DataArrayByte *performCpy(bool deepCpy) const; + DataArrayByteIterator *iterator() throw(INTERP_KERNEL::Exception); + DataArrayByte *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception); char byteValue() const throw(INTERP_KERNEL::Exception); %extend { @@ -4855,7 +4812,7 @@ namespace ParaMEDMEM return self->iterator(); } - int getIJ(int tupleId, int compoId) const + int getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception) { return (int)self->getIJ(tupleId,compoId); } @@ -5018,7 +4975,7 @@ namespace ParaMEDMEM DataArrayByte *buildDAByte(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception); %extend { - std::string __str__() const + std::string __str__() const throw(INTERP_KERNEL::Exception) { return self->repr(); } @@ -5028,7 +4985,7 @@ namespace ParaMEDMEM return self->byteValue(); } - DataArrayByte *buildDAByte() + DataArrayByte *buildDAByte() throw(INTERP_KERNEL::Exception) { return self->buildDAByte(1,self->getNumberOfCompo()); } @@ -5041,9 +4998,8 @@ namespace ParaMEDMEM { public: static DataArrayAsciiChar *New(); - DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception); - DataArrayAsciiCharIterator *iterator(); - DataArrayAsciiChar *performCpy(bool deepCpy) const; + DataArrayAsciiCharIterator *iterator() throw(INTERP_KERNEL::Exception); + DataArrayAsciiChar *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception); char asciiCharValue() const throw(INTERP_KERNEL::Exception); %extend { @@ -5551,16 +5507,16 @@ namespace ParaMEDMEM class DataArrayAsciiCharTuple { public: - int getNumberOfCompo() const; + int getNumberOfCompo() const throw(INTERP_KERNEL::Exception); DataArrayAsciiChar *buildDAAsciiChar(int nbOfTuples, int nbOfCompo) const throw(INTERP_KERNEL::Exception); %extend { - std::string __str__() const + std::string __str__() const throw(INTERP_KERNEL::Exception) { return self->repr(); } - DataArrayAsciiChar *buildDAAsciiChar() + DataArrayAsciiChar *buildDAAsciiChar() throw(INTERP_KERNEL::Exception) { return self->buildDAAsciiChar(1,self->getNumberOfCompo()); }