- MEDCOUPLING_EXPORT DataArrayDoubleTuple(double *pt, int nbOfComp);
- MEDCOUPLING_EXPORT std::string repr() const;
- MEDCOUPLING_EXPORT int getNumberOfCompo() const { return _nb_of_compo; }
- MEDCOUPLING_EXPORT const double *getConstPointer() const { return _pt; }
- MEDCOUPLING_EXPORT double *getPointer() { return _pt; }
- MEDCOUPLING_EXPORT double doubleValue() const;
- MEDCOUPLING_EXPORT DataArrayDouble *buildDADouble(int nbOfTuples, int nbOfCompo) const;
- private:
- double *_pt;
- int _nb_of_compo;
- };
-
- class DataArrayIntIterator;
-
- class DataArrayInt : public DataArrayTemplate<int>
- {
- public:
- MEDCOUPLING_EXPORT static DataArrayInt *New();
- MEDCOUPLING_EXPORT int intValue() const;
- MEDCOUPLING_EXPORT int getHashCode() const;
- MEDCOUPLING_EXPORT DataArrayInt *deepCopy() const;
- MEDCOUPLING_EXPORT DataArrayInt *performCopyOrIncrRef(bool deepCopy) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildNewEmptyInstance() const { return DataArrayInt::New(); }
- MEDCOUPLING_EXPORT bool isEqual(const DataArrayInt& other) const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const DataArrayInt& other, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const DataArrayInt& other) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStrAndOrder(const DataArrayInt& other) const;
- MEDCOUPLING_EXPORT bool isFittingWith(const std::vector<bool>& v) const;
- MEDCOUPLING_EXPORT void switchOnTupleEqualTo(int val, std::vector<bool>& vec) const;
- MEDCOUPLING_EXPORT void switchOnTupleNotEqualTo(int val, std::vector<bool>& vec) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildPermutationArr(const DataArrayInt& other) const;
- MEDCOUPLING_EXPORT DataArrayInt *indicesOfSubPart(const DataArrayInt& partOfThis) const;
- MEDCOUPLING_EXPORT DataArrayInt *sumPerTuple() const;
- MEDCOUPLING_EXPORT void checkMonotonic(bool increasing) const;
- MEDCOUPLING_EXPORT bool isMonotonic(bool increasing) const;
- MEDCOUPLING_EXPORT void checkStrictlyMonotonic(bool increasing) const;
- MEDCOUPLING_EXPORT bool isStrictlyMonotonic(bool increasing) const;
- MEDCOUPLING_EXPORT void fillWithZero();
- MEDCOUPLING_EXPORT void iota(int init=0);
- MEDCOUPLING_EXPORT std::string repr() const;
- MEDCOUPLING_EXPORT std::string reprZip() const;
- MEDCOUPLING_EXPORT std::string reprNotTooLong() const;
- MEDCOUPLING_EXPORT void writeVTK(std::ostream& ofs, int indent, const std::string& type, const std::string& nameInFile, DataArrayByte *byteArr) const;
- MEDCOUPLING_EXPORT void reprStream(std::ostream& stream) const;
- MEDCOUPLING_EXPORT void reprZipStream(std::ostream& stream) const;
- MEDCOUPLING_EXPORT void reprNotTooLongStream(std::ostream& stream) const;
- MEDCOUPLING_EXPORT void reprWithoutNameStream(std::ostream& stream) const;
- MEDCOUPLING_EXPORT void reprZipWithoutNameStream(std::ostream& stream) const;
- MEDCOUPLING_EXPORT void reprNotTooLongWithoutNameStream(std::ostream& stream) const;
- MEDCOUPLING_EXPORT void reprCppStream(const std::string& varName, std::ostream& stream) const;
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
- MEDCOUPLING_EXPORT void reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const;
- MEDCOUPLING_EXPORT void transformWithIndArr(const int *indArrBg, const int *indArrEnd);
- MEDCOUPLING_EXPORT DataArrayInt *transformWithIndArrR(const int *indArrBg, const int *indArrEnd) const;
- MEDCOUPLING_EXPORT void splitByValueRange(const int *arrBg, const int *arrEnd,
- DataArrayInt *& castArr, DataArrayInt *& rankInsideCast, DataArrayInt *& castsPresent) const;
- MEDCOUPLING_EXPORT bool isRange(int& strt, int& sttoopp, int& stteepp) const;
- MEDCOUPLING_EXPORT DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const;
- MEDCOUPLING_EXPORT DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const;
- MEDCOUPLING_EXPORT DataArrayInt *invertArrayO2N2N2OBis(int newNbOfElem) const;
- MEDCOUPLING_EXPORT DataArrayDouble *convertToDblArr() const;
- MEDCOUPLING_EXPORT DataArrayInt *fromNoInterlace() const;
- MEDCOUPLING_EXPORT DataArrayInt *toNoInterlace() const;
- MEDCOUPLING_EXPORT DataArrayInt *selectByTupleId(const int *new2OldBg, const int *new2OldEnd) const { return DataArrayTemplate<int>::mySelectByTupleId(new2OldBg,new2OldEnd); }
- MEDCOUPLING_EXPORT DataArrayInt *selectByTupleId(const DataArrayInt& di) const { return DataArrayTemplate<int>::mySelectByTupleId(di); }
- MEDCOUPLING_EXPORT DataArrayInt *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const { return DataArrayTemplate<int>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
- MEDCOUPLING_EXPORT DataArrayInt *keepSelectedComponents(const std::vector<int>& compoIds) const { return DataArrayTemplate<int>::myKeepSelectedComponents(compoIds); }
- MEDCOUPLING_EXPORT DataArrayInt *selectByTupleIdSafeSlice(int bg, int end, int step) const { return DataArrayTemplate<int>::mySelectByTupleIdSafeSlice(bg,end,step); }
- MEDCOUPLING_EXPORT DataArrayInt *selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const { return DataArrayTemplate<int>::mySelectByTupleRanges(ranges); }
- MEDCOUPLING_EXPORT DataArrayInt *checkAndPreparePermutation() const;
- MEDCOUPLING_EXPORT static DataArrayInt *FindPermutationFromFirstToSecond(const DataArrayInt *ids1, const DataArrayInt *ids2);
- MEDCOUPLING_EXPORT void changeSurjectiveFormat(int targetNb, DataArrayInt *&arr, DataArrayInt *&arrI) const;
- MEDCOUPLING_EXPORT static DataArrayInt *ConvertIndexArrayToO2N(int nbOfOldTuples, const int *arr, const int *arrIBg, const int *arrIEnd, int &newNbOfTuples);
- MEDCOUPLING_EXPORT DataArrayInt *buildPermArrPerLevel() const;
- MEDCOUPLING_EXPORT bool isIota(int sizeExpected) const;
- MEDCOUPLING_EXPORT bool isUniform(int val) const;
- MEDCOUPLING_EXPORT bool hasUniqueValues() const;
- MEDCOUPLING_EXPORT void meldWith(const DataArrayInt *other);
- MEDCOUPLING_EXPORT void setSelectedComponents(const DataArrayInt *a, const std::vector<int>& compoIds);
- MEDCOUPLING_EXPORT void getTuple(int tupleId, int *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); }
- MEDCOUPLING_EXPORT static void SetArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet);
- MEDCOUPLING_EXPORT DataArrayIntIterator *iterator();
- MEDCOUPLING_EXPORT DataArrayInt *findIdsEqual(int val) const;
- MEDCOUPLING_EXPORT DataArrayInt *findIdsNotEqual(int val) const;
- MEDCOUPLING_EXPORT DataArrayInt *findIdsEqualList(const int *valsBg, const int *valsEnd) const;
- MEDCOUPLING_EXPORT DataArrayInt *findIdsNotEqualList(const int *valsBg, const int *valsEnd) const;
- MEDCOUPLING_EXPORT DataArrayInt *findIdsEqualTuple(const int *tupleBg, const int *tupleEnd) const;
- MEDCOUPLING_EXPORT int changeValue(int oldValue, int newValue);
- MEDCOUPLING_EXPORT int findIdFirstEqualTuple(const std::vector<int>& tupl) const;
- MEDCOUPLING_EXPORT int findIdFirstEqual(int value) const;
- MEDCOUPLING_EXPORT int findIdFirstEqual(const std::vector<int>& vals) const;
- MEDCOUPLING_EXPORT int findIdSequence(const std::vector<int>& vals) const;
- MEDCOUPLING_EXPORT bool presenceOfTuple(const std::vector<int>& tupl) const;
- MEDCOUPLING_EXPORT bool presenceOfValue(int value) const;
- MEDCOUPLING_EXPORT bool presenceOfValue(const std::vector<int>& vals) const;
- MEDCOUPLING_EXPORT int count(int value) const;
- MEDCOUPLING_EXPORT void accumulate(int *res) const;
- MEDCOUPLING_EXPORT int accumulate(int compId) const;
- MEDCOUPLING_EXPORT DataArrayInt *accumulatePerChunck(const int *bgOfIndex, const int *endOfIndex) const;
- MEDCOUPLING_EXPORT void getMinMaxValues(int& minValue, int& maxValue) const;
- MEDCOUPLING_EXPORT void abs();
- MEDCOUPLING_EXPORT DataArrayInt *computeAbs() const;
- MEDCOUPLING_EXPORT void applyLin(int a, int b, int compoId);
- MEDCOUPLING_EXPORT void applyLin(int a, int b);
- MEDCOUPLING_EXPORT void applyInv(int numerator);
- MEDCOUPLING_EXPORT DataArrayInt *negate() const;
- MEDCOUPLING_EXPORT void applyDivideBy(int val);
- MEDCOUPLING_EXPORT void applyModulus(int val);
- MEDCOUPLING_EXPORT void applyRModulus(int val);
- MEDCOUPLING_EXPORT void applyPow(int val);
- MEDCOUPLING_EXPORT void applyRPow(int val);
- MEDCOUPLING_EXPORT DataArrayInt *findIdsInRange(int vmin, int vmax) const;
- MEDCOUPLING_EXPORT DataArrayInt *findIdsNotInRange(int vmin, int vmax) const;
- MEDCOUPLING_EXPORT DataArrayInt *findIdsStricltyNegative() const;
- MEDCOUPLING_EXPORT bool checkAllIdsInRange(int vmin, int vmax) const;
- MEDCOUPLING_EXPORT static DataArrayInt *Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2);
- MEDCOUPLING_EXPORT static DataArrayInt *Aggregate(const std::vector<const DataArrayInt *>& arr);
- MEDCOUPLING_EXPORT static DataArrayInt *AggregateIndexes(const std::vector<const DataArrayInt *>& arrs);
- MEDCOUPLING_EXPORT static DataArrayInt *Meld(const DataArrayInt *a1, const DataArrayInt *a2);
- MEDCOUPLING_EXPORT static DataArrayInt *Meld(const std::vector<const DataArrayInt *>& arr);
- MEDCOUPLING_EXPORT static DataArrayInt *MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups);
- MEDCOUPLING_EXPORT static DataArrayInt *BuildUnion(const std::vector<const DataArrayInt *>& arr);
- MEDCOUPLING_EXPORT static DataArrayInt *BuildIntersection(const std::vector<const DataArrayInt *>& arr);
- MEDCOUPLING_EXPORT static DataArrayInt *BuildListOfSwitchedOn(const std::vector<bool>& v);
- MEDCOUPLING_EXPORT static DataArrayInt *BuildListOfSwitchedOff(const std::vector<bool>& v);
- MEDCOUPLING_EXPORT static void PutIntoToSkylineFrmt(const std::vector< std::vector<int> >& v, DataArrayInt *& data, DataArrayInt *& dataIndex);
- MEDCOUPLING_EXPORT DataArrayInt *buildComplement(int nbOfElement) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildSubstraction(const DataArrayInt *other) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildSubstractionOptimized(const DataArrayInt *other) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildUnion(const DataArrayInt *other) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildIntersection(const DataArrayInt *other) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildUnique() const;
- MEDCOUPLING_EXPORT DataArrayInt *buildUniqueNotSorted() const;
- MEDCOUPLING_EXPORT DataArrayInt *deltaShiftIndex() const;
- MEDCOUPLING_EXPORT void computeOffsets();
- MEDCOUPLING_EXPORT void computeOffsetsFull();
- MEDCOUPLING_EXPORT void findIdsRangesInListOfIds(const DataArrayInt *listOfIds, DataArrayInt *& rangeIdsFetched, DataArrayInt *& idsInInputListThatFetch) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildExplicitArrByRanges(const DataArrayInt *offsets) const;
- MEDCOUPLING_EXPORT DataArrayInt *buildExplicitArrOfSliceOnScaledArr(int begin, int stop, int step) const;
- MEDCOUPLING_EXPORT DataArrayInt *findRangeIdForEachTuple(const DataArrayInt *ranges) const;
- MEDCOUPLING_EXPORT DataArrayInt *findIdInRangeForEachTuple(const DataArrayInt *ranges) const;
- MEDCOUPLING_EXPORT void sortEachPairToMakeALinkedList();
- MEDCOUPLING_EXPORT DataArrayInt *duplicateEachTupleNTimes(int nbTimes) const;
- MEDCOUPLING_EXPORT DataArrayInt *getDifferentValues() const;
- MEDCOUPLING_EXPORT std::vector<DataArrayInt *> partitionByDifferentValues(std::vector<int>& differentIds) const;
- MEDCOUPLING_EXPORT std::vector< std::pair<int,int> > splitInBalancedSlices(int nbOfSlices) const;
- template<class InputIterator>
- void insertAtTheEnd(InputIterator first, InputIterator last);
- MEDCOUPLING_EXPORT void aggregate(const DataArrayInt *other);
- MEDCOUPLING_EXPORT void writeOnPlace(std::size_t id, int element0, const int *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); }
- MEDCOUPLING_EXPORT static DataArrayInt *Add(const DataArrayInt *a1, const DataArrayInt *a2);
- MEDCOUPLING_EXPORT void addEqual(const DataArrayInt *other);
- MEDCOUPLING_EXPORT static DataArrayInt *Substract(const DataArrayInt *a1, const DataArrayInt *a2);
- MEDCOUPLING_EXPORT void substractEqual(const DataArrayInt *other);
- MEDCOUPLING_EXPORT static DataArrayInt *Multiply(const DataArrayInt *a1, const DataArrayInt *a2);
- MEDCOUPLING_EXPORT void multiplyEqual(const DataArrayInt *other);
- MEDCOUPLING_EXPORT static DataArrayInt *Divide(const DataArrayInt *a1, const DataArrayInt *a2);
- MEDCOUPLING_EXPORT void divideEqual(const DataArrayInt *other);
- MEDCOUPLING_EXPORT static DataArrayInt *Modulus(const DataArrayInt *a1, const DataArrayInt *a2);
- MEDCOUPLING_EXPORT void modulusEqual(const DataArrayInt *other);
- MEDCOUPLING_EXPORT static DataArrayInt *Pow(const DataArrayInt *a1, const DataArrayInt *a2);
- MEDCOUPLING_EXPORT void powEqual(const DataArrayInt *other);
- MEDCOUPLING_EXPORT void updateTime() const { }
- MEDCOUPLING_EXPORT MemArray<int>& accessToMemArray() { return _mem; }
- MEDCOUPLING_EXPORT const MemArray<int>& accessToMemArray() const { return _mem; }
- public:
- MEDCOUPLING_EXPORT static int *CheckAndPreparePermutation(const int *start, const int *end);
- MEDCOUPLING_EXPORT static DataArrayInt *Range(int begin, int end, int step);
- public:
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
- MEDCOUPLING_EXPORT bool resizeForUnserialization(const std::vector<int>& tinyInfoI);
- MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
- private:
- ~DataArrayInt() { }
- DataArrayInt() { }