-// Copyright (C) 2007-2020 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
bool isEqual(const ARRAY& other) const;
bool isEqualWithoutConsideringStr(const ARRAY& other) const;
bool isEqualWithoutConsideringStrAndOrder(const ARRAY& other) const;
+ DataArrayIdType *occurenceRankInThis() const;
DataArrayIdType *buildPermutationArr(const ARRAY& other) const;
ARRAY *sumPerTuple() const;
void sort(bool asc=true);
static ARRAY *BuildUnion(const std::vector<const ARRAY *>& arr);
static ARRAY *BuildIntersection(const std::vector<const ARRAY *>& arr);
static DataArrayIdType *FindPermutationFromFirstToSecond(const ARRAY *ids1, const ARRAY *ids2);
+ static DataArrayIdType *FindPermutationFromFirstToSecondDuplicate(const ARRAY *ids1, const ARRAY *ids2);
DataArrayIdType *buildComplement(mcIdType nbOfElement) const;
ARRAY *buildSubstraction(const ARRAY *other) const;
ARRAY *buildSubstractionOptimized(const ARRAY *other) const;
ARRAY *buildUnion(const ARRAY *other) const;
ARRAY *buildIntersection(const ARRAY *other) const;
+ DataArrayIdType *indexOfSameConsecutiveValueGroups() const;
ARRAY *buildUnique() const;
ARRAY *buildUniqueNotSorted() const;
ARRAY *deltaShiftIndex() const;
DataArrayIdType *findRangeIdForEachTuple(const ARRAY *ranges) const;
ARRAY *findIdInRangeForEachTuple(const ARRAY *ranges) const;
void sortEachPairToMakeALinkedList();
+ void sortToHaveConsecutivePairs();
ARRAY *duplicateEachTupleNTimes(mcIdType nbTimes) const;
ARRAY *getDifferentValues() const;
static ARRAY *Add(const ARRAY *a1, const ARRAY *a2);
return ret.retn();
}
}
+#if defined(WITH_NUMPY)
else if(MEDCouplingHasNumPyBindings() && PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL)
{//ARRAY.New(numpyArray)
return BuildNewInstance<ARRAY,INT>(elt0,NPYTraits<INT>::NPYObjectType,NPYTraits<INT>::NPYFunc,MEDCoupling::Traits<INT>::NPYStr);
}
+#endif
else
throw INTERP_KERNEL::Exception(msg.c_str());
throw INTERP_KERNEL::Exception(msg.c_str());//to make g++ happy
return pyRet;
}
+ DataArrayIdType *locateComponentId(const ARRAY *valToSearchIntoTuples, const DataArrayIdType *tupleIdHint) const
+ {
+ return self->locateComponentId(valToSearchIntoTuples,tupleIdHint);
+ }
+
PyObject *findIdsRangesInListOfIds(const ARRAY *listOfIds) const
{
DataArrayIdType *ret0=0;
ARRAYDEF( DataArrayInt32, Int32 )
};
%extend DataArrayInt32 {
+ DataArrayInt64 *convertToInt64Arr() const
+ {
+ MCAuto<DataArrayInt64> ret(self->convertToInt64Arr());
+ return ret.retn();
+ }
#ifdef WITH_NUMPY
PyObject *toNumPyArray() // not const. It is not a bug !
{
ARRAYDEF( DataArrayInt64, Int64 )
};
%extend DataArrayInt64 {
+ DataArrayInt32 *convertToInt32Arr() const
+ {
+ MCAuto<DataArrayInt32> ret(self->convertToInt32Arr());
+ return ret.retn();
+ }
#ifdef WITH_NUMPY
PyObject *toNumPyArray() // not const. It is not a bug !
{