

Public Types | |
| using | DataArrayType = typename Traits< T >::ArrayType |
Public Types inherited from MEDCoupling::DataArrayTemplate< T > | |
| typedef T | Type |
Public Member Functions | |
| T | accumulate (std::size_t compId) const |
| void | accumulate (T *res) const |
| DataArrayType * | accumulatePerChunck (const mcIdType *bgOfIndex, const mcIdType *endOfIndex) const |
| void | applyDivideBy (T val) |
| void | applyInv (T numerator) |
| void | applyModulus (T val) |
| void | applyPow (T val) |
| void | applyRModulus (T val) |
| void | applyRPow (T val) |
| DataArrayIdType * | buildComplement (mcIdType nbOfElement) const |
| DataArrayType * | buildExplicitArrByRanges (const DataArrayType *offsets) const |
| DataArrayType * | buildExplicitArrOfSliceOnScaledArr (T begin, T stop, T step) const |
| DataArrayType * | buildIntersection (const DataArrayType *other) const |
| DataArrayIdType * | buildPermArrPerLevel () const |
| DataArrayIdType * | buildPermutationArr (const DataArrayDiscrete< T > &other) const |
| DataArrayType * | buildSubstraction (const DataArrayType *other) const |
| DataArrayType * | buildSubstractionOptimized (const DataArrayType *other) const |
| DataArrayType * | buildUnion (const DataArrayType *other) const |
| DataArrayType * | buildUnique () const |
| DataArrayType * | buildUniqueNotSorted () const |
| void | changeSurjectiveFormat (T targetNb, DataArrayIdType *&arr, DataArrayIdType *&arrI) const |
| mcIdType | changeValue (T oldValue, T newValue) |
| bool | checkAllIdsInRange (T vmin, T vmax) const |
| DataArrayIdType * | checkAndPreparePermutation () const |
| void | checkMonotonic (bool increasing) const |
| void | checkStrictlyMonotonic (bool increasing) const |
| T | checkUniformAndGuess () const |
| void | computeOffsets () |
| void | computeOffsetsFull () |
| mcIdType | count (T value) const |
| DataArrayType * | deltaShiftIndex () const |
| void | findCommonTuples (mcIdType limitTupleId, MCAuto< DataArrayIdType > &comm, MCAuto< DataArrayIdType > &commIndex) const |
| template<int SPACEDIM> | |
| void | findCommonTuplesAlg (const T *bbox, mcIdType nbNodes, mcIdType limitNodeId, DataArrayIdType *c, DataArrayIdType *cI) const |
| mcIdType | findIdFirstEqual (const std::vector< T > &vals) const |
| mcIdType | findIdFirstEqual (T value) const |
| mcIdType | findIdFirstEqualTuple (const std::vector< T > &tupl) const |
| MCAuto< DataArrayIdType > | findIdForEach (const T *valsBg, const T *valsEnd) const |
| DataArrayType * | findIdInRangeForEachTuple (const DataArrayType *ranges) const |
| DataArrayIdType * | findIdsEqual (T val) const |
| DataArrayIdType * | findIdsEqualList (const T *valsBg, const T *valsEnd) const |
| DataArrayIdType * | findIdsEqualTuple (const T *tupleBg, const T *tupleEnd) const |
| mcIdType | findIdSequence (const std::vector< T > &vals) const |
| DataArrayIdType * | findIdsInRange (T vmin, T vmax) const |
| DataArrayIdType * | findIdsNotEqual (T val) const |
| DataArrayIdType * | findIdsNotEqualList (const T *valsBg, const T *valsEnd) const |
| DataArrayIdType * | findIdsNotInRange (T vmin, T vmax) const |
| void | findIdsRangesInListOfIds (const DataArrayType *listOfIds, DataArrayIdType *&rangeIdsFetched, DataArrayType *&idsInInputListThatFetch) const |
| DataArrayIdType * | findRangeIdForEachTuple (const DataArrayType *ranges) const |
| void | finishUnserialization (const std::vector< mcIdType > &tinyInfoI, const std::vector< std::string > &tinyInfoS) |
| MCAuto< DataArrayType > | forThisAsPartitionBuildReduction (const MCAuto< DataArrayIdType > &commonEntities, const MCAuto< DataArrayIdType > &commonEntitiesIndex, MCAuto< DataArrayType > &partitionsToBeModified, MCAuto< DataArrayIdType > &partitionsToBeModifiedIndex) const |
| MCAuto< DataArrayType > | fromLinkedListOfPairToList () const |
| void | fromListOfPairsToIndexArray (MCAuto< DataArrayType > &arrOut, MCAuto< DataArrayIdType > &arrIndexOut) const |
| DataArrayType * | getDifferentValues () const |
| mcIdType | getHashCode () const |
| void | getMinMaxValues (T &minValue, T &maxValue) const |
| void | getTinySerializationIntInformation (std::vector< mcIdType > &tinyInfo) const |
| void | getTinySerializationStrInformation (std::vector< std::string > &tinyInfo) const |
| MCAuto< MapKeyVal< mcIdType, T > > | giveN2OOptimized () const |
| bool | hasUniqueValues () const |
| DataArrayIdType * | indexOfSameConsecutiveValueGroups () const |
| DataArrayIdType * | indicesOfSubPart (const DataArrayDiscrete< T > &partOfThis) const |
| T | intValue () const |
| DataArrayIdType * | invertArrayN2O2O2N (mcIdType oldNbOfElem) const |
| MCAuto< MapKeyVal< T, mcIdType > > | invertArrayN2O2O2NOptimized () const |
| DataArrayIdType * | invertArrayO2N2N2O (mcIdType newNbOfElem) const |
| DataArrayIdType * | invertArrayO2N2N2OBis (mcIdType newNbOfElem) const |
| bool | isEqual (const DataArrayDiscrete< T > &other) const |
| bool | isEqualIfNotWhy (const DataArrayDiscrete< T > &other, std::string &reason) const |
| bool | isEqualWithoutConsideringStr (const DataArrayDiscrete< T > &other) const |
| bool | isEqualWithoutConsideringStrAndOrder (const typename Traits< T >::ArrayType &other) const |
| bool | isIota (mcIdType sizeExpected) const |
| bool | isMonotonic (bool increasing) const |
| bool | isRange (T &strt, T &sttoopp, T &stteepp) const |
| bool | isStrictlyMonotonic (bool increasing) const |
| bool | isUniform (T val) const |
| DataArrayIdType * | locateComponentId (const DataArrayType *valToSearchIntoTuples, const DataArrayIdType *tupleIdHint) const |
| void | modulusEqual (const DataArrayType *other) |
| DataArrayIdType * | occurenceRankInThis () const |
| std::vector< DataArrayIdType * > | partitionByDifferentValues (std::vector< T > &differentIds) const |
| void | powEqual (const DataArrayType *other) |
| bool | presenceOfTuple (const std::vector< T > &tupl) const |
| bool | presenceOfValue (const std::vector< T > &vals) const |
| bool | presenceOfValue (T value) const |
| void | reprCppStream (const std::string &varName, std::ostream &stream) const |
| void | reprQuickOverview (std::ostream &stream) const |
| void | reprQuickOverviewData (std::ostream &stream, std::size_t maxNbOfByteInRepr) const |
| bool | resizeForUnserialization (const std::vector< mcIdType > &tinyInfoI) |
| void | setSelectedComponents (const DataArrayType *a, const std::vector< std::size_t > &compoIds) |
| void | sortEachPairToMakeALinkedList () |
| void | sortToHaveConsecutivePairs () |
| void | splitByValueRange (const T *arrBg, const T *arrEnd, DataArrayType *&castArr, DataArrayType *&rankInsideCast, DataArrayType *&castsPresent) const |
| std::vector< std::pair< mcIdType, mcIdType > > | splitInBalancedSlices (mcIdType nbOfSlices) const |
| void | switchOnTupleEqualTo (T val, std::vector< bool > &vec) const |
| void | switchOnTupleNotEqualTo (T val, std::vector< bool > &vec) const |
| void | transformWithIndArr (const MapKeyVal< T, T > &m) |
| void | transformWithIndArr (const T *indArrBg, const T *indArrEnd) |
| DataArrayIdType * | transformWithIndArrR (const T *indArr2Bg, const T *indArrEnd) const |
| void | writeVTK (std::ostream &ofs, mcIdType indent, const std::string &type, const std::string &nameInFile, DataArrayByte *byteArr) const |
Public Member Functions inherited from MEDCoupling::DataArrayTemplateClassic< T > | |
| void | abs () |
| void | addEqual (const typename Traits< T >::ArrayType *other) |
| void | aggregate (const typename Traits< T >::ArrayType *other) |
| void | applyLin (T a, T b) |
| void | applyLin (T a, T b, std::size_t compoId) |
| Traits< T >::ArrayType * | computeAbs () const |
| MCAuto< DataArrayDouble > | convertToDblArr () const |
| MCAuto< DataArrayFloat > | convertToFloatArr () const |
| MCAuto< DataArrayInt64 > | convertToInt64Arr () const |
| MCAuto< DataArrayInt > | convertToIntArr () const |
| template<class U > | |
| MCAuto< typename Traits< U >::ArrayType > | convertToOtherTypeOfArr () const |
| void | divideEqual (const typename Traits< T >::ArrayType *other) |
| Traits< T >::ArrayType * | duplicateEachTupleNTimes (mcIdType nbTimes) const |
| MCAuto< typename Traits< T >::ArrayType > | duplicateNTimes (mcIdType nbTimes) const |
| MCAuto< DataArrayIdType > | findIdsGreaterOrEqualTo (T val) const |
| MCAuto< DataArrayIdType > | findIdsGreaterThan (T val) const |
| MCAuto< DataArrayIdType > | findIdsLowerOrEqualTo (T val) const |
| MCAuto< DataArrayIdType > | findIdsLowerThan (T val) const |
| DataArrayIdType * | findIdsStrictlyNegative () const |
| Traits< T >::ArrayType * | fromNoInterlace () const |
| void | iota (T init=(T) 0) |
| void | meldWith (const typename Traits< T >::ArrayType *other) |
| void | multiplyEqual (const typename Traits< T >::ArrayType *other) |
| Traits< T >::ArrayType * | negate () const |
| Traits< T >::ArrayType * | performCopyOrIncrRef (bool dCpy) const |
| std::string | repr () const |
| std::string | reprNotTooLong () const |
| void | reprNotTooLongStream (std::ostream &stream) const |
| void | reprNotTooLongWithoutNameStream (std::ostream &stream) const |
| void | reprStream (std::ostream &stream) const |
| void | reprWithoutNameStream (std::ostream &stream) const |
| std::string | reprZip () const |
| void | reprZipStream (std::ostream &stream) const |
| void | reprZipWithoutNameStream (std::ostream &stream) const |
| void | substractEqual (const typename Traits< T >::ArrayType *other) |
| Traits< T >::ArrayType * | sumPerTuple () const |
| Traits< T >::ArrayType * | toNoInterlace () const |
Public Member Functions inherited from MEDCoupling::DataArrayTemplate< T > | |
| MemArray< T > & | accessToMemArray () |
| const MemArray< T > & | accessToMemArray () const |
| void | alloc (std::size_t nbOfTuple, std::size_t nbOfCompo=1) |
| void | allocIfNecessary (std::size_t nbOfTuple, std::size_t nbOfCompo) |
| T | back () const |
| const T * | begin () const |
| Traits< T >::ArrayType * | changeNbOfComponents (std::size_t newNbOfComp, T dftValue) const |
| void | checkAllocated () const |
| void | circularPermutation (mcIdType nbOfShift=1) |
| void | circularPermutationPerTuple (mcIdType nbOfShift=1) |
| void | deepCopyFrom (const DataArrayTemplate< T > &other) |
| void | desallocate () |
| bool | empty () const |
| const T * | end () const |
| std::vector< MCAuto< typename Traits< T >::ArrayTypeCh > > | explodeComponents () const |
| void | fillWithValue (T val) |
| void | fillWithZero () |
| T | front () const |
| const T * | getConstPointer () const |
| std::size_t | getHeapMemorySizeWithoutChildren () const |
| T | getIJ (std::size_t tupleId, std::size_t compoId) const |
| T | getIJSafe (std::size_t tupleId, std::size_t compoId) const |
| T | getMaxAbsValue (std::size_t &tupleId) const |
| T | getMaxAbsValueInArray () const |
| T | getMaxValue (mcIdType &tupleId) const |
| T | getMaxValueInArray () const |
| T | getMinValue (mcIdType &tupleId) const |
| T | getMinValueInArray () const |
| std::size_t | getNbOfElemAllocated () const |
| mcIdType | getNbOfElems () const |
| mcIdType | getNumberOfTuples () const |
| T * | getPointer () |
| T * | getPointerSilent () |
| void | getTuple (mcIdType tupleId, T *res) const |
| void * | getVoidStarPointer () |
| template<class InputIterator > | |
| void | insertAtTheEnd (InputIterator first, InputIterator last) |
| bool | isAllocated () const override |
| void | pack () const |
| T | popBackSilent () |
| void | printForDebug (std::ostream &oss) const |
| void | pushBackSilent (T val) |
| template<class InputIterator > | |
| void | pushBackValsSilent (InputIterator valsBg, InputIterator valsEnd) |
| void | reAlloc (std::size_t newNbOfTuple) |
| void | rearrange (std::size_t newNbOfCompo) |
| Traits< T >::ArrayType * | renumber (const mcIdType *old2New) const |
| Traits< T >::ArrayType * | renumberAndReduce (const mcIdType *old2New, mcIdType newNbOfTuple) const |
| void | renumberInPlace (const mcIdType *old2New) |
| void | renumberInPlaceR (const mcIdType *new2Old) |
| Traits< T >::ArrayType * | renumberR (const mcIdType *new2Old) const |
| void | reserve (std::size_t nbOfElems) |
| void | reverse () |
| void | reversePerTuple () |
| T * | rwBegin () |
| T * | rwEnd () |
| MCAuto< typename Traits< T >::ArrayTypeCh > | selectPartDef (const PartDefinition *pd) const |
| void | setContigPartOfSelectedValues (mcIdType tupleIdStart, const DataArray *aBase, const DataArrayIdType *tuplesSelec) |
| void | setContigPartOfSelectedValuesSlice (mcIdType tupleIdStart, const DataArray *aBase, mcIdType bg, mcIdType end2, mcIdType step) |
| void | setIJ (std::size_t tupleId, std::size_t compoId, T newVal) |
| void | setIJSilent (std::size_t tupleId, std::size_t compoId, T newVal) |
| void | setPartOfValues1 (const typename Traits< T >::ArrayType *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true) |
| void | setPartOfValues2 (const typename Traits< T >::ArrayType *a, const mcIdType *bgTuples, const mcIdType *endTuples, const mcIdType *bgComp, const mcIdType *endComp, bool strictCompoCompare=true) |
| void | setPartOfValues3 (const typename Traits< T >::ArrayType *a, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true) |
| void | setPartOfValues4 (const typename Traits< T >::ArrayType *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, const mcIdType *bgComp, const mcIdType *endComp, bool strictCompoCompare=true) |
| void | setPartOfValuesAdv (const typename Traits< T >::ArrayType *a, const DataArrayIdType *tuplesSelec) |
| void | setPartOfValuesSimple1 (T a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp) |
| void | setPartOfValuesSimple2 (T a, const mcIdType *bgTuples, const mcIdType *endTuples, const mcIdType *bgComp, const mcIdType *endComp) |
| void | setPartOfValuesSimple3 (T a, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp) |
| void | setPartOfValuesSimple4 (T a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, const mcIdType *bgComp, const mcIdType *endComp) |
| void | sort (bool asc=true) |
| void | sortPerTuple (bool asc) |
| Traits< T >::ArrayType * | subArray (mcIdType tupleIdBg, mcIdType tupleIdEnd=-1) const |
| void | transpose () |
| void | updateTime () const |
| void | useArray (const T *array, bool ownership, DeallocType type, std::size_t nbOfTuple, std::size_t nbOfCompo) |
| void | useExternalArrayWithRWAccess (const T *array, std::size_t nbOfTuple, std::size_t nbOfCompo) |
| void | writeForDbg (const std::string &fileName) const |
| void | writeOnPlace (std::size_t id, T element0, const T *others, mcIdType sizeOfOthers) |
Public Member Functions inherited from MEDCoupling::DataArray | |
| bool | areInfoEquals (const DataArray &other) const |
| bool | areInfoEqualsIfNotWhy (const DataArray &other, std::string &reason) const |
| virtual DataArray * | buildNewEmptyInstance () const =0 |
| void | checkNbOfComps (std::size_t nbOfCompo, const std::string &msg) const |
| void | checkNbOfElems (mcIdType nbOfElems, const std::string &msg) const |
| void | checkNbOfTuples (mcIdType nbOfTuples, const std::string &msg) const |
| void | checkNbOfTuplesAndComp (const DataArray &other, const std::string &msg) const |
| void | checkNbOfTuplesAndComp (mcIdType nbOfTuples, std::size_t nbOfCompo, const std::string &msg) const |
| void | copyPartOfStringInfoFrom (const DataArray &other, const std::vector< std::size_t > &compoIds) |
| void | copyPartOfStringInfoFrom2 (const std::vector< std::size_t > &compoIds, const DataArray &other) |
| virtual DataArray * | copySorted (bool asc=true) const =0 |
| void | copyStringInfoFrom (const DataArray &other) |
| std::string | cppRepr (const std::string &varName) const |
| virtual DataArray * | deepCopy () const =0 |
| std::vector< const BigMemoryObject * > | getDirectChildrenWithNull () const |
| std::string | getInfoOnComponent (std::size_t i) const |
| std::vector< std::string > & | getInfoOnComponents () |
| const std::vector< std::string > & | getInfoOnComponents () const |
| std::string | getName () const |
| std::size_t | getNumberOfComponents () const |
| std::string | getUnitOnComponent (std::size_t i) const |
| std::vector< std::string > | getUnitsOnComponent () const |
| std::string | getVarOnComponent (std::size_t i) const |
| std::vector< std::string > | getVarsOnComponent () const |
| virtual DataArray * | keepSelectedComponents (const std::vector< std::size_t > &compoIds) const =0 |
| virtual DataArray * | selectByTupleId (const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const =0 |
| virtual DataArray * | selectByTupleIdSafe (const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const =0 |
| virtual DataArray * | selectByTupleIdSafeSlice (mcIdType bg, mcIdType end2, mcIdType step) const =0 |
| virtual DataArray * | selectByTupleRanges (const std::vector< std::pair< mcIdType, mcIdType > > &ranges) const =0 |
| void | setInfoAndChangeNbOfCompo (const std::vector< std::string > &info) |
| void | setInfoOnComponent (std::size_t i, const std::string &info) |
| void | setInfoOnComponents (const std::vector< std::string > &info) |
| void | setName (const std::string &name) |
| void | setPartOfValuesBase3 (const DataArray *aBase, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true) |
Public Member Functions inherited from MEDCoupling::RefCountObjectOnly | |
| bool | decrRef () const |
| int | getRCValue () const |
| void | incrRef () const |
| RefCountObjectOnly & | operator= (const RefCountObjectOnly &other) |
Public Member Functions inherited from MEDCoupling::BigMemoryObject | |
| std::string | debugHeapMemorySize () const |
| std::vector< const BigMemoryObject * > | getAllTheProgeny () const |
| virtual std::string | getClassName () const |
| std::vector< const BigMemoryObject * > | getDirectChildren () const |
| std::size_t | getHeapMemorySize () const |
| std::string | getHeapMemorySizeStr () const |
| bool | isObjectInTheProgeny (const BigMemoryObject *obj) const |
| virtual | ~BigMemoryObject () |
Public Member Functions inherited from MEDCoupling::TimeLabel | |
| void | declareAsNew () const |
| std::size_t | getTimeOfThis () const |
| TimeLabel & | operator= (const TimeLabel &other) |
| TimeLabel (const TimeLabel &other)=default | |
Static Public Member Functions | |
| static DataArrayType * | Aggregate (const DataArrayType *a1, const DataArrayType *a2, T offsetA2) |
| static DataArrayType * | Aggregate (const std::vector< const DataArrayType * > &arr) |
| static DataArrayType * | AggregateIndexes (const std::vector< const DataArrayType * > &arrs) |
| static DataArrayType * | BuildIntersection (const std::vector< const DataArrayType * > &arr) |
| static DataArrayType * | BuildListOfSwitchedOff (const std::vector< bool > &v) |
| static DataArrayType * | BuildListOfSwitchedOn (const std::vector< bool > &v) |
| static DataArrayType * | BuildUnion (const std::vector< const DataArrayType * > &arr) |
| static mcIdType * | CheckAndPreparePermutation (const T *start, const T *end) |
| static DataArrayIdType * | ConvertIndexArrayToO2N (mcIdType nbOfOldTuples, const mcIdType *arr, const mcIdType *arrIBg, const mcIdType *arrIEnd, mcIdType &newNbOfTuples) |
| static void | ExtractFromIndexedArrays (const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd, const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn, DataArrayType *&arrOut, DataArrayIdType *&arrIndexOut) |
| static void | ExtractFromIndexedArraysSlice (mcIdType idsOfSelectStart, mcIdType idsOfSelectStop, mcIdType idsOfSelectStep, const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn, DataArrayType *&arrOut, DataArrayIdType *&arrIndexOut) |
| static DataArrayIdType * | FindPermutationFromFirstToSecond (const DataArrayType *ids1, const DataArrayType *ids2) |
| static DataArrayIdType * | FindPermutationFromFirstToSecondDuplicate (const DataArrayType *ids1, const DataArrayType *ids2) |
| static void | FromVTK93To94FacesInternaReprOfPolyedra (const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn, MCAuto< DataArrayType > &arrOut, MCAuto< DataArrayIdType > &arrIndexOut) |
| static void | FromVTK94InternalReprOfPolyedra (const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn, const DataArrayIdType *arrIndxIn2, MCAuto< DataArrayType > &arrOut, MCAuto< DataArrayIdType > &arrIndexOut) |
| static void | FromVTKInternalReprOfPolyedra (const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn, MCAuto< DataArrayType > &arrOut, MCAuto< DataArrayIdType > &arrIndexOut) |
| static DataArrayIdType * | MakePartition (const std::vector< const DataArrayType * > &groups, mcIdType newNb, std::vector< std::vector< mcIdType > > &fidsOfGroups) |
| static DataArrayType * | Modulus (const DataArrayType *a1, const DataArrayType *a2) |
| static DataArrayType * | New () |
| static DataArrayType * | Pow (const DataArrayType *a1, const DataArrayType *a2) |
| static void | PutIntoToSkylineFrmt (const std::vector< std::vector< T > > &v, DataArrayType *&data, DataArrayIdType *&dataIndex) |
| static DataArrayType * | Range (T begin, T end, T step) |
| static bool | RemoveIdsFromIndexedArrays (const T *idsToRemoveBg, const T *idsToRemoveEnd, DataArrayType *arr, DataArrayIdType *arrIndx, mcIdType offsetForRemoval=0) |
| static void | SetPartOfIndexedArrays (const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd, const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn, const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex, DataArrayType *&arrOut, DataArrayIdType *&arrIndexOut) |
| static void | SetPartOfIndexedArraysSameIdx (const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd, DataArrayType *arrInOut, const DataArrayIdType *arrIndxIn, const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex) |
| static void | SetPartOfIndexedArraysSameIdxSlice (mcIdType start, mcIdType end, mcIdType step, DataArrayType *arrInOut, const DataArrayIdType *arrIndxIn, const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex) |
| static void | SetPartOfIndexedArraysSlice (mcIdType start, mcIdType end, mcIdType step, const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn, const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex, DataArrayType *&arrOut, DataArrayIdType *&arrIndexOut) |
Static Public Member Functions inherited from MEDCoupling::DataArrayTemplateClassic< T > | |
| static Traits< T >::ArrayType * | Add (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2) |
| static Traits< T >::ArrayType * | Divide (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2) |
| static Traits< T >::ArrayType * | Meld (const std::vector< const typename Traits< T >::ArrayType * > &arr) |
| static Traits< T >::ArrayType * | Meld (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2) |
| static Traits< T >::ArrayType * | Multiply (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2) |
| static Traits< T >::ArrayType * | Substract (const typename Traits< T >::ArrayType *a1, const typename Traits< T >::ArrayType *a2) |
Static Public Member Functions inherited from MEDCoupling::DataArrayTemplate< T > | |
| static MCAuto< typename Traits< T >::ArrayTypeCh > | LoadForDbg (const std::string &fileName) |
| static MCAuto< typename Traits< T >::ArrayTypeCh > | NewFromArray (const T *arrBegin, const T *arrEnd) |
| static MCAuto< typename Traits< T >::ArrayTypeCh > | NewFromStdVector (const typename std::vector< T > &v) |
| static void | SetArrayIn (typename Traits< T >::ArrayType *newArray, typename Traits< T >::ArrayType *&arrayToSet) |
Static Public Member Functions inherited from MEDCoupling::DataArray | |
| static DataArray * | Aggregate (const std::vector< const DataArray * > &arrs) |
| static std::string | BuildInfoFromVarAndUnit (const std::string &var, const std::string &unit) |
| static std::string | GetAxisTypeRepr (MEDCouplingAxisType at) |
| static mcIdType | GetNumberOfItemGivenBES (mcIdType begin, mcIdType end, mcIdType step, const std::string &msg) |
| static mcIdType | GetNumberOfItemGivenBESRelative (mcIdType begin, mcIdType end, mcIdType step, const std::string &msg) |
| static mcIdType | GetPosOfItemGivenBESRelativeNoThrow (mcIdType value, mcIdType begin, mcIdType end, mcIdType step) |
| static void | GetSlice (mcIdType start, mcIdType stop, mcIdType step, mcIdType sliceId, mcIdType nbOfSlices, mcIdType &startSlice, mcIdType &stopSlice) |
| static std::string | GetUnitFromInfo (const std::string &info) |
| static std::string | GetVarNameFromInfo (const std::string &info) |
| static std::vector< std::string > | SplitStringInChuncks (const std::string st, std::size_t sz) |
Static Public Member Functions inherited from MEDCoupling::BigMemoryObject | |
| static std::size_t | GetHeapMemorySizeOfObjs (const std::vector< const BigMemoryObject * > &objs) |
Protected Member Functions | |
| template<class ALG > | |
| void | switchOnTupleAlg (T val, std::vector< bool > &vec, ALG algo) const |
| ~DataArrayDiscrete () | |
Protected Member Functions inherited from MEDCoupling::DataArrayTemplateClassic< T > | |
| template<class OP > | |
| MCAuto< DataArrayIdType > | findIdsAdv (const OP &op) const |
Protected Member Functions inherited from MEDCoupling::DataArrayTemplate< T > | |
| Traits< T >::ArrayTypeCh * | copySortedImpl (bool asc) const |
| Traits< T >::ArrayType * | myKeepSelectedComponents (const std::vector< std::size_t > &compoIds) const |
| Traits< T >::ArrayType * | mySelectByTupleId (const DataArrayIdType &di) const |
| Traits< T >::ArrayType * | mySelectByTupleId (const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const |
| Traits< T >::ArrayType * | mySelectByTupleIdSafe (const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const |
| Traits< T >::ArrayType * | mySelectByTupleIdSafeSlice (mcIdType bg, mcIdType end2, mcIdType step) const |
| Traits< T >::ArrayType * | mySelectByTupleRanges (const std::vector< std::pair< mcIdType, mcIdType > > &ranges) const |
Protected Member Functions inherited from MEDCoupling::DataArray | |
| DataArray () | |
| ~DataArray () | |
Protected Member Functions inherited from MEDCoupling::RefCountObject | |
| RefCountObject () | |
| RefCountObject (const RefCountObject &other) | |
| virtual | ~RefCountObject () |
Protected Member Functions inherited from MEDCoupling::RefCountObjectOnly | |
| RefCountObjectOnly () | |
| RefCountObjectOnly (const RefCountObjectOnly &other) | |
| virtual | ~RefCountObjectOnly () |
Protected Member Functions inherited from MEDCoupling::TimeLabel | |
| void | forceTimeOfThis (const TimeLabel &other) const |
| TimeLabel () | |
| void | updateTimeWith (const TimeLabel &other) const |
| virtual | ~TimeLabel () |
Additional Inherited Members | |
Static Protected Member Functions inherited from MEDCoupling::DataArrayTemplateClassic< T > | |
| static Traits< T >::ArrayType * | PerformCopyOrIncrRef (bool dCpy, const typename Traits< T >::ArrayType &self) |
Static Protected Member Functions inherited from MEDCoupling::DataArray | |
| static void | CheckClosingParInRange (mcIdType ref, mcIdType value, const std::string &msg) |
| static void | CheckValueInRange (mcIdType ref, mcIdType value, const std::string &msg) |
| static void | CheckValueInRangeEx (mcIdType value, mcIdType start, mcIdType end, const std::string &msg) |
| static mcIdType | EffectiveCircPerm (mcIdType nbOfShift, mcIdType nbOfTuples) |
Protected Attributes inherited from MEDCoupling::DataArrayTemplate< T > | |
| MemArray< T > | _mem |
Protected Attributes inherited from MEDCoupling::DataArray | |
| std::vector< std::string > | _info_on_compo |
| std::string | _name |
| using MEDCoupling::DataArrayDiscrete< T >::DataArrayType = typename Traits<T>::ArrayType |
|
protected |
|
static |
Returns a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Referenced by MEDCoupling::DataArrayInt32::buildNewEmptyInstance(), MEDCoupling::DataArrayInt64::buildNewEmptyInstance(), MEDCoupling::DataArrayInt64::convertToInt32Arr(), and MEDCoupling::DataArrayInt32::convertToInt64Arr().
| T MEDCoupling::DataArrayDiscrete< T >::intValue |
Returns the only one value in this, if and only if number of elements (nb of tuples * nb of components) is equal to 1, and that this is allocated.
| If | at least one of conditions stated above is not fulfilled. |
| bool MEDCoupling::DataArrayDiscrete< T >::isEqual | ( | const DataArrayDiscrete< T > & | other | ) | const |
Checks if this and another DataArrayInt are fully equal. For more info see Compare DataArrays.
| [in] | other | - an instance of DataArrayInt to compare with this one. |
| bool MEDCoupling::DataArrayDiscrete< T >::isEqualIfNotWhy | ( | const DataArrayDiscrete< T > & | other, |
| std::string & | reason | ||
| ) | const |
Equivalent to DataArrayInt::isEqual except that if false the reason of mismatch is given.
| [in] | other | the instance to be compared with this |
| [out] | reason | In case of inequality returns the reason. |
References MEDCoupling::DataArrayTemplate< T >::_mem.
| bool MEDCoupling::DataArrayDiscrete< T >::isEqualWithoutConsideringStr | ( | const DataArrayDiscrete< T > & | other | ) | const |
Checks if values of this and another DataArrayInt are equal. For more info see Compare DataArrays.
| [in] | other | - an instance of DataArrayInt to compare with this one. |
References MEDCoupling::DataArrayTemplate< T >::_mem.
| bool MEDCoupling::DataArrayDiscrete< T >::isEqualWithoutConsideringStrAndOrder | ( | const typename Traits< T >::ArrayType & | other | ) | const |
Checks if values of this and another DataArrayInt are equal. Comparison is performed on sorted value sequences. For more info seeCompare DataArrays.
| [in] | other | - an instance of DataArrayInt to compare with this one. |
| void MEDCoupling::DataArrayDiscrete< T >::switchOnTupleEqualTo | ( | T | val, |
| std::vector< bool > & | vec | ||
| ) | const |
This method assumes that this has one component and is allocated. This method scans all tuples in this and for all tuple equal to val put True to the corresponding entry in vec. vec is expected to be with the same size than the number of tuples of this.
| void MEDCoupling::DataArrayDiscrete< T >::switchOnTupleNotEqualTo | ( | T | val, |
| std::vector< bool > & | vec | ||
| ) | const |
This method assumes that this has one component and is allocated. This method scans all tuples in this and for all tuple different from val put True to the corresponding entry in vec. vec is expected to be with the same size than the number of tuples of this.
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::occurenceRankInThis |
Compute for each element in this the occurence rank of that element. This method is typically useful of one-component array having a same element appearing several times. If each element in this appears once an 1 component array containing only 0 will be returned.
Example:
| If | either this not allocated or not with one component. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::buildPermutationArr | ( | const DataArrayDiscrete< T > & | other | ) | const |
Creates a new one-dimensional DataArrayInt of the same size as this and a given one-dimensional arrays that must be of the same length. The result array describes correspondence between this and other arrays, so that other.getIJ(i,0) == this->getIJ(ret->getIJ(i),0). If such a permutation is not possible because some element in other is not in this, an exception is thrown.
| [in] | other | - an array to compute permutation to. |
| If | this->getNumberOfComponents() != 1. |
| If | other->getNumberOfComponents() != 1. |
| If | this->getNumberOfTuples() != other->getNumberOfTuples(). |
| If | other includes a value which is not in this array. |
References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::indicesOfSubPart | ( | const DataArrayDiscrete< T > & | partOfThis | ) | const |
Elements of partOfThis are expected to be included in this. The returned array ret is so that this[ret]==partOfThis
For example, if this array contents are [9,10,0,6,4,11,3,8] and if partOfThis contains [6,0,11,8] the return array will contain [3,2,5,7].
this is expected to be a 1 compo allocated array.
| [in] | partOfThis | - A 1 compo allocated array |
| if | two same element is present twice in this |
| if | an element in partOfThis is NOT in this. |
References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().
| void MEDCoupling::DataArrayDiscrete< T >::checkMonotonic | ( | bool | increasing | ) | const |
Checks that this array is consistently increasing or decreasing in value. If not an exception is thrown.
| [in] | increasing | - if true, the array values should be increasing. |
| If | sequence of values is not strictly monotonic in agreement with increasing arg. |
| If | this->getNumberOfComponents() != 1. |
| If | this is not allocated. |
| bool MEDCoupling::DataArrayDiscrete< T >::isMonotonic | ( | bool | increasing | ) | const |
Checks that this array is consistently increasing or decreasing in value.
| [in] | increasing | - if true, array values should be increasing. |
| If | this->getNumberOfComponents() != 1. |
| If | this is not allocated. |
| void MEDCoupling::DataArrayDiscrete< T >::checkStrictlyMonotonic | ( | bool | increasing | ) | const |
This method check that array consistently INCREASING or DECREASING in value.
| bool MEDCoupling::DataArrayDiscrete< T >::isStrictlyMonotonic | ( | bool | increasing | ) | const |
This method check that array consistently INCREASING or DECREASING in value.
| mcIdType MEDCoupling::DataArrayDiscrete< T >::getHashCode |
Returns an integer value characterizing this array, which is useful for a quick comparison of many instances of DataArrayInt.
| If | this is not allocated. |
|
virtual |
Implements MEDCoupling::DataArray.
|
virtual |
Method that gives a quick overvien of this for python.
Implements MEDCoupling::DataArray.
|
virtual |
Implements MEDCoupling::DataArray.
| void MEDCoupling::DataArrayDiscrete< T >::writeVTK | ( | std::ostream & | ofs, |
| mcIdType | indent, | ||
| const std::string & | type, | ||
| const std::string & | nameInFile, | ||
| DataArrayByte * | byteArr | ||
| ) | const |
| void MEDCoupling::DataArrayDiscrete< T >::transformWithIndArr | ( | const T * | indArrBg, |
| const T * | indArrEnd | ||
| ) |
Modifies in place this one-dimensional array so that each value v = indArrBg[ v ], i.e. a current value is used as in index to get a new value from indArrBg.
| [in] | indArrBg | - pointer to the first element of array of new values to assign to this array. |
| [in] | indArrEnd | - specifies the end of the array indArrBg, so that the last value of indArrBg is indArrEnd[ -1 ]. |
| If | this->getNumberOfComponents() != 1 |
| If | any value of this can't be used as a valid index for [indArrBg, indArrEnd). |
| void MEDCoupling::DataArrayDiscrete< T >::transformWithIndArr | ( | const MapKeyVal< T, T > & | m | ) |
| void MEDCoupling::DataArrayDiscrete< T >::findCommonTuples | ( | mcIdType | limitTupleId, |
| MCAuto< DataArrayIdType > & | comm, | ||
| MCAuto< DataArrayIdType > & | commIndex | ||
| ) | const |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::findIdsEqual | ( | T | val | ) | const |
Creates a new DataArrayInt containing IDs (indices) of tuples holding value equal to a given one. The ids are sorted in the ascending order.
| [in] | val | - the value to find within this. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::transformWithIndArrR | ( | const T * | indArrBg, |
| const T * | indArrEnd | ||
| ) | const |
Creates a one-dimensional DataArrayInt (res) whose contents are computed from values of this (a) and the given (indArr) arrays as follows: res[ indArr[ a[ i ]]] = i. I.e. for each value in place i v = a[ i ], new value in place indArr[ v ] is i.
| [in] | indArrBg | - the array holding indices within the result array to assign indices of values of this array pointing to values of indArrBg. |
| [in] | indArrEnd | - specifies the end of the array indArrBg, so that the last value of indArrBg is indArrEnd[ -1 ]. |
| If | this->getNumberOfComponents() != 1. |
| If | any value of this array is not a valid index for indArrBg array. |
| If | any value of indArrBg is not a valid index for this array. |
| void MEDCoupling::DataArrayDiscrete< T >::splitByValueRange | ( | const T * | arrBg, |
| const T * | arrEnd, | ||
| DataArrayType *& | castArr, | ||
| DataArrayType *& | rankInsideCast, | ||
| DataArrayType *& | castsPresent | ||
| ) | const |
Computes distribution of values of this one-dimensional array between given value ranges (casts). This method is typically useful for entity number splitting by types, for example.
| [in] | arrBg | - the array of ascending values defining the value ranges. The i-th value of arrBg (arrBg[ i ]) gives the lowest value of the i-th range, and the greatest value of the i-th range equals to arrBg[ i+1 ] - 1. arrBg containing n values defines n-1 ranges. The last value of arrBg should be more than every value in this array. |
| [in] | arrEnd | - specifies the end of the array arrBg, so that the last value of arrBg is arrEnd[ -1 ]. |
| [out] | castArr | - a new instance of DataArrayInt, of same size as this array (same number of tuples and components), the caller is to delete using decrRef() as it is no more needed. This array contains indices of ranges for every value of this array. I.e. the i-th value of castArr gives the index of range the i-th value of this belongs to. Or, in other words, this parameter contains for each tuple in this in which cast it holds. |
| [out] | rankInsideCast | - a new instance of DataArrayInt, of same size as this array, the caller is to delete using decrRef() as it is no more needed. This array contains ranks of values of this array within ranges they belongs to. I.e. the i-th value of rankInsideCast gives the rank of the i-th value of this array within the castArr[ i ]-th range, to which the i-th value of this belongs to. Or, in other words, this param contains for each tuple its rank inside its cast. The rank is computed as difference between the value and the lowest value of range. |
| [out] | castsPresent | - a new instance of DataArrayInt, containing indices of ranges (casts) to which at least one value of this array belongs. Or, in other words, this param contains the casts that this contains. The caller is to delete this array using decrRef() as it is no more needed. |
Example: If this contains [6,5,0,3,2,7,8,1,4] and arrBg contains [0,4,9] then the output of this method will be :
I.e. values of this array belong to 2 ranges: #0 and #1. Value 6 belongs to the range #1 and its rank within this range is 2; etc.
| If | this->getNumberOfComponents() != 1. |
| If | arrEnd - arrBg < 2. |
| If | any value of this is not less than arrEnd[-1]. |
| bool MEDCoupling::DataArrayDiscrete< T >::isRange | ( | T & | strt, |
| T & | sttoopp, | ||
| T & | stteepp | ||
| ) | const |
This method look at this if it can be considered as a range defined by the 3-tuple ( strt , sttoopp , stteepp ). If false is returned the tuple must be ignored. If true is returned this can be considered by a range( strt , sttoopp , stteepp ). This method works only if this is allocated and single component. If not an exception will be thrown.
| [out] | strt | - the start of the range (included) if true is returned. |
| [out] | sttoopp | - the end of the range (not included) if true is returned. |
| [out] | stteepp | - the step of the range if true is returned. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::invertArrayO2N2N2O | ( | mcIdType | newNbOfElem | ) | const |
Creates a one-dimensional DataArrayInt of given length, whose contents are computed from values of this array, which is supposed to contain a renumbering map in "Old to New" mode. The result array contains a renumbering map in "New to Old" mode. To know how to use the renumbering maps see Array indexing and numbering.
| [in] | newNbOfElem | - the number of tuples in the result array. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::invertArrayN2O2O2N | ( | mcIdType | oldNbOfElem | ) | const |
Creates a one-dimensional DataArrayInt of given length, whose contents are computed from values of this array, which is supposed to contain a renumbering map in "New to Old" mode. The result array contains a renumbering map in "Old to New" mode. To know how to use the renumbering maps see Array indexing and numbering.
| [in] | oldNbOfElem | - the number of tuples in the result array. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::invertArrayO2N2N2OBis | ( | mcIdType | newNbOfElem | ) | const |
This method is similar to DataArrayInt::invertArrayO2N2N2O except that Example : If this contains [0,1,2,0,3,4,5,4,6,4] this method will return [0,1,2,4,5,6,8] whereas DataArrayInt::invertArrayO2N2N2O returns [3,1,2,4,9,6,8]
| MCAuto< MapKeyVal< T, mcIdType > > MEDCoupling::DataArrayDiscrete< T >::invertArrayN2O2O2NOptimized |
Creates a map, whose contents are computed from values of this array, which is supposed to contain a renumbering map in "New to Old" mode. The result array contains a renumbering map in "Old to New" mode. To know how to use the renumbering maps see Array indexing and numbering.
| MCAuto< MapKeyVal< mcIdType, T > > MEDCoupling::DataArrayDiscrete< T >::giveN2OOptimized |
Creates a map, whose contents are computed from values of this array, which is supposed to contain a renumbering map in "New to Old" mode. The result array contains a renumbering map in "New to Old" mode as C++ map for performance reasons.
| MCAuto< DataArrayIdType > MEDCoupling::DataArrayDiscrete< T >::findIdForEach | ( | const T * | valsBg, |
| const T * | valsEnd | ||
| ) | const |
This method finds for each element ELT in [valsBg,valsEnd) elements in this equal to it. Associated to ELT this method will return the tuple id of last element found. If there is no element in this equal to ELT an exception will be thrown.
In case of success this[ret]==vals. Samely ret->transformWithIndArr(this->begin(),this->end())==vals. Where vals is the [valsBg,valsEnd) array and ret the array returned by this method. This method can be seen as an extension of FindPermutationFromFirstToSecond.
Example:
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::checkAndPreparePermutation |
Returns a new DataArrayInt containing a renumbering map in "Old to New" mode. This map, if applied to this array, would make it sorted. For example, if this array contents are [9,10,0,6,4,11,3,7] then the contents of the result array are [5,6,0,3,2,7,1,4]; if this result array (res) is used as an argument in call this->renumber(res) then the returned array contains [0,3,4,6,7,9,10,11]. This method is useful for renumbering (in MED file for example). For more info on renumbering see Array indexing and numbering.
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| If | there are equal values in this array. |
References MEDCoupling::C_DEALLOC.
| void MEDCoupling::DataArrayDiscrete< T >::changeSurjectiveFormat | ( | T | targetNb, |
| DataArrayIdType *& | arr, | ||
| DataArrayIdType *& | arrI | ||
| ) | const |
Returns two arrays describing a surjective mapping from this set of values (A) onto a set of values of size targetNb (B). The surjective function is B[ A[ i ]] = i. That is to say that for each id in [0,targetNb), where targetNb < this->getNumberOfTuples(), there exists at least one tupleId (tid) so that this->getIJ( tid, 0 ) == id.
The first of out arrays returns indices of elements of this array, grouped by their place in the set B. The second out array is the index of the first one; it shows how many elements of A are mapped into each element of B.
For more info on mapping and its usage in renumbering see Array indexing and numbering.
Example:
This result means:
the element of B 0 encounters within A once (arrI[ 0+1 ] - arrI[ 0 ]) and its index within A is 0 ( arr[ 0:1 ] == arr[ arrI[ 0 ] : arrI[ 0+1 ]]);
the element of B 2 encounters within A 4 times (arrI[ 2+1 ] - arrI[ 2 ]) and its indices within A are [2,4,5,7] ( arr[ 2:6 ] == arr[ arrI[ 2 ] : arrI[ 2+1 ]]);
etc.
| [in] | targetNb | - the size of the set B. targetNb must be equal or more than the maximal value of A. |
| [out] | arr | - a new instance of DataArrayInt returning indices of elements of this, grouped by their place in the set B. The caller is to delete this array using decrRef() as it is no more needed. |
| [out] | arrI | - a new instance of DataArrayInt returning size of groups of equal elements of this. The caller is to delete this array using decrRef() as it is no more needed. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| If | any value in this is more or equal to targetNb. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::buildPermArrPerLevel |
Returns a new DataArrayInt containing a renumbering map in "New to Old" mode, which if applied to this array would make it sorted ascendingly. For more info on renumbering see Array indexing and numbering.
Example:
after applying result to this: [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2]
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| bool MEDCoupling::DataArrayDiscrete< T >::isIota | ( | mcIdType | sizeExpected | ) | const |
Checks if this array has the given size, and if its contents is equal to an array filled with iota(). This method is particularly useful for DataArrayInt instances that represent a renumbering array, to check if there is a real need in renumbering. This method checks than this can be considered as an identity mapping of a set having sizeExpected elements into itself.
| [in] | sizeExpected | - The number of elements expected. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| bool MEDCoupling::DataArrayDiscrete< T >::isUniform | ( | T | val | ) | const |
Checks if all values in this array are equal to val.
| [in] | val | - value to check equality of array values to. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1 |
| T MEDCoupling::DataArrayDiscrete< T >::checkUniformAndGuess |
This method checks that this is uniform. If not and exception will be thrown. In case of uniformity the corresponding value is returned.
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1 |
| If | this is not uniform. |
| bool MEDCoupling::DataArrayDiscrete< T >::hasUniqueValues |
Checks if all values in this array are unique.
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1 |
| void MEDCoupling::DataArrayDiscrete< T >::setSelectedComponents | ( | const DataArrayType * | a, |
| const std::vector< std::size_t > & | compoIds | ||
| ) |
Copy all components in a specified order from another DataArrayInt. The specified components become the first ones in this array. Both numerical and textual data is copied. The number of tuples in this and the other array can be different.
| [in] | a | - the array to copy data from. |
| [in] | compoIds | - sequence of zero based indices of components, data of which is to be copied. |
| If | a is NULL. |
| If | compoIds.size() != a->getNumberOfComponents(). |
| If | compoIds[i] < 0 or compoIds[i] > this->getNumberOfComponents(). |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::locateComponentId | ( | const DataArrayType * | valToSearchIntoTuples, |
| const DataArrayIdType * | tupleIdHint | ||
| ) | const |
This method searches each value in valToSearchIntoTuples among values in this given the corresponding tuple to find into. If the value at the corresponding tuple is not found in the tuple an exception will be thrown. If the value is found the corresponding component id is returned.
| [in] | valToSearchIntoTuples | - a one component array containing the values to find in this |
| [in] | tupleIdHint | - a one component array having same size than valToSearchIntoTuples giving for each value the tuple to find into |
Example:
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::findIdsNotEqual | ( | T | val | ) | const |
Creates a new DataArrayInt containing IDs (indices) of tuples holding value not equal to a given one.
| [in] | val | - the value to ignore within this. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::findIdsEqualTuple | ( | const T * | tupleBg, |
| const T * | tupleEnd | ||
| ) | const |
Creates a new DataArrayInt containing IDs (indices) of tuples holding tuple equal to those defined by [ tupleBg , tupleEnd ) This method is an extension of DataArrayInt::findIdsEqual method.
| [in] | tupleBg | - the begin (included) of the input tuple to find within this. |
| [in] | tupleEnd | - the end (excluded) of the input tuple to find within this. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != std::distance(tupleBg,tupleEnd). |
| If | this->getNumberOfComponents() is equal to 0. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::findIdsEqualList | ( | const T * | valsBg, |
| const T * | valsEnd | ||
| ) | const |
Creates a new DataArrayInt containing IDs (indices) of tuples holding value equal to one of given values.
| [in] | valsBg | - an array of values to find within this array. |
| [in] | valsEnd | - specifies the end of the array valsBg, so that the last value of valsBg is valsEnd[ -1 ]. |
| If | this->getNumberOfComponents() != 1. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::findIdsNotEqualList | ( | const T * | valsBg, |
| const T * | valsEnd | ||
| ) | const |
Creates a new DataArrayInt containing IDs (indices) of tuples holding values not equal to any of given values.
| [in] | valsBg | - an array of values to ignore within this array. |
| [in] | valsEnd | - specifies the end of the array valsBg, so that the last value of valsBg is valsEnd[ -1 ]. |
| If | this->getNumberOfComponents() != 1. |
| mcIdType MEDCoupling::DataArrayDiscrete< T >::findIdFirstEqual | ( | T | value | ) | const |
This method expects to be called when number of components of this is equal to one. This method returns the tuple id, if it exists, of the first tuple equal to value. If not any tuple contains value -1 is returned.
| mcIdType MEDCoupling::DataArrayDiscrete< T >::findIdFirstEqual | ( | const std::vector< T > & | vals | ) | const |
This method expects to be called when number of components of this is equal to one. This method returns the tuple id, if it exists, of the first tuple so that the value is contained in vals. If not any tuple contains one of the values contained in 'vals' -1 is returned.
| mcIdType MEDCoupling::DataArrayDiscrete< T >::findIdFirstEqualTuple | ( | const std::vector< T > & | tupl | ) | const |
This method is an extension of DataArrayInt::findIdFirstEqual method because this method works for DataArrayInt with any number of components excepted 0 (an INTERP_KERNEL::Exception is thrown in this case). This method searches in this is there is a tuple that matched the input parameter tupl. If any the tuple id is returned. If not -1 is returned.
This method throws an INTERP_KERNEL::Exception if the number of components in this mismatches with the size of the input vector. An INTERP_KERNEL::Exception is thrown too if this is not allocated.
| mcIdType MEDCoupling::DataArrayDiscrete< T >::findIdSequence | ( | const std::vector< T > & | vals | ) | const |
This method searches the sequence specified in input parameter vals in this. This works only for DataArrayInt having number of components equal to one (if not an INTERP_KERNEL::Exception will be thrown). This method differs from DataArrayInt::findIdFirstEqualTuple in that the position is internal raw data is not considered here contrary to DataArrayInt::findIdFirstEqualTuple.
| mcIdType MEDCoupling::DataArrayDiscrete< T >::changeValue | ( | T | oldValue, |
| T | newValue | ||
| ) |
Assigns newValue to all elements holding oldValue within this one-dimensional array.
| [in] | oldValue | - the value to replace. |
| [in] | newValue | - the value to assign. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| mcIdType MEDCoupling::DataArrayDiscrete< T >::count | ( | T | value | ) | const |
This method returns the number of values in this that are equals to input parameter value. This method only works for single component array.
this->getNumberOfTuples() )| If | this is not allocated |
| bool MEDCoupling::DataArrayDiscrete< T >::presenceOfTuple | ( | const std::vector< T > & | tupl | ) | const |
This method is an extension of DataArrayInt::presenceOfValue method because this method works for DataArrayInt with any number of components excepted 0 (an INTERP_KERNEL::Exception is thrown in this case). This method searches in this is there is a tuple that matched the input parameter tupl. This method throws an INTERP_KERNEL::Exception if the number of components in this mismatches with the size of the input vector. An INTERP_KERNEL::Exception is thrown too if this is not allocated.
| bool MEDCoupling::DataArrayDiscrete< T >::presenceOfValue | ( | T | value | ) | const |
Returns true if a given value is present within this one-dimensional array.
| [in] | value | - the value to find within this array. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| bool MEDCoupling::DataArrayDiscrete< T >::presenceOfValue | ( | const std::vector< T > & | vals | ) | const |
This method expects to be called when number of components of this is equal to one. This method returns true if it exists a tuple so that the value is contained in vals. If not any tuple contains one of the values contained in 'vals' false is returned.
| void MEDCoupling::DataArrayDiscrete< T >::accumulate | ( | T * | res | ) | const |
Accumulates values of each component of this array.
| [out] | res | - an array of length this->getNumberOfComponents(), allocated by the caller, that is filled by this method with sum value for each component. |
| If | this is not allocated. |
| T MEDCoupling::DataArrayDiscrete< T >::accumulate | ( | std::size_t | compId | ) | const |
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::accumulatePerChunck | ( | const mcIdType * | bgOfIndex, |
| const mcIdType * | endOfIndex | ||
| ) | const |
This method accumulate using addition tuples in this using input index array [ bgOfIndex, endOfIndex ). The returned array will have same number of components than this and number of tuples equal to std::distance(bgOfIndex,endOfIndex) minus one.
The input index array is expected to be ascendingly sorted in which the all referenced ids should be in [0, this->getNumberOfTuples).
| [in] | bgOfIndex | - begin (included) of the input index array. |
| [in] | endOfIndex | - end (excluded) of the input index array. |
| If | bgOfIndex or end is NULL. |
| If | input index array is not ascendingly sorted. |
| If | there is an id in [ bgOfIndex, endOfIndex ) not in [0, this->getNumberOfTuples). |
| If | std::distance(bgOfIndex,endOfIndex)==0. |
| void MEDCoupling::DataArrayDiscrete< T >::getMinMaxValues | ( | T & | minValue, |
| T & | maxValue | ||
| ) | const |
Returns in a single walk in this the min value and the max value in this. this is expected to be single component array.
| [out] | minValue | - the min value in this. |
| [out] | maxValue | - the max value in this. |
| void MEDCoupling::DataArrayDiscrete< T >::applyInv | ( | T | numerator | ) |
Modify all elements of this array, so that an element x becomes
.
| [in] | numerator | - the numerator used to modify array elements. |
| If | this is not allocated. |
| If | there is an element equal to 0 in this array. |
| void MEDCoupling::DataArrayDiscrete< T >::applyDivideBy | ( | T | val | ) |
Modify all elements of this array, so that an element x becomes
.
| [in] | val | - the denominator used to modify array elements. |
| If | this is not allocated. |
| If | val == 0. |
| void MEDCoupling::DataArrayDiscrete< T >::applyModulus | ( | T | val | ) |
Modify all elements of this array, so that an element x becomes x % val .
| [in] | val | - the divisor used to modify array elements. |
| If | this is not allocated. |
| If | val <= 0. |
| void MEDCoupling::DataArrayDiscrete< T >::applyRModulus | ( | T | val | ) |
Modify all elements of this array, so that an element x becomes val % x .
| [in] | val | - the divident used to modify array elements. |
| If | this is not allocated. |
| If | there is an element equal to or less than 0 in this array. |
| void MEDCoupling::DataArrayDiscrete< T >::applyPow | ( | T | val | ) |
Modify all elements of this array, so that an element x becomes val ^ x .
| [in] | val | - the value used to apply pow on all array elements. |
| If | this is not allocated. |
| If | val < 0. |
| void MEDCoupling::DataArrayDiscrete< T >::applyRPow | ( | T | val | ) |
Modify all elements of this array, so that an element x becomes
.
| [in] | val | - the value used to apply pow on all array elements. |
| If | this is not allocated. |
| If | there is an element < 0 in this array. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::findIdsInRange | ( | T | vmin, |
| T | vmax | ||
| ) | const |
This method works only on data array with one component. This method returns a newly allocated array storing stored ascendantly tuple ids in this so that this[*id] in [vmin,vmax)
| [in] | vmin | begin of range. This value is included in range (included). |
| [in] | vmax | end of range. This value is not included in range (excluded). |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::findIdsNotInRange | ( | T | vmin, |
| T | vmax | ||
| ) | const |
This method works only on data array with one component. This method returns a newly allocated array storing stored ascendantly tuple ids in this so that this[*id] not in [vmin,vmax)
| [in] | vmin | begin of range. This value is not included in range (excluded). |
| [in] | vmax | end of range. This value is included in range (included). |
| bool MEDCoupling::DataArrayDiscrete< T >::checkAllIdsInRange | ( | T | vmin, |
| T | vmax | ||
| ) | const |
This method works only on data array with one component. This method checks that all ids in this are in [ vmin, vmax ). If there is at least one element in this not in [ vmin, vmax ) an exception will be thrown.
| [in] | vmin | begin of range. This value is included in range (included). |
| [in] | vmax | end of range. This value is not included in range (excluded). |
this->getNumberOfTuples() ).
|
static |
Returns a new DataArrayInt by concatenating two given arrays, so that (1) the number of tuples in the result array is a1->getNumberOfTuples() + a2->getNumberOfTuples() - offsetA2 and (2) the number of component in the result array is same as that of each of given arrays. First offsetA2 tuples of a2 are skipped and thus are missing from the result array. Info on components is copied from the first of the given arrays. Number of components in the given arrays must be the same.
| [in] | a1 | - an array to include in the result array. |
| [in] | a2 | - another array to include in the result array. |
| [in] | offsetA2 | - number of tuples of a2 to skip. |
| If | either a1 or a2 is NULL. |
| If | a1->getNumberOfComponents() != a2->getNumberOfComponents(). |
|
static |
Returns a new DataArrayInt by concatenating all given arrays, so that (1) the number of tuples in the result array is a sum of the number of tuples of given arrays and (2) the number of component in the result array is same as that of each of given arrays. Info on components is copied from the first of the given arrays. Number of components in the given arrays must be the same. If the number of non null of elements in arr is equal to one the returned object is a copy of it not the object itself.
| [in] | arr | - a sequence of arrays to include in the result array. |
| If | all arrays within arr are NULL. |
| If | getNumberOfComponents() of arrays within arr. |
|
static |
This method takes as input a list of DataArrayInt instances arrs that represent each a packed index arrays. A packed index array is an allocated array with one component, and at least one tuple. The first element of each array in arrs must be 0. Each array in arrs is expected to be increasingly monotonic. This method is useful for users that want to aggregate a pair of DataArrayInt representing an indexed data (typically nodal connectivity index in unstructured meshes.
|
static |
Returns a new DataArrayInt which contains all elements of given one-dimensional arrays. The result array does not contain any duplicates and its values are sorted in ascending order.
| [in] | arr | - sequence of DataArrayInt's to unite. |
| If | any arr[i] is not allocated. |
| If | arr[i]->getNumberOfComponents() != 1. |
Referenced by MEDCoupling::DataArrayDiscrete< T >::buildUnion().
|
static |
Returns a new DataArrayInt which contains elements present in each of given one-dimensional arrays. The result array does not contain any duplicates and its values are sorted in ascending order.
| [in] | arr | - sequence of DataArrayInt's to intersect. |
| If | any arr[i] is not allocated. |
| If | arr[i]->getNumberOfComponents() != 1. |
Referenced by MEDCoupling::DataArrayDiscrete< T >::buildIntersection().
|
static |
This method allows to put a vector of vector of integer into a more compact data structure (skyline). This method is not available into python because no available optimized data structure available to map std::vector< std::vector<mcIdType> >.
| [in] | v | the input data structure to be translate into skyline format. |
| [out] | data | the first element of the skyline format. The user is expected to deal with newly allocated array. |
| [out] | dataIndex | the second element of the skyline format. |
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::buildComplement | ( | mcIdType | nbOfElement | ) | const |
Returns a new DataArrayInt which contains a complement of elements of this one-dimensional array. I.e. the result array contains all elements from the range [0, nbOfElement) not present in this array.
| [in] | nbOfElement | - maximal size of the result array. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| If | any element x of this array violates condition ( 0 <= x < nbOfElement ). |
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::buildSubstraction | ( | const DataArrayType * | other | ) | const |
Returns a new DataArrayInt containing elements of this one-dimensional missing from an other one-dimensional array.
| [in] | other | - a DataArrayInt containing elements not to include in the result array. |
| If | other is NULL. |
| If | other is not allocated. |
| If | other->getNumberOfComponents() != 1. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::buildSubstractionOptimized | ( | const DataArrayType * | other | ) | const |
this is expected to have one component and to be sorted ascendingly (as for other). other is expected to be a part of this. If not DataArrayInt::buildSubstraction should be called instead.
| [in] | other | an array with one component and expected to be sorted ascendingly. \ret list of ids in this but not in other. |
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::buildUnion | ( | const DataArrayType * | other | ) | const |
Returns a new DataArrayInt which contains all elements of this and a given one-dimensional arrays. The result array does not contain any duplicates and its values are sorted in ascending order.
| [in] | other | - an array to unite with this one. |
| If | this or other is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| If | other->getNumberOfComponents() != 1. |
References MEDCoupling::DataArrayDiscrete< T >::BuildUnion().
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::buildIntersection | ( | const DataArrayType * | other | ) | const |
Returns a new DataArrayInt which contains elements present in both this and a given one-dimensional arrays. The result array does not contain any duplicates and its values are sorted in ascending order.
| [in] | other | - an array to intersect with this one. |
| If | this or other is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| If | other->getNumberOfComponents() != 1. |
References MEDCoupling::DataArrayDiscrete< T >::BuildIntersection().
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::indexOfSameConsecutiveValueGroups |
This method can be applied on allocated with one component DataArrayInt instance. Locate groups of all consecutive same values in this and return them into an indexed array of positions pointing to this starting with 0. Number of tuples of returned array is equal to size of this->buildUnique() + 1. Last value of returned array is equal to this->getNumberOfTuples()
Example:
| if | this is not allocated or if this has not exactly one component. |
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::buildUnique |
This method can be applied on allocated with one component DataArrayInt instance. This method is typically relevant for sorted arrays. All consecutive duplicated items in this will appear only once in returned DataArrayInt instance. Example : if this contains [1,2,2,3,3,3,3,4,5,5,7,7,7,19] the returned array will contain [1,2,3,4,5,7,19]
| if | this is not allocated or if this has not exactly one component. |
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::buildUniqueNotSorted |
This method can be applied on allocated with one component DataArrayInt instance. This method keep elements only once by keeping the same order in this that is not expected to be sorted.
| if | this is not allocated or if this has not exactly one component. |
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::deltaShiftIndex |
Returns a new DataArrayInt which contains size of every of groups described by this "index" array. Such "index" array is returned for example by MEDCouplingUMesh::buildDescendingConnectivity and MEDCouplingUMesh::getNodalConnectivityIndex etc. This method performs the reverse operation of DataArrayInt::computeOffsetsFull.
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| If | this->getNumberOfTuples() < 1. |
Example:
| void MEDCoupling::DataArrayDiscrete< T >::computeOffsets |
Modifies this one-dimensional array so that value of each element x of this array (a) is computed as
. Or: for each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. Number of tuples and components remains the same.
This method is useful for allToAllV in MPI with contiguous policy. This method differs from computeOffsetsFull() in that the number of tuples is not changed by this one.
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
Example:
| void MEDCoupling::DataArrayDiscrete< T >::computeOffsetsFull |
Modifies this one-dimensional array so that value of each element x of this array (a) is computed as
. Or: for each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. Number components remains the same and number of tuples is inceamented by one.
This method is useful for allToAllV in MPI with contiguous policy. This method differs from computeOffsets() in that the number of tuples is changed by this one. This method performs the reverse operation of DataArrayInt::deltaShiftIndex.
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
Example:
References MEDCoupling::C_DEALLOC.
| void MEDCoupling::DataArrayDiscrete< T >::findIdsRangesInListOfIds | ( | const DataArrayType * | listOfIds, |
| DataArrayIdType *& | rangeIdsFetched, | ||
| DataArrayType *& | idsInInputListThatFetch | ||
| ) | const |
Returns two new DataArrayInt instances whose contents is computed from that of this and listOfIds arrays as follows. this is expected to be an offset format ( as returned by DataArrayInt::computeOffsetsFull ) that is to say with one component and ** sorted strictly increasingly **. listOfIds is expected to be sorted ascendingly (not strictly needed for listOfIds). This methods searches in this, considered as a set of contiguous this->getNumberOfComponents() ranges, all ids in listOfIds filling completely one of the ranges in this.
| [in] | listOfIds | a list of ids that has to be sorted ascendingly. |
| [out] | rangeIdsFetched | the range ids fetched |
| [out] | idsInInputListThatFetch | contains the list of ids in listOfIds that are fully included in a range in this. So idsInInputListThatFetch is a part of input listOfIds. |
Example:
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::buildExplicitArrByRanges | ( | const DataArrayType * | offsets | ) | const |
Returns a new DataArrayInt whose contents is computed from that of this and offsets arrays as follows. offsets is a one-dimensional array considered as an "index" array of a "iota" array, thus, whose each element gives an index of a group beginning within the "iota" array. And this is a one-dimensional array considered as a selector of groups described by offsets to include into the result array.
| If | offsets is NULL. |
| If | offsets is not allocated. |
| If | offsets->getNumberOfComponents() != 1. |
| If | offsets is not monotonically increasing. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| If | any element of this is not a valid index for offsets array. |
Example:
range(0,3) + range(6,10) + range(10,14) ==range( offsets[ this[0] ], offsets[ this[0]+1 ]) + range( offsets[ this[1] ], offsets[ this[1]+1 ]) + range( offsets[ this[2] ], offsets[ this[2]+1 ]) | Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::buildExplicitArrOfSliceOnScaledArr | ( | T | bg, |
| T | stop, | ||
| T | step | ||
| ) | const |
Returns a new DataArrayInt whose contents is computed using this that must be a scaled array (monotonically increasing). from that of this and offsets arrays as follows. offsets is a one-dimensional array considered as an "index" array of a "iota" array, thus, whose each element gives an index of a group beginning within the "iota" array. And this is a one-dimensional array considered as a selector of groups described by offsets to include into the result array.
| If | is NULL. |
| If | this is not allocated. |
| If | this->getNumberOfComponents() != 1. |
| If | this->getNumberOfTuples() == 0. |
| If | this is not monotonically increasing. |
| If | any element of ids in ( bg stop step ) points outside the scale in this. |
Example:
References MEDCoupling::DataArrayTools< T >::GetNumberOfItemGivenBESRelative().
| DataArrayIdType * MEDCoupling::DataArrayDiscrete< T >::findRangeIdForEachTuple | ( | const DataArrayType * | ranges | ) | const |
Given in input ranges ranges, it returns a newly allocated DataArrayInt instance having one component and the same number of tuples than this. For each tuple at place i in this it tells which is the first range in ranges that contains value this->getIJ(i,0) and put the result in tuple i of returned DataArrayInt. If ranges overlapped (in theory it should not) this method do not detect it and always returns the first range.
For example if this contains : [1,24,7,8,10,17] and ranges contains [(0,3),(3,8),(8,15),(15,22),(22,30)] The return DataArrayInt will contain : [0,4,1,2,2,3]
| [in] | ranges | typically come from output of MEDCouplingUMesh::ComputeRangesFromTypeDistribution. Each range is specified like this : 1st component is for lower value included and 2nd component is the upper value of corresponding range excluded. |
| If | offsets is a null pointer or does not have 2 components or if this is not allocated or this do not have exactly one component. To finish an exception is thrown if no ranges in ranges contains value in this. |
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::findIdInRangeForEachTuple | ( | const DataArrayType * | ranges | ) | const |
Given in input ranges ranges, it returns a newly allocated DataArrayInt instance having one component and the same number of tuples than this. For each tuple at place i in this it tells which is the sub position of the first range in ranges that contains value this->getIJ(i,0) and put the result in tuple i of returned DataArrayInt. If ranges overlapped (in theory it should not) this method do not detect it and always returns the sub position of the first range.
For example if this contains : [1,24,7,8,10,17] and ranges contains [(0,3),(3,8),(8,15),(15,22),(22,30)] The return DataArrayInt will contain : [1,2,4,0,2,2] This method is often called in pair with DataArrayInt::findRangeIdForEachTuple method.
| [in] | ranges | typically come from output of MEDCouplingUMesh::ComputeRangesFromTypeDistribution. Each range is specified like this : 1st component is for lower value included and 2nd component is the upper value of corresponding range excluded. |
| If | offsets is a null pointer or does not have 2 components or if this is not allocated or this do not have exactly one component. To finish an exception is thrown if no ranges in ranges contains value in this. |
| void MEDCoupling::DataArrayDiscrete< T >::sortEachPairToMakeALinkedList |
WARNING this method is a non const method. This method works tuple by tuple. Each tuple is expected to be pairs (number of components must be equal to 2). This method rearrange each pair in this so that, tuple with id tid will be after the call this->getIJ(tid,0)==this->getIJ(tid-1,1) and this->getIJ(tid,1)==this->getIJ(tid+1,0). If it is impossible to reach such condition an exception will be thrown ! WARNING In case of throw this can be partially modified ! If this method has correctly worked, this will be able to be considered as a linked list. This method does nothing if number of tuples is lower of equal to 1.
This method is useful for users having an unstructured mesh having only SEG2 to rearrange internally the connectivity without any coordinates consideration.
| void MEDCoupling::DataArrayDiscrete< T >::sortToHaveConsecutivePairs |
This method is the improvement from the method sortEachPairToMakeALinkedList().
| MCAuto< typename Traits< T >::ArrayType > MEDCoupling::DataArrayDiscrete< T >::fromLinkedListOfPairToList |
this is expected to be a correctly linked list of pairs.
| Traits< T >::ArrayType * MEDCoupling::DataArrayDiscrete< T >::getDifferentValues |
This method returns all different values found in this. This method throws if this has not been allocated. But the number of components can be different from one.
| MCAuto< typename DataArrayDiscrete< T >::DataArrayType > MEDCoupling::DataArrayDiscrete< T >::forThisAsPartitionBuildReduction | ( | const MCAuto< DataArrayIdType > & | commonEntities, |
| const MCAuto< DataArrayIdType > & | commonEntitiesIndex, | ||
| MCAuto< DataArrayType > & | partitionsToBeModified, | ||
| MCAuto< DataArrayIdType > & | partitionsToBeModifiedIndex | ||
| ) | const |
this is considered as an array defining a partition. It means that values in this define partition-ids. All tuples in this with same value can be considered as partition. Typically MED stores families uses this compact storage method.
This method computes and returns the partition stored in this on reduced space using a reduction operation specified by pairs commonEntities and commonEntitiesIndex parameters. The reduction operation is the consequence of a fusion of enties. It explains the storage format defining reduction.
An another way to consider this method : This method can be seen as an interpolation on integer field (this). For fused entities it returns in compact way all combinations of partition configuration.
| [out] | partitionsToBeModified | - For all partitions impacted by the reduction a n-uplet is returned (n is deduced thanks to partitionsToBeModifiedIndex) Each n-uplet represents a list of partitions impacted by reduction. The first element of n-uplet represents the ID to locate entities (using for example findIdsEqual in returned array) Remaining IDs in n-uplet are Partition IDs impacted. |
| [out] | partitionsToBeModifiedIndex | - Index attached to partitionsToBeModified to interprete. |
References MEDCoupling::PartitionCfg< T >::getID(), and MEDCoupling::PartitionCfg< T >::setID().
| void MEDCoupling::DataArrayDiscrete< T >::fromListOfPairsToIndexArray | ( | MCAuto< DataArrayType > & | arrOut, |
| MCAuto< DataArrayIdType > & | arrIndexOut | ||
| ) | const |
This method constructs for a list of pairs of ids in this to a pair arr,arrIndex (typically followed by a ConvertIndexArrayToO2N call). This method is useful to convert in context of // computing to move to global ids approach.
this is expected to be a 2 components array.
Example:
| std::vector< DataArrayIdType * > MEDCoupling::DataArrayDiscrete< T >::partitionByDifferentValues | ( | std::vector< T > & | differentIds | ) | const |
This method is a refinement of DataArrayInt::getDifferentValues because it returns not only different values in this but also, for each of them it tells which tuple id have this id. This method works only on arrays with one component (if it is not the case call DataArrayInt::rearrange(1) ). This method returns two arrays having same size. The instances of DataArrayInt in the returned vector have be specially allocated and computed by this method. Each of them should be dealt by the caller of this method. Example : if this is equal to [1,0,1,2,0,2,2,-3,2] -> differentIds=[-3,0,1,2] and returned array will be equal to [[7],[1,4],[0,2],[3,5,6,8]]
| std::vector< std::pair< mcIdType, mcIdType > > MEDCoupling::DataArrayDiscrete< T >::splitInBalancedSlices | ( | mcIdType | nbOfSlices | ) | const |
This method split ids in [0, this->getNumberOfTuples() ) using this array as a field of weight (>=0 each). The aim of this method is to return a set of nbOfSlices chunk of contiguous ids as balanced as possible.
| [in] | nbOfSlices | - number of slices expected. |
| If | this is not allocated or not with exactly one component. |
| If | an element in this if < 0. |
|
static |
Returns a new DataArrayInt that is a modulus of two given arrays. There are 3 valid cases.
Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).
| [in] | a1 | - a dividend array. |
| [in] | a2 | - a divisor array. |
| If | either a1 or a2 is NULL. |
| If | a1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1. |
| void MEDCoupling::DataArrayDiscrete< T >::modulusEqual | ( | const DataArrayType * | other | ) |
Modify this array so that each value becomes a modulus of division of this value by a value of another DataArrayInt. There are 3 valid cases.
The arrays have same number of components and other array has one tuple. Then a [ i, j ] %= a2 [ 0, j ].
| [in] | other | - a divisor array. |
| If | other is NULL. |
| If | this->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1. |
|
static |
Returns a new DataArrayInt that is the result of pow of two given arrays. There are 3 valid cases.
| [in] | a1 | - an array to pow up. |
| [in] | a2 | - another array to sum up. |
| If | either a1 or a2 is NULL. |
| If | a1->getNumberOfTuples() != a2->getNumberOfTuples() |
| If | a1->getNumberOfComponents() != 1 or a2->getNumberOfComponents() != 1. |
| If | there is a negative value in a2. |
| void MEDCoupling::DataArrayDiscrete< T >::powEqual | ( | const DataArrayType * | other | ) |
Apply pow on values of another DataArrayInt to values of this one.
| [in] | other | - an array to pow to this one. |
| If | other is NULL. |
| If | this->getNumberOfTuples() != other->getNumberOfTuples() |
| If | this->getNumberOfComponents() != 1 or other->getNumberOfComponents() != 1 |
| If | there is a negative value in other. |
| void MEDCoupling::DataArrayDiscrete< T >::findCommonTuplesAlg | ( | const T * | bbox, |
| mcIdType | nbNodes, | ||
| mcIdType | limitNodeId, | ||
| DataArrayIdType * | c, | ||
| DataArrayIdType * | cI | ||
| ) | const |
|
static |
This method tries to find the permutation to apply to the first input ids1 to obtain the same array (without considering strings information) the second input array ids2. ids1 and ids2 are expected to be both a list of ids (both with number of components equal to one) not sorted and with values that can be negative. This method will throw an exception is no such permutation array can be obtained. It is typically the case if there is some ids in ids1 not in ids2 or inversely. In case of success both assertion will be true (no throw) : ids1->renumber(ret)->isEqual(ids2) where ret is the return of this method. ret->transformWithIndArr(ids2)->isEqual(ids1)
Example:
| If | either ids1 or ids2 is null not allocated or not with one components. |
|
static |
This method tries to find the permutation to apply to the first input ids1 to obtain the same array (without considering strings information) the second input array ids2. ids1 and ids2 are expected to be both a list of ids (both with number of components equal to one) not sorted and with values that can be negative. This method will throw an exception is no such permutation array can be obtained. It is typically the case if there is some ids in ids1 not in ids2 or inversely. The difference with DataArrayInt::FindPermutationFromFirstToSecond is that this method supports multiple same values in ids1 and ids2 whereas DataArrayInt::FindPermutationFromFirstToSecond doesn't. It implies that this method my be slower than the DataArrayInt::FindPermutationFromFirstToSecond one.
In case of success both assertion will be true (no throw) : ids1->renumber(ret)->isEqual(ids2) where ret is the return of this method. ret->transformWithIndArr(ids2)->isEqual(ids1)
Example:
| If | either ids1 or ids2 is null not allocated or not with one components. |
|
static |
Returns a C array which is a renumbering map in "Old to New" mode for the input array. This map, if applied to start array, would make it sorted. For example, if start array contents are [9,10,0,6,4,11,3,7] then the contents of the result array is [5,6,0,3,2,7,1,4].
| [in] | start | - pointer to the first element of the array for which the permutation map is computed. |
| [in] | end | - pointer specifying the end of the array start, so that the last value of start is end[ -1 ]. |
| If | there are equal values in the input array. |
|
static |
This method returns the list of ids in ascending mode so that v[id]==true.
|
static |
This method returns the list of ids in ascending mode so that v[id]==false.
|
static |
Returns a new DataArrayInt containing a renumbering map in "Old to New" mode computed from a zip representation of a surjective format (returned e.g. by DataArrayDouble::findCommonTuples() for example). The result array minimizes the permutation.
For more info on renumbering see Array indexing and numbering.
Example:
| [in] | nbOfOldTuples | - number of tuples in the initial array arr. |
| [in] | arr | - the array of tuple indices grouped by arrIBg array. |
| [in] | arrIBg | - the array dividing all indices stored in arr into groups of (indices of) equal values. Its every element (except the last one) points to the first element of a group of equal values. |
| [in] | arrIEnd | - specifies the end of arrIBg, so that the last element of arrIBg is arrIEnd[ -1 ]. |
| [out] | newNbOfTuples | - number of tuples after surjection application. |
| If | any value of arr breaks condition ( 0 <= arr[ i ] < nbOfOldTuples ). |
|
static |
Returns a new DataArrayInt which is a minimal partition of elements of groups. The i-th item of the result array is an ID of a set of elements belonging to a unique set of groups, which the i-th element is a part of. This set of elements belonging to a unique set of groups is called family, so the result array contains IDs of families each element belongs to.
Example: if we have two groups of elements: group1 [0,4] and group2 [ 0,1,2 ], then there are 3 families:
| [in] | groups | - sequence of groups of element IDs. |
| [in] | newNb | - total number of elements; it must be more than max ID of element in groups. |
| [out] | fidsOfGroups | - IDs of families the elements of each group belong to. |
| If | any element ID in groups violates condition ( 0 <= ID < newNb ). |
|
static |
This method works on a pair input (arrIn, arrIndxIn) where arrIn indexes is in arrIndxIn (Indirect indexing). This method returns the result of the extraction ( specified by a set of ids in [idsOfSelectBg , idsOfSelectEnd ) ). The selection of extraction is done standardly in new2old format. This method returns indexed arrays (Indirect indexing) using 2 arrays (arrOut,arrIndexOut).
| [in] | idsOfSelectBg | begin of set of ids of the input extraction (included) |
| [in] | idsOfSelectEnd | end of set of ids of the input extraction (excluded) |
| [in] | arrIn | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [out] | arrOut | the resulting array |
| [out] | arrIndexOut | the index array of the resulting array arrOut |
|
static |
This method works on a pair input (arrIn, arrIndxIn) where arrIn indexes is in arrIndxIn (Indirect indexing). This method returns the result of the extraction ( specified by a set of ids with a slice given by idsOfSelectStart, idsOfSelectStop and idsOfSelectStep ). The selection of extraction is done standardly in new2old format. This method returns indexed arrays (Indirect indexing) using 2 arrays (arrOut,arrIndexOut).
| [in] | idsOfSelectStart | begin of set of ids of the input extraction (included) |
| [in] | idsOfSelectStop | end of set of ids of the input extraction (excluded) |
| [in] | idsOfSelectStep | step of set of ids of the input extraction |
| [in] | arrIn | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [out] | arrOut | the resulting array |
| [out] | arrIndexOut | the index array of the resulting array arrOut |
References MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative().
|
static |
This method works on an input pair (arrIn, arrIndxIn) where arrIn indexes is in arrIndxIn. This method builds an output pair (arrOut,arrIndexOut) that is a copy from arrIn for all cell ids not in [ idsOfSelectBg , idsOfSelectEnd ) and for cellIds in [ idsOfSelectBg , idsOfSelectEnd ) a copy coming from the corresponding values in input pair (srcArr, srcArrIndex). This method is an generalization of MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitly a result output arrays.
| [in] | idsOfSelectBg | begin of set of ids of the input extraction (included) |
| [in] | idsOfSelectEnd | end of set of ids of the input extraction (excluded) |
| [in] | arrIn | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [in] | srcArr | input array that will be used as source of copy for ids in [ idsOfSelectBg, idsOfSelectEnd ) |
| [in] | srcArrIndex | index array of srcArr |
| [out] | arrOut | the resulting array |
| [out] | arrIndexOut | the index array of the resulting array arrOut |
|
static |
This method works on an input pair (arrIn, arrIndxIn) where arrIn indexes is in arrIndxIn. This method builds an output pair (arrOut,arrIndexOut) that is a copy from arrIn for all cell ids not in [ idsOfSelectBg , idsOfSelectEnd ) and for cellIds in [idsOfSelectBg, idsOfSelectEnd) a copy coming from the corresponding values in input pair (srcArr, srcArrIndex). This method is an generalization of DataArrayInt::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitly a result output arrays.
| [in] | start | begin of set of ids of the input extraction (included) |
| [in] | end | end of set of ids of the input extraction (excluded) |
| [in] | step | step of the set of ids in range mode. |
| [in] | arrIn | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [in] | srcArr | input array that will be used as source of copy for ids in [idsOfSelectBg, idsOfSelectEnd) |
| [in] | srcArrIndex | index array of srcArr |
| [out] | arrOut | the resulting array |
| [out] | arrIndexOut | the index array of the resulting array arrOut |
References MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(), and MEDCoupling::DataArray::GetPosOfItemGivenBESRelativeNoThrow().
|
static |
This method works on an input pair (arrIn, arrIndxIn) where arrIn indexes is in arrIndxIn. This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignment do not modify the index in arrIndxIn.
| [in] | idsOfSelectBg | begin of set of ids of the input extraction (included) |
| [in] | idsOfSelectEnd | end of set of ids of the input extraction (excluded) |
| [in,out] | arrInOut | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [in] | srcArr | input array that will be used as source of copy for ids in [ idsOfSelectBg , idsOfSelectEnd ) |
| [in] | srcArrIndex | index array of srcArr |
|
static |
This method works on an input pair (arrIn, arrIndxIn) where arrIn indexes is in arrIndxIn. This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignment do not modify the index in arrIndxIn.
| [in] | start | begin of set of ids of the input extraction (included) |
| [in] | end | end of set of ids of the input extraction (excluded) |
| [in] | step | step of the set of ids in range mode. |
| [in,out] | arrInOut | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [in] | srcArr | input array that will be used as source of copy for ids in [idsOfSelectBg, idsOfSelectEnd) |
| [in] | srcArrIndex | index array of srcArr |
References MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative().
|
static |
This method works on an input pair (arr, arrIndx) where arr indexes is in arrIndx. This method will not impact the size of inout parameter arrIndx but the size of arr will be modified in case of suppression.
| [in] | idsToRemoveBg | begin of set of ids to remove in arr (included) |
| [in] | idsToRemoveEnd | end of set of ids to remove in arr (excluded) |
| [in,out] | arr | array in which the remove operation will be done. |
| [in,out] | arrIndx | array in the remove operation will modify |
| [in] | offsetForRemoval | (by default 0) offset so that for each i in [0,arrIndx->getNumberOfTuples()-1) removal process will be performed in the following range [arr+arrIndx[i]+offsetForRemoval,arr+arr[i+1]) |
|
static |
This method converts from VTK <= 9.3 polyhedra nodal connectivity to MED.
| [in] | arrIn | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [out] | arrOut | the resulting array |
| [out] | arrIndexOut | the index array of the resulting array arrOut |
|
static |
This method converts from VTK >= 9.4 polyhedra nodal connectivity to MED.
| [in] | arrIn | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [in] | arrIndxIn2 | is the input index array telling which is the faces id range in arrIndxIn of poly |
| [out] | arrOut | the resulting array |
| [out] | arrIndexOut | the index array of the resulting array arrOut |
|
static |
This method converts from VTK 9.3 polyhedra nodal connectivity to faces connectivity compatible with MEDCoupling1DGTUMesh(NORM_POLYGON).
| [in] | arrIn | arr origin array from which the extraction will be done. |
| [in] | arrIndxIn | is the input index array allowing to walk into arrIn |
| [out] | arrOut | the resulting array |
| [out] | arrIndexOut | the index array of the resulting array arrOut |
|
static |
Returns a new DataArrayInt containing an arithmetic progression that is equal to the sequence returned by Python range(begin,end,step ) function.
| [in] | begin | - the start value of the result sequence. |
| [in] | end | - limiting value, so that every value of the result array is less than end. |
| [in] | step | - specifies the increment or decrement. |
| If | step == 0. |
| If | end < begin && step > 0. |
| If | end > begin && step < 0. |
References MEDCoupling::DataArrayTools< T >::GetNumberOfItemGivenBESRelative().
| void MEDCoupling::DataArrayDiscrete< T >::getTinySerializationIntInformation | ( | std::vector< mcIdType > & | tinyInfo | ) | const |
Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. Server side.
| void MEDCoupling::DataArrayDiscrete< T >::getTinySerializationStrInformation | ( | std::vector< std::string > & | tinyInfo | ) | const |
Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. Server side.
| bool MEDCoupling::DataArrayDiscrete< T >::resizeForUnserialization | ( | const std::vector< mcIdType > & | tinyInfoI | ) |
Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. This method returns if a feeding is needed.
| void MEDCoupling::DataArrayDiscrete< T >::finishUnserialization | ( | const std::vector< mcIdType > & | tinyInfoI, |
| const std::vector< std::string > & | tinyInfoS | ||
| ) |
Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. This method returns if a feeding is needed.
|
protected |