X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingMemArray.hxx;h=825b9c8979e66d2717ad964c2994b084b700668b;hb=a6c4fa941f2f989606ab1ccf0d89c5992a0193a9;hp=b4ed5643ce1f6324d4f3bc73c0d677d7f5fe423c;hpb=878ba3d9f6c4859c96493ff2f1bc2f6b9bd66c9d;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index b4ed5643c..825b9c897 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); @@ -596,6 +602,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;