From 4d3b89b87c398587f44a2987fe37176030b714a3 Mon Sep 17 00:00:00 2001 From: ageay Date: Thu, 14 Jun 2012 13:51:41 +0000 Subject: [PATCH] Modification of API of DataArrayInt::getIdsEqualList, DataArrayInt::getIdsNotEqualList --- src/MEDCoupling/MEDCouplingMemArray.cxx | 8 ++++---- src/MEDCoupling/MEDCouplingMemArray.hxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx index ad9573207..933d542a0 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.cxx +++ b/src/MEDCoupling/MEDCouplingMemArray.cxx @@ -4371,11 +4371,11 @@ int DataArrayInt::changeValue(int oldValue, int newValue) throw(INTERP_KERNEL::E return ret; } -DataArrayInt *DataArrayInt::getIdsEqualList(const std::vector& vals) const throw(INTERP_KERNEL::Exception) +DataArrayInt *DataArrayInt::getIdsEqualList(const int *valsBg, const int *valsEnd) const throw(INTERP_KERNEL::Exception) { if(getNumberOfComponents()!=1) throw INTERP_KERNEL::Exception("DataArrayInt::getIdsEqualList : the array must have only one component, you can call 'rearrange' method before !"); - std::set vals2(vals.begin(),vals.end()); + std::set vals2(valsBg,valsEnd); const int *cptr=getConstPointer(); std::vector res; int nbOfTuples=getNumberOfTuples(); @@ -4388,11 +4388,11 @@ DataArrayInt *DataArrayInt::getIdsEqualList(const std::vector& vals) const return ret; } -DataArrayInt *DataArrayInt::getIdsNotEqualList(const std::vector& vals) const throw(INTERP_KERNEL::Exception) +DataArrayInt *DataArrayInt::getIdsNotEqualList(const int *valsBg, const int *valsEnd) const throw(INTERP_KERNEL::Exception) { if(getNumberOfComponents()!=1) throw INTERP_KERNEL::Exception("DataArrayInt::getIdsNotEqualList : the array must have only one component, you can call 'rearrange' method before !"); - std::set vals2(vals.begin(),vals.end()); + std::set vals2(valsBg,valsEnd); const int *cptr=getConstPointer(); std::vector res; int nbOfTuples=getNumberOfTuples(); diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index 4ce36c639..fe5a7e060 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -401,8 +401,8 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT const int *end() const { return getConstPointer()+getNbOfElems(); } MEDCOUPLING_EXPORT DataArrayInt *getIdsEqual(int val) const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT DataArrayInt *getIdsNotEqual(int val) const throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT DataArrayInt *getIdsEqualList(const std::vector& vals) const throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT DataArrayInt *getIdsNotEqualList(const std::vector& vals) const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT DataArrayInt *getIdsEqualList(const int *valsBg, const int *valsEnd) const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT DataArrayInt *getIdsNotEqualList(const int *valsBg, const int *valsEnd) const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT int changeValue(int oldValue, int newValue) throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT int locateTuple(const std::vector& tupl) const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT int locateValue(int value) const throw(INTERP_KERNEL::Exception); -- 2.39.2