From: Anthony Geay Date: Tue, 22 Jul 2014 08:51:32 +0000 (+0200) Subject: DataArrayDouble::keepSelectedComponents : covariancize X-Git-Tag: V7_5_0a1~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c1bf593e205d1f894e0bf77be4e5cdf74022bf46;p=modules%2Fmed.git DataArrayDouble::keepSelectedComponents : covariancize --- diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx index 9ce46ad0f..6556e4964 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.cxx +++ b/src/MEDCoupling/MEDCouplingMemArray.cxx @@ -1862,7 +1862,7 @@ void DataArrayDouble::transpose() * \ref py_mcdataarraydouble_KeepSelectedComponents "Here is a Python example". * \endif */ -DataArray *DataArrayDouble::keepSelectedComponents(const std::vector& compoIds) const +DataArrayDouble *DataArrayDouble::keepSelectedComponents(const std::vector& compoIds) const { checkAllocated(); MEDCouplingAutoRefCountObjectPtr ret(DataArrayDouble::New()); @@ -7686,7 +7686,7 @@ void DataArrayInt::reAlloc(int nbOfTuples) * \ref py_mcdataarrayint_keepselectedcomponents "Here is a Python example". * \endif */ -DataArray *DataArrayInt::keepSelectedComponents(const std::vector& compoIds) const +DataArrayInt *DataArrayInt::keepSelectedComponents(const std::vector& compoIds) const { checkAllocated(); MEDCouplingAutoRefCountObjectPtr ret(DataArrayInt::New()); diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index 56b93b3f8..a032dc7f6 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -256,7 +256,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void rearrange(int newNbOfCompo); MEDCOUPLING_EXPORT void transpose(); MEDCOUPLING_EXPORT DataArrayDouble *changeNbOfComponents(int newNbOfComp, double dftValue) const; - MEDCOUPLING_EXPORT DataArray *keepSelectedComponents(const std::vector& compoIds) const; + MEDCOUPLING_EXPORT DataArrayDouble *keepSelectedComponents(const std::vector& compoIds) const; MEDCOUPLING_EXPORT void meldWith(const DataArrayDouble *other); MEDCOUPLING_EXPORT bool areIncludedInMe(const DataArrayDouble *other, double prec, DataArrayInt *&tupleIds) const; MEDCOUPLING_EXPORT void findCommonTuples(double prec, int limitTupleId, DataArrayInt *&comm, DataArrayInt *&commIndex) const; @@ -505,7 +505,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void rearrange(int newNbOfCompo); MEDCOUPLING_EXPORT void transpose(); MEDCOUPLING_EXPORT DataArrayInt *changeNbOfComponents(int newNbOfComp, int dftValue) const; - MEDCOUPLING_EXPORT DataArray *keepSelectedComponents(const std::vector& compoIds) const; + MEDCOUPLING_EXPORT DataArrayInt *keepSelectedComponents(const std::vector& compoIds) const; MEDCOUPLING_EXPORT void meldWith(const DataArrayInt *other); MEDCOUPLING_EXPORT void setSelectedComponents(const DataArrayInt *a, const std::vector& compoIds); MEDCOUPLING_EXPORT void setPartOfValues1(const DataArrayInt *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true); @@ -705,7 +705,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void rearrange(int newNbOfCompo); MEDCOUPLING_EXPORT DataArrayChar *substr(int tupleIdBg, int tupleIdEnd=-1) const; MEDCOUPLING_EXPORT DataArrayChar *changeNbOfComponents(int newNbOfComp, char dftValue) const; - MEDCOUPLING_EXPORT DataArray *keepSelectedComponents(const std::vector& compoIds) const; + MEDCOUPLING_EXPORT DataArrayChar *keepSelectedComponents(const std::vector& compoIds) const; MEDCOUPLING_EXPORT void meldWith(const DataArrayChar *other); MEDCOUPLING_EXPORT void setPartOfValues1(const DataArrayChar *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true); MEDCOUPLING_EXPORT void setPartOfValuesSimple1(char a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp); diff --git a/src/MEDCoupling/MEDCouplingMemArrayChar.cxx b/src/MEDCoupling/MEDCouplingMemArrayChar.cxx index ce3baa868..bc1138477 100644 --- a/src/MEDCoupling/MEDCouplingMemArrayChar.cxx +++ b/src/MEDCoupling/MEDCouplingMemArrayChar.cxx @@ -738,7 +738,7 @@ DataArrayChar *DataArrayChar::changeNbOfComponents(int newNbOfComp, char dftValu * \ref py_mcdataarrayint_keepselectedcomponents "Here is a Python example". * \endif */ -DataArray *DataArrayChar::keepSelectedComponents(const std::vector& compoIds) const +DataArrayChar *DataArrayChar::keepSelectedComponents(const std::vector& compoIds) const { checkAllocated(); MEDCouplingAutoRefCountObjectPtr ret(buildEmptySpecializedDAChar()); diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index cdacf6ec4..b0928bc92 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -3970,13 +3970,13 @@ namespace ParaMEDMEM case 1: { std::vector v2(1,singleVal); - MEDCouplingAutoRefCountObjectPtr aarr=static_cast(ret0Arr->keepSelectedComponents(v2)); + MEDCouplingAutoRefCountObjectPtr aarr(ret0Arr->keepSelectedComponents(v2)); ret0->setArray(aarr); return ret0.retn(); } case 2: { - MEDCouplingAutoRefCountObjectPtr aarr=static_cast(ret0Arr->keepSelectedComponents(multiVal)); + MEDCouplingAutoRefCountObjectPtr aarr(ret0Arr->keepSelectedComponents(multiVal)); ret0->setArray(aarr); return ret0.retn(); } @@ -3986,7 +3986,7 @@ namespace ParaMEDMEM std::vector v2(nbOfComp); for(int i=0;i aarr=static_cast(ret0Arr->keepSelectedComponents(v2)); + MEDCouplingAutoRefCountObjectPtr aarr(ret0Arr->keepSelectedComponents(v2)); ret0->setArray(aarr); return ret0.retn(); }