-// Copyright (C) 2007-2021 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <string>
#include <vector>
#include <iterator>
+#include <functional>
namespace MEDCoupling
{
DataArrayDouble *trace() const;
DataArrayDouble *deviator() const;
DataArrayDouble *magnitude() const;
+ DataArrayDouble *minPerTuple() const;
DataArrayDouble *maxPerTuple() const;
DataArrayDouble *maxPerTupleWithCompoId(DataArrayIdType* &compoIdOfMaxPerTuple) const;
DataArrayDouble *buildEuclidianDistanceDenseMatrix() const;
template<int SPACEDIM>
static void FindTupleIdsNearTuplesAlg(const BBTreePts<SPACEDIM,mcIdType>& myTree, const double *pos, mcIdType nbOfTuples, double eps,
DataArrayIdType *c, DataArrayIdType *cI);
+ private:
+ DataArrayDouble *operatePerTuple(std::function<double(const double *bg, const double *endd)> func) const;
private:
~DataArrayDouble() { }
DataArrayDouble() { }
T checkUniformAndGuess() const;
bool hasUniqueValues() const;
void setSelectedComponents(const DataArrayType *a, const std::vector<std::size_t>& compoIds);
+ DataArrayIdType *locateComponentId(const DataArrayType *valToSearchIntoTuples, const DataArrayIdType *tupleIdHint) const;
DataArrayIdType *findIdsNotEqual(T val) const;
DataArrayIdType *findIdsEqualTuple(const T *tupleBg, const T *tupleEnd) const;
DataArrayIdType *findIdsEqualList(const T *valsBg, const T *valsEnd) const;
DataArrayIdType *findRangeIdForEachTuple(const DataArrayType *ranges) const;
DataArrayType *findIdInRangeForEachTuple(const DataArrayType *ranges) const;
void sortEachPairToMakeALinkedList();
+ void sortToHaveConsecutivePairs();
MCAuto<DataArrayType> fromLinkedListOfPairToList() const;
DataArrayType *getDifferentValues() const;
std::vector<DataArrayIdType *> partitionByDifferentValues(std::vector<T>& differentIds) const;
DataArrayChar *buildEmptySpecializedDAChar() const;
DataArrayAsciiCharIterator *iterator();
DataArrayAsciiChar *deepCopy() const;
- DataArrayAsciiChar *copySorted(bool asc=true) const override { throw INTERP_KERNEL::Exception("DataArrayAsciiChar::copySorted : not implemented for DataArrayByte"); }
+ DataArrayAsciiChar *copySorted(bool asc=true) const override { (void)asc;throw INTERP_KERNEL::Exception("DataArrayAsciiChar::copySorted : not implemented for DataArrayByte"); }
DataArrayAsciiChar *performCopyOrIncrRef(bool deepCopy) const;
DataArrayAsciiChar *buildNewEmptyInstance() const { return DataArrayAsciiChar::New(); }
char asciiCharValue() const;