X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingMemArray.hxx;h=0fdbdcf1c04e56b7c5ce2c2068d71c6994f8235e;hb=0f701440d44fa7cb707df111658460ef5c447ff3;hp=b4ed5643ce1f6324d4f3bc73c0d677d7f5fe423c;hpb=878ba3d9f6c4859c96493ff2f1bc2f6b9bd66c9d;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index b4ed5643c..0fdbdcf1c 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -234,6 +234,8 @@ namespace MEDCoupling MEDCOUPLING_EXPORT const T *getConstPointer() const { return _mem.getConstPointer(); } MEDCOUPLING_EXPORT const T *begin() const { return getConstPointer(); } MEDCOUPLING_EXPORT const T *end() const { return getConstPointer()+getNbOfElems(); } + MEDCOUPLING_EXPORT T *rwBegin() { return getPointer(); } + MEDCOUPLING_EXPORT T *rwEnd() { return getPointer()+getNbOfElems(); } void alloc(std::size_t nbOfTuple, std::size_t nbOfCompo=1); void useArray(const T *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); void useExternalArrayWithRWAccess(const T *array, int nbOfTuple, int nbOfCompo); @@ -285,6 +287,8 @@ namespace MEDCoupling void setContigPartOfSelectedValuesSlice(int tupleIdStart, const DataArray *aBase, int bg, int end2, int step); T getMaxValue(int& tupleId) const; T getMaxValueInArray() const; + T getMaxAbsValue(std::size_t& tupleId) const; + T getMaxAbsValueInArray() const; T getMinValue(int& tupleId) const; T getMinValueInArray() const; MEDCOUPLING_EXPORT void getTuple(int tupleId, T *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); } @@ -349,13 +353,13 @@ namespace MEDCoupling MEDCOUPLING_EXPORT void reprZipWithoutNameStream(std::ostream& stream) const; MEDCOUPLING_EXPORT void reprNotTooLongWithoutNameStream(std::ostream& stream) const; MEDCOUPLING_EXPORT std::string reprNotTooLong() const; + template + MCAuto< typename Traits::ArrayType > convertToOtherTypeOfArr() const; protected: static typename Traits::ArrayType *PerformCopyOrIncrRef(bool dCpy, const typename Traits::ArrayType& self); template MCAuto findIdsAdv(const OP& op) const; private: - template - MCAuto< typename Traits::ArrayType > convertToOtherTypeOfArr() const; template void somethingEqual(const typename Traits::ArrayType *other); }; @@ -444,6 +448,7 @@ namespace MEDCoupling MEDCOUPLING_EXPORT double getAverageValue() const; MEDCOUPLING_EXPORT double norm2() const; MEDCOUPLING_EXPORT double normMax() const; + MEDCOUPLING_EXPORT void normMaxPerComponent(double * res) const; MEDCOUPLING_EXPORT double normMin() const; MEDCOUPLING_EXPORT void accumulate(double *res) const; MEDCOUPLING_EXPORT double accumulate(int compId) const; @@ -470,6 +475,7 @@ namespace MEDCoupling MEDCOUPLING_EXPORT DataArrayDouble *maxPerTupleWithCompoId(DataArrayInt32* &compoIdOfMaxPerTuple) const; MEDCOUPLING_EXPORT DataArrayDouble *buildEuclidianDistanceDenseMatrix() const; MEDCOUPLING_EXPORT DataArrayDouble *buildEuclidianDistanceDenseMatrixWith(const DataArrayDouble *other) const; + MEDCOUPLING_EXPORT void asArcOfCircle(double center[2], double& radius, double& ang) const; MEDCOUPLING_EXPORT void sortPerTuple(bool asc); MEDCOUPLING_EXPORT void applyInv(double numerator); MEDCOUPLING_EXPORT void applyPow(double val); @@ -573,6 +579,7 @@ namespace MEDCoupling MEDCOUPLING_EXPORT DataArrayInt32 *invertArrayO2N2N2O(int newNbOfElem) const; MEDCOUPLING_EXPORT DataArrayInt32 *invertArrayN2O2O2N(int oldNbOfElem) const; MEDCOUPLING_EXPORT MCAuto< MapKeyVal > invertArrayN2O2O2NOptimized() const; + MEDCOUPLING_EXPORT MCAuto< MapKeyVal > giveN2OOptimized() const; MEDCOUPLING_EXPORT DataArrayInt32 *invertArrayO2N2N2OBis(int newNbOfElem) const; MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleId(const int *new2OldBg, const int *new2OldEnd) const { return DataArrayTemplate::mySelectByTupleId(new2OldBg,new2OldEnd); } MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleId(const DataArrayInt32& di) const { return DataArrayTemplate::mySelectByTupleId(di); } @@ -596,6 +603,7 @@ namespace MEDCoupling MEDCOUPLING_EXPORT DataArrayInt32 *findIdsEqualList(const int *valsBg, const int *valsEnd) const; MEDCOUPLING_EXPORT DataArrayInt32 *findIdsNotEqualList(const int *valsBg, const int *valsEnd) const; MEDCOUPLING_EXPORT DataArrayInt32 *findIdsEqualTuple(const int *tupleBg, const int *tupleEnd) const; + MEDCOUPLING_EXPORT MCAuto findIdForEach(const int *valsBg, const int *valsEnd) const; MEDCOUPLING_EXPORT int changeValue(int oldValue, int newValue); MEDCOUPLING_EXPORT int findIdFirstEqualTuple(const std::vector& tupl) const; MEDCOUPLING_EXPORT int findIdFirstEqual(int value) const;