X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingMemArray.txx;h=2f06690734ec66e0b3341d58176442e1988b3c70;hb=e7a9d4f59978fd384ee98db1dfdd5ec2118331ca;hp=ace8fdfb9ac7d587e86e0c21ece338ecbde118e0;hpb=40904f8238992f0f20e02194b0816b03df977690;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MEDCouplingMemArray.txx index ace8fdfb9..2f0669073 100755 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MEDCouplingMemArray.txx @@ -2711,7 +2711,7 @@ namespace MEDCoupling T *ptr(this->getPointer()); const T *ptrc(other->begin()); for(mcIdType i=0;ibegin()),*a1Ptr(a1->begin()); T *res(ret->getPointer()); for(mcIdType i=0;icopyStringInfoFrom(*a1); return ret.retn(); } @@ -2985,7 +2985,7 @@ namespace MEDCoupling const T *aMaxPtr(aMax->begin()); T *res=ret->getPointer(); for(mcIdType i=0;icopyStringInfoFrom(*aMax); } else @@ -3401,7 +3401,7 @@ struct NotInRange this->checkAllocated(); T *ptr(this->getPointer()); std::size_t nbOfElems(this->getNbOfElems()); - std::transform(ptr,ptr+nbOfElems,ptr,std::ptr_fun(std::abs)); + std::transform(ptr,ptr+nbOfElems,ptr,[](T c){return std::abs(c);}); this->declareAsNew(); } @@ -3424,7 +3424,7 @@ struct NotInRange mcIdType nbOfTuples(this->getNumberOfTuples()); std::size_t nbOfComp(this->getNumberOfComponents()); newArr->alloc(nbOfTuples,nbOfComp); - std::transform(this->begin(),this->end(),newArr->getPointer(),std::ptr_fun(std::abs)); + std::transform(this->begin(),this->end(),newArr->getPointer(),[](T c){return std::abs(c);}); newArr->copyStringInfoFrom(*this); return newArr.retn(); } @@ -4340,7 +4340,7 @@ struct NotInRange std::set castsDetected; for(mcIdType i=0;i(), work[i])); + rintstart res=std::find_if(bg,end2,std::bind(std::less_equal(),std::placeholders::_1,work[i])); std::size_t pos=std::distance(bg,res); std::size_t pos2=nbOfCast-pos; if(pos2checkAllocated(); T *ptr=this->getPointer(); std::size_t nbOfElems=this->getNbOfElems(); - std::transform(ptr,ptr+nbOfElems,ptr,std::bind2nd(std::divides(),val)); + std::transform(ptr,ptr+nbOfElems,ptr,std::bind(std::divides(),std::placeholders::_1,val)); this->declareAsNew(); } @@ -5413,7 +5413,7 @@ struct NotInRange this->checkAllocated(); T *ptr=this->getPointer(); std::size_t nbOfElems=this->getNbOfElems(); - std::transform(ptr,ptr+nbOfElems,ptr,std::bind2nd(std::modulus(),val)); + std::transform(ptr,ptr+nbOfElems,ptr,std::bind(std::modulus(),std::placeholders::_1,val)); this->declareAsNew(); } @@ -6461,7 +6461,7 @@ struct NotInRange T *ptr=this->getPointer(); const T *ptrc=other->getConstPointer(); for(mcIdType i=0;i(),*ptrc++)); + std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptr+i*nbOfComp,std::bind(std::modulus(),std::placeholders::_1,*ptrc++)); } else throw INTERP_KERNEL::Exception(msg); @@ -6702,7 +6702,7 @@ struct NotInRange const T *a1Ptr=a1->getConstPointer(); T *res=ret->getPointer(); for(mcIdType i=0;i(),a2Ptr[i])); + res=std::transform(a1Ptr+i*nbOfComp1,a1Ptr+(i+1)*nbOfComp1,res,std::bind(std::modulus(),std::placeholders::_1,a2Ptr[i])); ret->copyStringInfoFrom(*a1); return ret.retn(); } @@ -7016,7 +7016,7 @@ struct NotInRange ret->alloc(retSz,1); T *pt=ret->getPointer(); *pt++=0; for(typename std::vector::const_iterator it=arrs.begin();it!=arrs.end();it++) - pt=std::transform((*it)->begin()+1,(*it)->end(),pt,std::bind2nd(std::plus(),pt[-1])); + pt=std::transform((*it)->begin()+1,(*it)->end(),pt,std::bind(std::plus(),std::placeholders::_1,pt[-1])); ret->copyStringInfoFrom(*(arrs[0])); return ret.retn(); }