Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MEDCoupling::DataArrayInt Class Reference
Inheritance diagram for MEDCoupling::DataArrayInt:
Collaboration diagram for MEDCoupling::DataArrayInt:

Public Member Functions

void abs ()
 
MemArray< int > & accessToMemArray ()
 
const MemArray< int > & accessToMemArray () const
 
void accumulate (int *res) const
 
int accumulate (int compId) const
 
DataArrayIntaccumulatePerChunck (const int *bgOfIndex, const int *endOfIndex) const
 
void addEqual (const DataArrayInt *other)
 
void aggregate (const DataArrayInt *other)
 
void applyDivideBy (int val)
 
void applyInv (int numerator)
 
void applyLin (int a, int b, int compoId)
 
void applyLin (int a, int b)
 
void applyModulus (int val)
 
void applyPow (int val)
 
void applyRModulus (int val)
 
void applyRPow (int val)
 
DataArrayIntbuildComplement (int nbOfElement) const
 
DataArrayIntbuildExplicitArrByRanges (const DataArrayInt *offsets) const
 
DataArrayIntbuildExplicitArrOfSliceOnScaledArr (int begin, int stop, int step) const
 
DataArrayIntbuildIntersection (const DataArrayInt *other) const
 
DataArrayIntbuildNewEmptyInstance () const
 
DataArrayIntbuildPermArrPerLevel () const
 
DataArrayIntbuildPermutationArr (const DataArrayInt &other) const
 
DataArrayIntbuildSubstraction (const DataArrayInt *other) const
 
DataArrayIntbuildSubstractionOptimized (const DataArrayInt *other) const
 
DataArrayIntbuildUnion (const DataArrayInt *other) const
 
DataArrayIntbuildUnique () const
 
DataArrayIntbuildUniqueNotSorted () const
 
void changeSurjectiveFormat (int targetNb, DataArrayInt *&arr, DataArrayInt *&arrI) const
 
int changeValue (int oldValue, int newValue)
 
bool checkAllIdsInRange (int vmin, int vmax) const
 
DataArrayIntcheckAndPreparePermutation () const
 
void checkMonotonic (bool increasing) const
 
void checkStrictlyMonotonic (bool increasing) const
 
DataArrayIntcomputeAbs () const
 
void computeOffsets ()
 
void computeOffsetsFull ()
 
DataArrayDoubleconvertToDblArr () const
 
int count (int value) const
 
DataArrayIntdeepCopy () const
 
DataArrayIntdeltaShiftIndex () const
 
void divideEqual (const DataArrayInt *other)
 
DataArrayIntduplicateEachTupleNTimes (int nbTimes) const
 
void fillWithZero ()
 
int findIdFirstEqual (int value) const
 
int findIdFirstEqual (const std::vector< int > &vals) const
 
int findIdFirstEqualTuple (const std::vector< int > &tupl) const
 
DataArrayIntfindIdInRangeForEachTuple (const DataArrayInt *ranges) const
 
DataArrayIntfindIdsEqual (int val) const
 
DataArrayIntfindIdsEqualList (const int *valsBg, const int *valsEnd) const
 
DataArrayIntfindIdsEqualTuple (const int *tupleBg, const int *tupleEnd) const
 
int findIdSequence (const std::vector< int > &vals) const
 
DataArrayIntfindIdsInRange (int vmin, int vmax) const
 
DataArrayIntfindIdsNotEqual (int val) const
 
DataArrayIntfindIdsNotEqualList (const int *valsBg, const int *valsEnd) const
 
DataArrayIntfindIdsNotInRange (int vmin, int vmax) const
 
void findIdsRangesInListOfIds (const DataArrayInt *listOfIds, DataArrayInt *&rangeIdsFetched, DataArrayInt *&idsInInputListThatFetch) const
 
DataArrayIntfindIdsStricltyNegative () const
 
DataArrayIntfindRangeIdForEachTuple (const DataArrayInt *ranges) const
 
void finishUnserialization (const std::vector< int > &tinyInfoI, const std::vector< std::string > &tinyInfoS)
 
DataArrayIntfromNoInterlace () const
 
DataArrayIntgetDifferentValues () const
 
int getHashCode () const
 
void getMinMaxValues (int &minValue, int &maxValue) const
 
void getTinySerializationIntInformation (std::vector< int > &tinyInfo) const
 
void getTinySerializationStrInformation (std::vector< std::string > &tinyInfo) const
 
void getTuple (int tupleId, int *res) const
 
bool hasUniqueValues () const
 
DataArrayIntindicesOfSubPart (const DataArrayInt &partOfThis) const
 
template<class InputIterator >
void insertAtTheEnd (InputIterator first, InputIterator last)
 
int intValue () const
 
DataArrayIntinvertArrayN2O2O2N (int oldNbOfElem) const
 
DataArrayIntinvertArrayO2N2N2O (int newNbOfElem) const
 
DataArrayIntinvertArrayO2N2N2OBis (int newNbOfElem) const
 
void iota (int init=0)
 
bool isEqual (const DataArrayInt &other) const
 
bool isEqualIfNotWhy (const DataArrayInt &other, std::string &reason) const
 
bool isEqualWithoutConsideringStr (const DataArrayInt &other) const
 
bool isEqualWithoutConsideringStrAndOrder (const DataArrayInt &other) const
 
bool isFittingWith (const std::vector< bool > &v) const
 
bool isIota (int sizeExpected) const
 
bool isMonotonic (bool increasing) const
 
bool isRange (int &strt, int &sttoopp, int &stteepp) const
 
bool isStrictlyMonotonic (bool increasing) const
 
bool isUniform (int val) const
 
DataArrayIntIteratoriterator ()
 
DataArrayIntkeepSelectedComponents (const std::vector< int > &compoIds) const
 
void meldWith (const DataArrayInt *other)
 
void modulusEqual (const DataArrayInt *other)
 
void multiplyEqual (const DataArrayInt *other)
 
DataArrayIntnegate () const
 
std::vector< DataArrayInt * > partitionByDifferentValues (std::vector< int > &differentIds) const
 
DataArrayIntperformCopyOrIncrRef (bool deepCopy) const
 
void powEqual (const DataArrayInt *other)
 
bool presenceOfTuple (const std::vector< int > &tupl) const
 
bool presenceOfValue (int value) const
 
bool presenceOfValue (const std::vector< int > &vals) const
 
std::string repr () const
 
void reprCppStream (const std::string &varName, std::ostream &stream) const
 
std::string reprNotTooLong () const
 
void reprNotTooLongStream (std::ostream &stream) const
 
void reprNotTooLongWithoutNameStream (std::ostream &stream) const
 
void reprQuickOverview (std::ostream &stream) const
 
void reprQuickOverviewData (std::ostream &stream, std::size_t maxNbOfByteInRepr) 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
 
bool resizeForUnserialization (const std::vector< int > &tinyInfoI)
 
DataArrayIntselectByTupleId (const int *new2OldBg, const int *new2OldEnd) const
 
DataArrayIntselectByTupleId (const DataArrayInt &di) const
 
DataArrayIntselectByTupleIdSafe (const int *new2OldBg, const int *new2OldEnd) const
 
DataArrayIntselectByTupleIdSafeSlice (int bg, int end2, int step) const
 
DataArrayIntselectByTupleRanges (const std::vector< std::pair< int, int > > &ranges) const
 
void setSelectedComponents (const DataArrayInt *a, const std::vector< int > &compoIds)
 
void sortEachPairToMakeALinkedList ()
 
void splitByValueRange (const int *arrBg, const int *arrEnd, DataArrayInt *&castArr, DataArrayInt *&rankInsideCast, DataArrayInt *&castsPresent) const
 
std::vector< std::pair< int,
int > > 
splitInBalancedSlices (int nbOfSlices) const
 
void substractEqual (const DataArrayInt *other)
 
DataArrayIntsumPerTuple () const
 
void switchOnTupleEqualTo (int val, std::vector< bool > &vec) const
 
void switchOnTupleNotEqualTo (int val, std::vector< bool > &vec) const
 
DataArrayInttoNoInterlace () const
 
void transformWithIndArr (const int *indArrBg, const int *indArrEnd)
 
DataArrayInttransformWithIndArrR (const int *indArrBg, const int *indArrEnd) const
 
void updateTime () const
 
void writeOnPlace (std::size_t id, int element0, const int *others, int sizeOfOthers)
 
void writeVTK (std::ostream &ofs, int indent, const std::string &type, const std::string &nameInFile, DataArrayByte *byteArr) const
 
- Public Member Functions inherited from MEDCoupling::DataArrayTemplate< int >
void alloc (std::size_t nbOfTuple, std::size_t nbOfCompo=1)
 
void allocIfNecessary (int nbOfTuple, int nbOfCompo)
 
int back () const
 
const int * begin () const
 
Traits< int >::ArrayType * changeNbOfComponents (int newNbOfComp, intdftValue) const
 
void checkAllocated () const
 
void circularPermutation (int nbOfShift=1)
 
void circularPermutationPerTuple (int nbOfShift=1)
 
void deepCopyFrom (const DataArrayTemplate< int > &other)
 
void desallocate ()
 
bool empty () const
 
const int * end () const
 
std::vector< MCAuto< typename
Traits< int >::ArrayTypeCh > > 
explodeComponents () const
 
void fillWithValue (intval)
 
int front () const
 
const int * getConstPointer () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
int getIJ (int tupleId, int compoId) const
 
int getIJSafe (int tupleId, int compoId) const
 
int getMaxValue (int &tupleId) const
 
int getMaxValueInArray () const
 
int getMinValue (int &tupleId) const
 
int getMinValueInArray () const
 
std::size_t getNbOfElemAllocated () const
 
std::size_t getNbOfElems () const
 
int getNumberOfTuples () const
 
int * getPointer ()
 
void * getVoidStarPointer ()
 
bool isAllocated () const
 
void pack () const
 
int popBackSilent ()
 
void pushBackSilent (intval)
 
void pushBackValsSilent (const int *valsBg, const int *valsEnd)
 
void reAlloc (std::size_t newNbOfTuple)
 
void rearrange (int newNbOfCompo)
 
Traits< int >::ArrayType * renumber (const int *old2New) const
 
Traits< int >::ArrayType * renumberAndReduce (const int *old2New, int newNbOfTuple) const
 
void renumberInPlace (const int *old2New)
 
void renumberInPlaceR (const int *new2Old)
 
Traits< int >::ArrayType * renumberR (const int *new2Old) const
 
void reserve (std::size_t nbOfElems)
 
void reverse ()
 
void reversePerTuple ()
 
MCAuto< typename Traits< int >
::ArrayTypeCh > 
selectPartDef (const PartDefinition *pd) const
 
void setContigPartOfSelectedValues (int tupleIdStart, const DataArray *aBase, const DataArrayInt *tuplesSelec)
 
void setContigPartOfSelectedValuesSlice (int tupleIdStart, const DataArray *aBase, int bg, int end2, int step)
 
void setIJ (int tupleId, int compoId, intnewVal)
 
void setIJSilent (int tupleId, int compoId, intnewVal)
 
void setPartOfValues1 (const typename Traits< int >::ArrayType *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true)
 
void setPartOfValues2 (const typename Traits< int >::ArrayType *a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp, bool strictCompoCompare=true)
 
void setPartOfValues3 (const typename Traits< int >::ArrayType *a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true)
 
void setPartOfValues4 (const typename Traits< int >::ArrayType *a, int bgTuples, int endTuples, int stepTuples, const int *bgComp, const int *endComp, bool strictCompoCompare=true)
 
void setPartOfValuesAdv (const typename Traits< int >::ArrayType *a, const DataArrayInt *tuplesSelec)
 
void setPartOfValuesSimple1 (inta, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp)
 
void setPartOfValuesSimple2 (inta, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp)
 
void setPartOfValuesSimple3 (inta, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp)
 
void setPartOfValuesSimple4 (inta, int bgTuples, int endTuples, int stepTuples, const int *bgComp, const int *endComp)
 
void sort (bool asc=true)
 
Traits< int >::ArrayType * subArray (int tupleIdBg, int tupleIdEnd=-1) const
 
void transpose ()
 
void useArray (const int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo)
 
void useExternalArrayWithRWAccess (const int *array, int nbOfTuple, int nbOfCompo)
 
- Public Member Functions inherited from MEDCoupling::DataArray
bool areInfoEquals (const DataArray &other) const
 
bool areInfoEqualsIfNotWhy (const DataArray &other, std::string &reason) const
 
void checkNbOfComps (int nbOfCompo, const std::string &msg) const
 
void checkNbOfElems (std::size_t nbOfElems, const std::string &msg) const
 
void checkNbOfTuples (int nbOfTuples, const std::string &msg) const
 
void checkNbOfTuplesAndComp (const DataArray &other, const std::string &msg) const
 
void checkNbOfTuplesAndComp (int nbOfTuples, int nbOfCompo, const std::string &msg) const
 
void copyPartOfStringInfoFrom (const DataArray &other, const std::vector< int > &compoIds)
 
void copyPartOfStringInfoFrom2 (const std::vector< int > &compoIds, const DataArray &other)
 
void copyStringInfoFrom (const DataArray &other)
 
std::string cppRepr (const std::string &varName) const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
std::string getInfoOnComponent (int i) const
 
const std::vector< std::string > & getInfoOnComponents () const
 
std::vector< std::string > & getInfoOnComponents ()
 
std::string getName () const
 
std::size_t getNumberOfComponents () const
 
std::string getUnitOnComponent (int i) const
 
std::vector< std::string > getUnitsOnComponent () const
 
std::string getVarOnComponent (int i) const
 
std::vector< std::string > getVarsOnComponent () const
 
void setInfoAndChangeNbOfCompo (const std::vector< std::string > &info)
 
void setInfoOnComponent (int 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 int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true)
 
- Public Member Functions inherited from MEDCoupling::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 

Static Public Member Functions

static DataArrayIntAdd (const DataArrayInt *a1, const DataArrayInt *a2)
 
static DataArrayIntAggregate (const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2)
 
static DataArrayIntAggregate (const std::vector< const DataArrayInt * > &arr)
 
static DataArrayIntAggregateIndexes (const std::vector< const DataArrayInt * > &arrs)
 
static DataArrayIntBuildIntersection (const std::vector< const DataArrayInt * > &arr)
 
static DataArrayIntBuildListOfSwitchedOff (const std::vector< bool > &v)
 
static DataArrayIntBuildListOfSwitchedOn (const std::vector< bool > &v)
 
static DataArrayIntBuildUnion (const std::vector< const DataArrayInt * > &arr)
 
static int * CheckAndPreparePermutation (const int *start, const int *end)
 
static DataArrayIntConvertIndexArrayToO2N (int nbOfOldTuples, const int *arr, const int *arrIBg, const int *arrIEnd, int &newNbOfTuples)
 
static DataArrayIntDivide (const DataArrayInt *a1, const DataArrayInt *a2)
 
static DataArrayIntFindPermutationFromFirstToSecond (const DataArrayInt *ids1, const DataArrayInt *ids2)
 
static DataArrayIntMakePartition (const std::vector< const DataArrayInt * > &groups, int newNb, std::vector< std::vector< int > > &fidsOfGroups)
 
static DataArrayIntMeld (const DataArrayInt *a1, const DataArrayInt *a2)
 
static DataArrayIntMeld (const std::vector< const DataArrayInt * > &arr)
 
static DataArrayIntModulus (const DataArrayInt *a1, const DataArrayInt *a2)
 
static DataArrayIntMultiply (const DataArrayInt *a1, const DataArrayInt *a2)
 
static DataArrayIntNew ()
 
static DataArrayIntPow (const DataArrayInt *a1, const DataArrayInt *a2)
 
static void PutIntoToSkylineFrmt (const std::vector< std::vector< int > > &v, DataArrayInt *&data, DataArrayInt *&dataIndex)
 
static DataArrayIntRange (int begin, int end, int step)
 
static void SetArrayIn (DataArrayInt *newArray, DataArrayInt *&arrayToSet)
 
static DataArrayIntSubstract (const DataArrayInt *a1, const DataArrayInt *a2)
 
- Static Public Member Functions inherited from MEDCoupling::DataArrayTemplate< int >
static MCAuto< typename Traits
< int >::ArrayTypeCh > 
NewFromStdVector (const typename std::vector< int > &v)
 
- Static Public Member Functions inherited from MEDCoupling::DataArray
static DataArrayAggregate (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 int GetNumberOfItemGivenBES (int begin, int end, int step, const std::string &msg)
 
static int GetNumberOfItemGivenBESRelative (int begin, int end, int step, const std::string &msg)
 
static int GetPosOfItemGivenBESRelativeNoThrow (int value, int begin, int end, int step)
 
static void GetSlice (int start, int stop, int step, int sliceId, int nbOfSlices, int &startSlice, int &stopSlice)
 
static std::string GetUnitFromInfo (const std::string &info)
 
static std::string GetVarNameFromInfo (const std::string &info)
 

Additional Inherited Members

- Protected Member Functions inherited from MEDCoupling::DataArrayTemplate< int >
Traits< int >::ArrayType * myKeepSelectedComponents (const std::vector< int > &compoIds) const
 
Traits< int >::ArrayType * mySelectByTupleId (const int *new2OldBg, const int *new2OldEnd) const
 
Traits< int >::ArrayType * mySelectByTupleId (const DataArrayInt &di) const
 
Traits< int >::ArrayType * mySelectByTupleIdSafe (const int *new2OldBg, const int *new2OldEnd) const
 
Traits< int >::ArrayType * mySelectByTupleIdSafeSlice (int bg, int end2, int step) const
 
Traits< int >::ArrayType * mySelectByTupleRanges (const std::vector< std::pair< int, int > > &ranges) const
 
- Static Protected Member Functions inherited from MEDCoupling::DataArray
static void CheckClosingParInRange (int ref, int value, const std::string &msg)
 
static void CheckValueInRange (int ref, int value, const std::string &msg)
 
static void CheckValueInRangeEx (int value, int start, int end, const std::string &msg)
 
static int EffectiveCircPerm (int nbOfShift, int nbOfTuples)
 
- Protected Attributes inherited from MEDCoupling::DataArrayTemplate< int >
MemArray< int > _mem
 

Member Function Documentation

DataArrayInt * DataArrayInt::New ( )
static

Returns a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.

Referenced by accumulatePerChunck(), Add(), MEDCoupling::MEDFileUMesh::addNodeGroup(), Aggregate(), AggregateIndexes(), MEDCoupling::MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(), MEDCoupling::MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(), MEDCoupling::MEDCouplingUMesh::AggregateSortedByTypeMeshesOnSameCoords(), MEDCoupling::MEDCouplingUMesh::allocateCells(), MEDCoupling::MEDCoupling1SGTUMesh::allocateCells(), MEDCoupling::MEDCoupling1DGTUMesh::allocateCells(), MEDCoupling::MEDCouplingUMesh::areCellsIncludedInPolicy7(), MEDCoupling::MEDCouplingUMesh::Build0DMeshFromCoords(), MEDCoupling::MEDCouplingStructuredMesh::Build1GTNodalConnectivity(), MEDCoupling::MEDCouplingUMesh::buildBoundaryMesh(), buildComplement(), MEDCoupling::DataArrayIntTuple::buildDAInt(), MEDCoupling::MEDCouplingFieldDiscretizationPerCell::buildDiscrPerCellIfNecessary(), buildExplicitArrByRanges(), buildExplicitArrOfSliceOnScaledArr(), MEDCoupling::MEDCouplingStructuredMesh::BuildExplicitIdsFrom(), MEDCoupling::MEDCouplingUMesh::buildFacePartOfMySelfNode(), MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group(), BuildIntersection(), BuildListOfSwitchedOff(), BuildListOfSwitchedOn(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::buildNbOfGaussPointPerCellField(), buildNewEmptyInstance(), MEDCoupling::MEDCouplingStructuredMesh::buildPartAndReduceNodes(), MEDCoupling::MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords(), MEDCoupling::MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoordsSlice(), buildPermArrPerLevel(), buildPermutationArr(), MEDCoupling::MEDCouplingGaussLocalization::buildRefCell(), MEDCoupling::MEDCouplingUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1SGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1DGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCouplingUMesh::buildSlice3D(), MEDCoupling::MEDCouplingUMesh::buildSlice3DSurf(), MEDCoupling::MEDCouplingFieldDiscretizationP0::buildSubMeshData(), buildSubstraction(), buildSubstractionOptimized(), BuildUnion(), MEDCoupling::MEDCouplingUMesh::buildUnionOf3DMesh(), buildUnique(), buildUniqueNotSorted(), MEDCoupling::MEDCoupling1SGTUMesh::buildUnstructured(), MEDCoupling::MEDCoupling1DGTUMesh::buildUnstructured(), MEDCoupling::MEDCouplingFieldDouble::cellToNodeDiscretization(), changeSurjectiveFormat(), checkAndPreparePermutation(), MEDCoupling::MEDCouplingPointSet::checkDeepEquivalWith(), MEDCoupling::MEDFileField1TSWithoutSDA::CheckSBTMesh(), MEDCoupling::MEDCouplingUMesh::checkTypeConsistencyAndContig(), MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane(), MEDCoupling::MEDCouplingUMesh::colinearize2D(), computeAbs(), MEDCoupling::MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne(), MEDCoupling::MEDCouplingStructuredMesh::ComputeCornersGhost(), MEDCoupling::MEDCoupling1SGTUMesh::computeEffectiveNbOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeEffectiveNbOfNodesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeEffectiveNbOfNodesPerCell(), MEDCoupling::MEDCoupling1SGTUMesh::computeFetchedNodeIds(), MEDCoupling::MEDCoupling1DGTUMesh::computeFetchedNodeIds(), MEDCoupling::MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds(), MEDCoupling::MEDCouplingStructuredMesh::computeNbOfFacesPerCell(), MEDCoupling::MEDCouplingMappedExtrudedMesh::computeNbOfFacesPerCell(), MEDCoupling::MEDCoupling1SGTUMesh::computeNbOfFacesPerCell(), MEDCoupling::MEDCouplingUMesh::computeNbOfFacesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeNbOfFacesPerCell(), MEDCoupling::DataArrayDouble::computeNbOfInteractionsWith(), MEDCoupling::MEDCouplingStructuredMesh::computeNbOfNodesPerCell(), MEDCoupling::MEDCouplingMappedExtrudedMesh::computeNbOfNodesPerCell(), MEDCoupling::MEDCoupling1SGTUMesh::computeNbOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeNbOfNodesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeNbOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeNeighborsOfCells(), MEDCoupling::MEDCouplingUMesh::ComputeNeighborsOfCellsAdv(), MEDCoupling::MEDCouplingUMesh::computeNeighborsOfNodes(), MEDCoupling::MEDCouplingUMesh::computeSkin(), MEDCoupling::MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(), MEDCoupling::DataArrayDouble::computeTupleIdsNearTuples(), MEDCoupling::MEDCouplingFieldDiscretizationP0::computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingUMesh::conformize2D(), MEDCoupling::MEDCouplingUMesh::conformize3D(), MEDCoupling::MEDCouplingUMesh::convertCellArrayPerGeoType(), MEDCoupling::MEDCouplingUMesh::convertExtrudedPolyhedra(), ConvertIndexArrayToO2N(), MEDCoupling::MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh(), MEDCoupling::MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh(), MEDCoupling::MEDCouplingUMesh::convertQuadraticCellsToLinear(), MEDCoupling::DataArrayDouble::convertToIntArr(), MEDCoupling::MEDCouplingUMesh::convertToPolyTypes(), MEDCoupling::MEDCouplingUMesh::convexEnvelop2D(), deltaShiftIndex(), MEDCoupling::MEDCouplingUMesh::distanceToPoints(), Divide(), duplicateEachTupleNTimes(), MEDCoupling::MEDCouplingUMesh::emulateMEDMEMBDC(), MEDCoupling::MEDCoupling1SGTUMesh::explodeEachHexa8To6Quad4(), MEDCoupling::MEDCouplingUMesh::ExtractFromIndexedArrays(), MEDCoupling::MEDCouplingUMesh::ExtractFromIndexedArraysSlice(), MEDCoupling::MEDCoupling1SGTUMesh::fillCellIdsToKeepFromNodeIds(), MEDCoupling::MEDCoupling1DGTUMesh::fillCellIdsToKeepFromNodeIds(), MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DCells(), MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells(), MEDCoupling::MEDCouplingUMesh::findCellIdsLyingOn(), MEDCoupling::MEDCouplingUMesh::findCellIdsOnBoundary(), MEDCoupling::DataArrayDouble::findClosestTupleId(), MEDCoupling::MEDCouplingUMesh::findCommonCells(), MEDCoupling::MEDCouplingUMesh::FindCommonCellsAlg(), MEDCoupling::DataArrayDouble::findCommonTuples(), findIdInRangeForEachTuple(), findIdsEqual(), findIdsEqualList(), findIdsEqualTuple(), MEDCoupling::DataArrayDouble::findIdsInRange(), findIdsInRange(), findIdsNotEqual(), findIdsNotEqualList(), MEDCoupling::DataArrayDouble::findIdsNotInRange(), findIdsNotInRange(), findIdsRangesInListOfIds(), findIdsStricltyNegative(), MEDCoupling::MEDCouplingUMesh::findNodesToDuplicate(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::findPatchesInTheNeighborhoodOf(), findRangeIdForEachTuple(), fromNoInterlace(), MEDCoupling::MEDCouplingUMesh::FuseUMeshesOnSameCoords(), MEDCoupling::MEDCouplingUMesh::generateGraph(), MEDCoupling::MEDFileMesh::getAllFamiliesIdsReferenced(), MEDCoupling::MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds(), MEDCoupling::MEDCouplingMesh::getCellsContainingPoints(), MEDCoupling::MEDCouplingUMesh::getCellsInBoundingBox(), getDifferentValues(), MEDCoupling::MEDCouplingUMesh::getLevArrPerCellTypes(), MEDCoupling::MEDCouplingUMesh::getMeasureFieldOnNode(), MEDCoupling::MEDCouplingUMesh::getNodeIdsInUse(), MEDCoupling::MEDCoupling1SGTUMesh::getNodeIdsInUse(), MEDCoupling::MEDCoupling1DGTUMesh::getNodeIdsInUse(), MEDCoupling::MEDCouplingFieldDiscretizationP0::getOffsetArr(), MEDCoupling::MEDCouplingFieldDiscretizationOnNodes::getOffsetArr(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getOffsetArr(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getOffsetArr(), MEDCoupling::MEDFileMesh::getOrCreateAndGetFamilyFieldAtLevel(), MEDCoupling::MEDCouplingStructuredMesh::giveCellsWithType(), MEDCoupling::MEDCoupling1GTUMesh::giveCellsWithType(), MEDCoupling::MEDCouplingMappedExtrudedMesh::giveCellsWithType(), MEDCoupling::MEDCouplingUMesh::giveCellsWithType(), indicesOfSubPart(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), invertArrayN2O2O2N(), invertArrayO2N2N2O(), invertArrayO2N2N2OBis(), MEDCoupling::MEDCouplingUMesh::keepCellIdsByType(), MEDCoupling::MEDCouplingUMesh::keepSpecifiedCells(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), MEDCoupling::MEDFileStructuredMesh::loadStrMeshFromFile(), MakePartition(), MEDCoupling::DataArrayDouble::maxPerTupleWithCompoId(), Meld(), MEDCoupling::MEDCouplingUMesh::MergeUMeshesOnSameCoords(), Modulus(), Multiply(), negate(), MEDCoupling::MEDCoupling1SGTUMesh::New(), MEDCoupling::MEDCoupling1DGTUMesh::New(), MEDCoupling::MEDCouplingUMesh::orderConsecutiveCells1D(), MEDCoupling::ParaMESH::ParaMESH(), partitionByDifferentValues(), MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::partOfThisLyingOnSpecifiedTimeSteps(), MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::partOfThisNotLyingOnSpecifiedTimeSteps(), Pow(), PutIntoToSkylineFrmt(), Range(), MEDCoupling::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes(), MEDCoupling::MEDCoupling1SGTUMesh::renumberCells(), MEDCoupling::MEDCouplingUMesh::renumberCells(), MEDCoupling::MEDCoupling1DGTUMesh::renumberCells(), MEDCoupling::MEDCouplingMappedExtrudedMesh::resizeForUnserialization(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::resizeForUnserialization(), MEDCoupling::MEDCoupling1DGTUMesh::resizeForUnserialization(), MEDCoupling::MEDCouplingCurveLinearMesh::serialize(), MEDCoupling::MEDCouplingCMesh::serialize(), MEDCoupling::MEDCouplingUMesh::serialize(), MEDCoupling::MEDCouplingIMesh::serialize(), MEDCoupling::MEDCouplingMappedExtrudedMesh::serialize(), MEDCoupling::MEDCoupling1SGTUMesh::serialize(), MEDCoupling::MEDCoupling1DGTUMesh::serialize(), MEDCoupling::MEDFileUMesh::setCoords(), MEDCoupling::MEDCouplingUMesh::SetPartOfIndexedArrays(), MEDCoupling::MEDCouplingUMesh::SetPartOfIndexedArraysSlice(), MEDCoupling::MEDCoupling1DGTUMesh::simplexize(), MEDCoupling::MEDCouplingUMesh::simplifyPolyhedra(), MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell(), MEDCoupling::MEDCoupling1SGTUMesh::sortHexa8EachOther(), splitByValueRange(), Substract(), sumPerTuple(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), toNoInterlace(), transformWithIndArrR(), MEDCoupling::MEDCouplingUMesh::unserialization(), MEDCoupling::MEDCouplingMappedExtrudedMesh::unserialization(), MEDCoupling::MEDCoupling1SGTUMesh::unserialization(), MEDCoupling::MEDCoupling1DGTUMesh::unserialization(), MEDCoupling::MEDCouplingUMesh::writeVTKLL(), and MEDCoupling::MEDFileUMesh::zipCoords().

int DataArrayInt::intValue ( ) const

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.

Returns
double - the sole value stored in this array.
Exceptions
Ifat least one of conditions stated above is not fulfilled.

References MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< int >::isAllocated().

int DataArrayInt::getHashCode ( ) const

Returns an integer value characterizing this array, which is useful for a quick comparison of many instances of DataArrayInt.

Returns
int - the hash value.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), and MEDCoupling::DataArrayTemplate< int >::getNbOfElems().

Referenced by MEDCoupling::MEDCoupling1SGTUMesh::checkFastEquivalWith(), and MEDCoupling::MEDCoupling1DGTUMesh::checkFastEquivalWith().

DataArrayInt * DataArrayInt::performCopyOrIncrRef ( bool  dCpy) const

Returns either a deep or shallow copy of this array. For more info see Deep copy of DataArray and Shallow copy of DataArray.

Parameters
[in]dCpy- if true, a deep copy is returned, else, a shallow one.
Returns
DataArrayInt * - either a new instance of DataArrayInt (if dCpy == true) or this instance (if dCpy == false).

References deepCopy(), and MEDCoupling::RefCountObjectOnly::incrRef().

DataArrayInt* MEDCoupling::DataArrayInt::buildNewEmptyInstance ( ) const
virtual

Implements MEDCoupling::DataArray.

References New().

bool DataArrayInt::isEqual ( const DataArrayInt other) const

Checks if this and another DataArrayInt are fully equal. For more info see Compare DataArrays.

Parameters
[in]other- an instance of DataArrayInt to compare with this one.
Returns
bool - true if the two arrays are equal, false else.

References isEqualIfNotWhy().

Referenced by MEDCoupling::MEDFileUMesh::isEqual(), and MEDCoupling::MEDFileStructuredMesh::isEqual().

bool DataArrayInt::isEqualIfNotWhy ( const DataArrayInt other,
std::string &  reason 
) const

Equivalent to DataArrayInt::isEqual except that if false the reason of mismatch is given.

Parameters
[in]otherthe instance to be compared with this
[out]reasonIn case of inequality returns the reason.
See Also
DataArrayInt::isEqual

References MEDCoupling::DataArrayTemplate< int >::_mem, MEDCoupling::DataArrayTemplate< T >::_mem, MEDCoupling::DataArray::areInfoEqualsIfNotWhy(), and MEDCoupling::MemArray< T >::isEqual().

Referenced by isEqual(), MEDCoupling::MEDCouplingUMesh::isEqualIfNotWhy(), and MEDCoupling::MEDCouplingFieldDiscretizationPerCell::isEqualIfNotWhy().

bool DataArrayInt::isEqualWithoutConsideringStr ( const DataArrayInt other) const

Checks if values of this and another DataArrayInt are equal. For more info see Compare DataArrays.

Parameters
[in]other- an instance of DataArrayInt to compare with this one.
Returns
bool - true if the values of two arrays are equal, false else.

References MEDCoupling::DataArrayTemplate< int >::_mem, MEDCoupling::DataArrayTemplate< T >::_mem, and MEDCoupling::MemArray< T >::isEqual().

Referenced by MEDCoupling::MEDCouplingUMesh::isEqualWithoutConsideringStr(), MEDCoupling::MEDCouplingFieldDiscretizationPerCell::isEqualWithoutConsideringStr(), isEqualWithoutConsideringStrAndOrder(), and MEDCoupling::ReadFieldNode().

bool DataArrayInt::isEqualWithoutConsideringStrAndOrder ( const DataArrayInt other) const

Checks if values of this and another DataArrayInt are equal. Comparison is performed on sorted value sequences. For more info seeCompare DataArrays.

Parameters
[in]other- an instance of DataArrayInt to compare with this one.
Returns
bool - true if the sorted values of two arrays are equal, false else.

References deepCopy(), isEqualWithoutConsideringStr(), and MEDCoupling::DataArrayTemplate< T >::sort().

bool DataArrayInt::isFittingWith ( const std::vector< bool > &  v) const

This method compares content of input vector v and this. If for each id in this v[id]==True and for all other ids id2 not in this v[id2]==False, true is returned. For performance reasons this is expected to be sorted ascendingly. If not an exception will be thrown.

Parameters
[in]v- the vector of 'flags' to be compared with this.
Exceptions
Ifthis is not sorted ascendingly.
Ifthis has not exactly one component.
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::end(), and MEDCoupling::DataArray::getNumberOfComponents().

void DataArrayInt::switchOnTupleEqualTo ( int  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.

See Also
DataArrayInt::switchOnTupleNotEqualTo.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

Referenced by MEDCoupling::MEDFileMesh::rearrangeFamilies().

void DataArrayInt::switchOnTupleNotEqualTo ( int  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.

See Also
DataArrayInt::switchOnTupleEqualTo.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

DataArrayInt * DataArrayInt::buildPermutationArr ( const DataArrayInt 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.

Parameters
[in]other- an array to compute permutation to.
Returns
DataArrayInt * - a new instance of DataArrayInt, which is a permutation array from this to other. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 1.
Ifother->getNumberOfComponents() != 1.
Ifthis->getNumberOfTuples() != other->getNumberOfTuples().
Ifother includes a value which is not in this array.

Here is a C++ example.

Here is a Python example.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::fillWithValue(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * DataArrayInt::indicesOfSubPart ( const DataArrayInt 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.

Parameters
[in]partOfThis- A 1 compo allocated array
Returns
- A newly allocated array to be dealed by caller having the same number of tuples than partOfThis.
Exceptions
iftwo same element is present twice in this
ifan element in partOfThis is NOT in this.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and New().

DataArrayInt * DataArrayInt::sumPerTuple ( ) const

Computes for each tuple the sum of number of components values in the tuple and return it.

Returns
DataArrayInt * - the new instance of DataArrayInt containing the same number of tuples as this array and one component. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::checkMonotonic ( bool  increasing) const

Checks that this array is consistently increasing or decreasing in value. If not an exception is thrown.

Parameters
[in]increasing- if true, the array values should be increasing.
Exceptions
Ifsequence of values is not strictly monotonic in agreement with increasing arg.
Ifthis->getNumberOfComponents() != 1.
Ifthis is not allocated.

References isMonotonic().

bool DataArrayInt::isMonotonic ( bool  increasing) const

Checks that this array is consistently increasing or decreasing in value.

Parameters
[in]increasing- if true, array values should be increasing.
Returns
bool - true if values change in accordance with increasing arg.
Exceptions
Ifthis->getNumberOfComponents() != 1.
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

Referenced by MEDCoupling::MEDCoupling1DGTUMesh::checkConsistency(), and checkMonotonic().

void DataArrayInt::checkStrictlyMonotonic ( bool  increasing) const

This method check that array consistently INCREASING or DECREASING in value.

References isStrictlyMonotonic().

Referenced by MEDCoupling::MEDFileMesh::addGroupUnderground().

bool DataArrayInt::isStrictlyMonotonic ( bool  increasing) const
std::string DataArrayInt::repr ( ) const

Returns a textual and human readable representation of this instance of DataArrayInt. This text is shown when a DataArrayInt is printed in Python.

Returns
std::string - text describing this DataArrayInt.
See Also
reprNotTooLong, reprZip

References reprStream().

std::string DataArrayInt::reprZip ( ) const

References reprZipStream().

std::string DataArrayInt::reprNotTooLong ( ) const

This method is close to repr method except that when this has more than 1000 tuples, all tuples are not printed out to avoid to consume too much space in interpretor.

See Also
repr

References reprNotTooLongStream().

void DataArrayInt::reprStream ( std::ostream &  stream) const
virtual
void DataArrayInt::reprZipStream ( std::ostream &  stream) const
virtual
void DataArrayInt::reprNotTooLongStream ( std::ostream &  stream) const
void DataArrayInt::reprWithoutNameStream ( std::ostream &  stream) const
virtual
void DataArrayInt::reprQuickOverview ( std::ostream &  stream) const
virtual
void DataArrayInt::reprQuickOverviewData ( std::ostream &  stream,
std::size_t  maxNbOfByteInRepr 
) const
virtual
void DataArrayInt::transformWithIndArr ( const int *  indArrBg,
const int *  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.

Parameters
[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 ].
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifany value of this can't be used as a valid index for [indArrBg, indArrEnd).
See Also
changeValue

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

Referenced by MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), MEDCoupling::MEDCouplingUMesh::emulateMEDMEMBDC(), MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell(), and MEDCoupling::MEDCouplingUMesh::writeVTKLL().

DataArrayInt * DataArrayInt::transformWithIndArrR ( const int *  indArrBg,
const int *  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.

Parameters
[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 ].
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 1.
Ifany value of this array is not a valid index for indArrBg array.
Ifany value of indArrBg is not a valid index for this array.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::fillWithValue(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::splitByValueRange ( const int *  arrBg,
const int *  arrEnd,
DataArrayInt *&  castArr,
DataArrayInt *&  rankInsideCast,
DataArrayInt *&  castsPresent 
) const

Computes distribution of values of this one-dimensional array between given value ranges (casts). This method is typically useful for entity number spliting by types, for example.

Warning
The values contained in arrBg should be sorted ascendently. No check of this is be done. If not, the result is not warranted.
Parameters
[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 :

  • castArr : [1,1,0,0,0,1,1,0,1]
  • rankInsideCast: [2,1,0,3,2,3,4,1,0]
  • castsPresent : [0,1]

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.

Exceptions
Ifthis->getNumberOfComponents() != 1.
IfarrEnd - arrBg < 2.
Ifany value of this is not less than arrEnd[-1].

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingUMesh::splitProfilePerType().

bool DataArrayInt::isRange ( int &  strt,
int &  sttoopp,
int &  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.

Parameters
[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.
Returns
the verdict of the check.
See Also
DataArray::GetNumberOfItemGivenBES

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

DataArrayInt * DataArrayInt::invertArrayO2N2N2O ( int  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.

Parameters
[in]newNbOfElem- the number of tuples in the result array.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.

Here is a C++ example.
Here is a Python example.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationOnNodes::buildSubMeshData(), MEDCoupling::MEDCouplingFieldDiscretizationOnNodes::buildSubMeshDataRange(), FindPermutationFromFirstToSecond(), MEDCoupling::MEDCoupling1SGTUMesh::renumberCells(), MEDCoupling::MEDCouplingUMesh::renumberCells(), MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell(), and MEDCoupling::MEDCouplingPointSet::zipConnectivityTraducer().

DataArrayInt * DataArrayInt::invertArrayN2O2O2N ( int  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.

Parameters
[in]newNbOfElem- the number of tuples in the result array.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.

Here is a C++ example.

Here is a Python example.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * DataArrayInt::invertArrayO2N2N2OBis ( int  newNbOfElem) const
DataArrayInt * DataArrayInt::fromNoInterlace ( ) const

Returns a new DataArrayInt holding the same values as this array but differently arranged in memory. If this array holds 2 components of 3 values: $ x_0,x_1,x_2,y_0,y_1,y_2 $, then the result array holds these values arranged as follows: $ x_0,y_0,x_1,y_1,x_2,y_2 $.

Warning
Do not confuse this method with transpose()!
Returns
DataArrayInt * - the new instance of DataArrayInt that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< int >::_mem, MEDCoupling::C_DEALLOC, MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::MemArray< T >::fromNoInterlace(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::MemArray< T >::isNull(), New(), and MEDCoupling::DataArrayTemplate< T >::useArray().

DataArrayInt * DataArrayInt::toNoInterlace ( ) const

Returns a new DataArrayInt holding the same values as this array but differently arranged in memory. If this array holds 2 components of 3 values: $ x_0,y_0,x_1,y_1,x_2,y_2 $, then the result array holds these values arranged as follows: $ x_0,x_1,x_2,y_0,y_1,y_2 $.

Warning
Do not confuse this method with transpose()!
Returns
DataArrayInt * - the new instance of DataArrayInt that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< int >::_mem, MEDCoupling::C_DEALLOC, MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::MemArray< T >::isNull(), New(), MEDCoupling::MemArray< T >::toNoInterlace(), and MEDCoupling::DataArrayTemplate< T >::useArray().

DataArrayInt* MEDCoupling::DataArrayInt::selectByTupleId ( const DataArrayInt di) const
DataArrayInt* MEDCoupling::DataArrayInt::keepSelectedComponents ( const std::vector< int > &  compoIds) const
virtual
DataArrayInt* MEDCoupling::DataArrayInt::selectByTupleRanges ( const std::vector< std::pair< int, int > > &  ranges) const
virtual
DataArrayInt * DataArrayInt::checkAndPreparePermutation ( ) const

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.

Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.
Ifthere are equal values in this array.

References MEDCoupling::C_DEALLOC, MEDCoupling::DataArrayTemplate< int >::checkAllocated(), CheckAndPreparePermutation(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), New(), and MEDCoupling::DataArrayTemplate< T >::useArray().

Referenced by MEDCoupling::MEDFileField1TSWithoutSDA::CheckSBTMesh(), FindPermutationFromFirstToSecond(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(), MEDCoupling::MEDCoupling1SGTUMesh::renumberCells(), and MEDCoupling::MEDCoupling1DGTUMesh::renumberCells().

DataArrayInt * DataArrayInt::FindPermutationFromFirstToSecond ( const DataArrayInt ids1,
const DataArrayInt ids2 
)
static

This method tries to find the permutation to apply to the first input ids1 to obtain the same array (without considering strings informations) 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 (no throw) : ids1->renumber(ret)->isEqual(ids2) where ret is the return of this method.

Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifeither ids1 or ids2 is null not allocated or not with one components.

References checkAndPreparePermutation(), deepCopy(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), invertArrayO2N2N2O(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), and selectByTupleIdSafe().

void DataArrayInt::changeSurjectiveFormat ( int  targetNb,
DataArrayInt *&  arr,
DataArrayInt *&  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: [0,3,2,3,2,2,1,2]
  • targetNb: 4
  • arr: [0, 6, 2,4,5,7, 1,3]
  • arrI: [0,1,2,6,8]

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.

Parameters
[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.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.
Ifany value in this is more or equal to targetNb.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getIJ(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * DataArrayInt::ConvertIndexArrayToO2N ( int  nbOfOldTuples,
const int *  arr,
const int *  arrIBg,
const int *  arrIEnd,
int &  newNbOfTuples 
)
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:

  • nbOfOldTuples: 10
  • arr : [0,3, 5,7,9]
  • arrIBg : [0,2,5]
  • newNbOfTuples: 7
  • result array : [0,1,2,0,3,4,5,4,6,4]
Parameters
[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.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifany value of arr breaks condition ( 0 <= arr[ i ] < nbOfOldTuples ).

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::DataArrayDouble::areIncludedInMe(), MEDCoupling::MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat(), MEDCoupling::DataArrayDouble::getDifferentValues(), MEDCoupling::MEDCouplingUMesh::MergeNodesOnUMeshesSharingSameCoords(), and MEDCoupling::MEDCouplingPointSet::zipConnectivityTraducer().

DataArrayInt * DataArrayInt::buildPermArrPerLevel ( ) const

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:

  • this: [2,0,1,1,0,1,2,0,1,1,0,0]
  • result: [10,0,5,6,1,7,11,2,8,9,3,4]
  • after applying result to this: [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2]
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec(), and MEDCoupling::MEDFileUMesh::unPolyze().

bool DataArrayInt::isIota ( int  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.

Parameters
[in]sizeExpected- The number of elements expected.
Returns
bool - true if this array contents == range( this->getNumberOfTuples())
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

Referenced by MEDCoupling::MEDCouplingPointSet::checkDeepEquivalOnSameNodesWith(), MEDCoupling::MEDCouplingPointSet::checkDeepEquivalWith(), MEDCoupling::MEDCoupling1GTUMesh::splitProfilePerType(), MEDCoupling::MEDCouplingStructuredMesh::splitProfilePerType(), MEDCoupling::MEDCouplingUMesh::splitProfilePerType(), MEDCoupling::MEDFileUMesh::unPolyze(), and MEDCoupling::WriteField().

bool DataArrayInt::isUniform ( int  val) const

Checks if all values in this array are equal to val.

Parameters
[in]val- value to check equality of array values to.
Returns
bool - true if all values are val.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

bool DataArrayInt::hasUniqueValues ( ) const
void DataArrayInt::meldWith ( const DataArrayInt other)
void DataArrayInt::setSelectedComponents ( const DataArrayInt a,
const std::vector< int > &  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.

Parameters
[in]a- the array to copy data from.
[in]compoIds- sequence of zero based indices of components, data of which is to be copied.
Exceptions
Ifa is NULL.
IfcompoIds.size() != a->getNumberOfComponents().
IfcompoIds[i] < 0 or compoIds[i] > this->getNumberOfComponents().

Here is a Python example.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::copyPartOfStringInfoFrom2(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

void MEDCoupling::DataArrayInt::getTuple ( int  tupleId,
int *  res 
) const
void DataArrayInt::SetArrayIn ( DataArrayInt newArray,
DataArrayInt *&  arrayToSet 
)
static

Assign pointer to one array to a pointer to another appay. Reference counter of arrayToSet is incremented / decremented.

Parameters
[in]newArray- the pointer to array to assign to arrayToSet.
[in,out]arrayToSet- the pointer to array to assign to.

References MEDCoupling::RefCountObjectOnly::decrRef(), and MEDCoupling::RefCountObjectOnly::incrRef().

Referenced by MEDCoupling::MEDCouplingUMesh::setConnectivity().

DataArrayIntIterator * DataArrayInt::iterator ( )
DataArrayInt * DataArrayInt::findIdsNotEqual ( int  val) const

Creates a new DataArrayInt containing IDs (indices) of tuples holding value not equal to a given one.

Parameters
[in]val- the value to ignore within this.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * DataArrayInt::findIdsEqualList ( const int *  valsBg,
const int *  valsEnd 
) const

Creates a new DataArrayInt containing IDs (indices) of tuples holding value equal to one of given values.

Parameters
[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 ].
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDFileMesh::ensureDifferentFamIdsPerLevel().

DataArrayInt * DataArrayInt::findIdsNotEqualList ( const int *  valsBg,
const int *  valsEnd 
) const

Creates a new DataArrayInt containing IDs (indices) of tuples holding values not equal to any of given values.

Parameters
[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 ].
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * DataArrayInt::findIdsEqualTuple ( const int *  tupleBg,
const int *  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.

Parameters
[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.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != std::distance(tupleBg,tupleEnd).
Ifthis->getNumberOfComponents() is equal to 0.
See Also
DataArrayInt::findIdsEqual

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArray::getNumberOfComponents(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().

int DataArrayInt::changeValue ( int  oldValue,
int  newValue 
)

Assigns newValue to all elements holding oldValue within this one-dimensional array.

Parameters
[in]oldValue- the value to replace.
[in]newValue- the value to assign.
Returns
int - number of replacements performed.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

Referenced by MEDCoupling::MEDFileStructuredMesh::changeFamilyIdArr(), and MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine().

int DataArrayInt::findIdFirstEqualTuple ( const std::vector< int > &  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.

Returns
tuple id where tupl is. -1 if no such tuple exists in this.
See Also
DataArrayInt::findIdSequence, DataArrayInt::presenceOfTuple.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), and MEDCoupling::DataArray::getNumberOfComponents().

Referenced by presenceOfTuple().

int DataArrayInt::findIdFirstEqual ( int  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.

See Also
DataArrayInt::presenceOfValue

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

Referenced by presenceOfValue().

int DataArrayInt::findIdFirstEqual ( const std::vector< int > &  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.

See Also
DataArrayInt::presenceOfValue

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

int DataArrayInt::findIdSequence ( const std::vector< int > &  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.

See Also
DataArrayInt::findIdFirstEqualTuple

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), and MEDCoupling::DataArray::getNumberOfComponents().

bool DataArrayInt::presenceOfTuple ( const std::vector< int > &  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.

See Also
DataArrayInt::findIdFirstEqualTuple

References findIdFirstEqualTuple().

bool DataArrayInt::presenceOfValue ( int  value) const
bool DataArrayInt::presenceOfValue ( const std::vector< int > &  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.

See Also
DataArrayInt::findIdFirstEqual

References findIdFirstEqual().

int DataArrayInt::count ( int  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.

Returns
a value in [ 0, this->getNumberOfTuples() )
Exceptions
Ifthis is not allocated

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

void DataArrayInt::accumulate ( int *  res) const

Accumulates values of each component of this array.

Parameters
[out]res- an array of length this->getNumberOfComponents(), allocated by the caller, that is filled by this method with sum value for each component.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getMeasureField(), and splitInBalancedSlices().

DataArrayInt * DataArrayInt::accumulatePerChunck ( const int *  bgOfIndex,
const int *  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).

Parameters
[in]bgOfIndex- begin (included) of the input index array.
[in]endOfIndex- end (excluded) of the input index array.
Returns
DataArrayInt * - the new instance having the same number of components than this.
Exceptions
IfbgOfIndex or end is NULL.
Ifinput index array is not ascendingly sorted.
Ifthere is an id in [ bgOfIndex, endOfIndex ) not in [0, this->getNumberOfTuples).
Ifstd::distance(bgOfIndex,endOfIndex)==0.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::getMinMaxValues ( int &  minValue,
int &  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.

Parameters
[out]minValue- the min value in this.
[out]maxValue- the max value in this.
See Also
getMinValueInArray, getMinValue, getMaxValueInArray, getMaxValue

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

Referenced by buildUniqueNotSorted().

void DataArrayInt::abs ( )

Converts every value of this array to its absolute value. WARNING this method is non const. If a new DataArrayInt instance should be built containing the result of abs DataArrayInt::computeAbs should be called instead.

Exceptions
Ifthis is not allocated.
See Also
DataArrayInt::computeAbs

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::computeAbs ( ) const

This method builds a new instance of this object containing the result of std::abs applied of all elements in this. This method is a const method (that do not change any values in this) contrary to DataArrayInt::abs method.

Returns
DataArrayInt * - the new instance of DataArrayInt containing the same number of tuples and component as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
See Also
DataArrayInt::abs

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

void DataArrayInt::applyLin ( int  a,
int  b,
int  compoId 
)
void DataArrayInt::applyLin ( int  a,
int  b 
)

Apply a liner function to all elements of this array, so that an element x becomes $ a * x + b $.

Parameters
[in]a- the first coefficient of the function.
[in]b- the second coefficient of the function.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

void DataArrayInt::applyInv ( int  numerator)

Modify all elements of this array, so that an element x becomes $ numerator / x $.

Warning
If an exception is thrown because of presence of 0 element in this array, all elements processed before detection of the zero element remain modified.
Parameters
[in]numerator- the numerator used to modify array elements.
Exceptions
Ifthis is not allocated.
Ifthere is an element equal to 0 in this array.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::negate ( ) const

Returns a full copy of this array except that sign of all elements is reversed.

Returns
DataArrayInt * - the new instance of DataArrayInt containing the same number of tuples and component as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

void DataArrayInt::applyDivideBy ( int  val)

Modify all elements of this array, so that an element x becomes $ x / val $.

Parameters
[in]val- the denominator used to modify array elements.
Exceptions
Ifthis is not allocated.
Ifval == 0.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

Referenced by MEDCoupling::MEDCoupling1DGTUMesh::computeNbOfFacesPerCell().

void DataArrayInt::applyModulus ( int  val)

Modify all elements of this array, so that an element x becomes x % val .

Parameters
[in]val- the divisor used to modify array elements.
Exceptions
Ifthis is not allocated.
Ifval <= 0.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

void DataArrayInt::applyRModulus ( int  val)

Modify all elements of this array, so that an element x becomes val % x .

Warning
If an exception is thrown because of presence of an element <= 0 in this array, all elements processed before detection of the zero element remain modified.
Parameters
[in]val- the divident used to modify array elements.
Exceptions
Ifthis is not allocated.
Ifthere is an element equal to or less than 0 in this array.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

void DataArrayInt::applyPow ( int  val)

Modify all elements of this array, so that an element x becomes val ^ x .

Parameters
[in]val- the value used to apply pow on all array elements.
Exceptions
Ifthis is not allocated.
Ifval < 0.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

void DataArrayInt::applyRPow ( int  val)

Modify all elements of this array, so that an element x becomes $ val ^ x $.

Parameters
[in]val- the value used to apply pow on all array elements.
Exceptions
Ifthis is not allocated.
Ifthere is an element < 0 in this array.
Warning
If an exception is thrown because of presence of 0 element in this array, all elements processed before detection of the zero element remain modified.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::findIdsInRange ( int  vmin,
int  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)

Parameters
[in]vminbegin of range. This value is included in range (included).
[in]vmaxend of range. This value is not included in range (excluded).
Returns
a newly allocated data array that the caller should deal with.
See Also
DataArrayInt::findIdsNotInRange , DataArrayInt::findIdsStricltyNegative

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingUMesh::conformize3D(), and MEDCoupling::MEDCouplingUMesh::findNodesToDuplicate().

DataArrayInt * DataArrayInt::findIdsNotInRange ( int  vmin,
int  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)

Parameters
[in]vminbegin of range. This value is not included in range (excluded).
[in]vmaxend of range. This value is included in range (included).
Returns
a newly allocated data array that the caller should deal with.
See Also
DataArrayInt::findIdsInRange , DataArrayInt::findIdsStricltyNegative

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group().

DataArrayInt * DataArrayInt::findIdsStricltyNegative ( ) const

This method works only on data array with one component. This method returns a newly allocated array storing stored ascendantly of tuple ids in this so that this[id]<0.

Returns
a newly allocated data array that the caller should deal with.
See Also
DataArrayInt::findIdsInRange

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine().

bool DataArrayInt::checkAllIdsInRange ( int  vmin,
int  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.

Parameters
[in]vminbegin of range. This value is included in range (included).
[in]vmaxend of range. This value is not included in range (excluded).
Returns
if all ids in this are so that (*this)[i]==i for all i in [ 0, this->getNumberOfTuples() ).

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().

Referenced by MEDCoupling::MEDCoupling1GTUMesh::checkTypeConsistencyAndContig(), MEDCoupling::MEDCouplingStructuredMesh::checkTypeConsistencyAndContig(), MEDCoupling::MEDCoupling1GTUMesh::splitProfilePerType(), and MEDCoupling::MEDCouplingStructuredMesh::splitProfilePerType().

DataArrayInt * DataArrayInt::Aggregate ( const DataArrayInt a1,
const DataArrayInt a2,
int  offsetA2 
)
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.

Parameters
[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.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents().

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

Referenced by MEDCoupling::DataArray::Aggregate(), MEDCoupling::MEDFileUMesh::Aggregate(), MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), MEDCoupling::MEDCouplingFieldDouble::convertQuadraticCellsToLinear(), MEDCoupling::MEDCouplingUMesh::findNodesToDuplicate(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(), MEDCoupling::MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(), MEDCoupling::MEDCoupling1DGTUMesh::resizeForUnserialization(), and MEDCoupling::MEDFileUMesh::unPolyze().

DataArrayInt * DataArrayInt::Aggregate ( const std::vector< const DataArrayInt * > &  arr)
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.

Parameters
[in]arr- a sequence of arrays to include in the result array.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifall arrays within arr are NULL.
IfgetNumberOfComponents() of arrays within arr.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * DataArrayInt::AggregateIndexes ( const std::vector< const DataArrayInt * > &  arrs)
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.

Returns
DataArrayInt * - a new object to be managed by the caller.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords().

DataArrayInt * DataArrayInt::Meld ( const DataArrayInt a1,
const DataArrayInt a2 
)
static

Returns a new DataArrayInt by aggregating two given arrays, so that (1) the number of components in the result array is a sum of the number of components of given arrays and (2) the number of tuples in the result array is same as that of each of given arrays. In other words the i-th tuple of result array includes all components of i-th tuples of all given arrays. Number of tuples in the given arrays must be the same.

Parameters
[in]a1- an array to include in the result array.
[in]a2- another array to include in the result array.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifboth a1 and a2 are NULL.
Ifany given array is not allocated.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
DataArrayInt * DataArrayInt::Meld ( const std::vector< const DataArrayInt * > &  arr)
static

Returns a new DataArrayInt by aggregating all given arrays, so that (1) the number of components in the result array is a sum of the number of components of given arrays and (2) the number of tuples in the result array is same as that of each of given arrays. In other words the i-th tuple of result array includes all components of i-th tuples of all given arrays. Number of tuples in the given arrays must be the same.

Parameters
[in]arr- a sequence of arrays to include in the result array.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifall arrays within arr are NULL.
Ifany given array is not allocated.
IfgetNumberOfTuples() of arrays within arr is different.

References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), and New().

DataArrayInt * DataArrayInt::MakePartition ( const std::vector< const DataArrayInt * > &  groups,
int  newNb,
std::vector< std::vector< int > > &  fidsOfGroups 
)
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:

  • family1 (with ID 1) contains element [0] belonging to ( group1 + group2 ),
  • family2 (with ID 2) contains elements [4] belonging to ( group1 ),
  • family3 (with ID 3) contains element [1,2] belonging to ( group2 ),
    and the result array contains IDs of families [ 1,3,3,0,2 ].
    Note a family ID 0 which stands for the element #3 which is in none of groups.
Parameters
[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.
Returns
DataArrayInt * - a new instance of DataArrayInt containing IDs of families each element with ID from range [0, newNb ) belongs to. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifany element ID in groups violates condition ( 0 <= ID < newNb ).

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDFileMesh::setGroupsAtLevel().

DataArrayInt * DataArrayInt::BuildUnion ( const std::vector< const DataArrayInt * > &  arr)
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.

Parameters
[in]arr- sequence of DataArrayInt's to unite.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifany arr[i] is not allocated.
Ifarr[i]->getNumberOfComponents() != 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

Referenced by buildUnion().

DataArrayInt * DataArrayInt::BuildIntersection ( const std::vector< const DataArrayInt * > &  arr)
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.

Parameters
[in]arr- sequence of DataArrayInt's to intersect.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifany arr[i] is not allocated.
Ifarr[i]->getNumberOfComponents() != 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

Referenced by buildIntersection(), and MEDCoupling::MEDFileUMesh::checkSMESHConsistency().

DataArrayInt * DataArrayInt::BuildListOfSwitchedOn ( const std::vector< bool > &  v)
static
void DataArrayInt::PutIntoToSkylineFrmt ( const std::vector< std::vector< int > > &  v,
DataArrayInt *&  data,
DataArrayInt *&  dataIndex 
)
static

This method allows to put a vector of vector of integer into a more compact data stucture (skyline). This method is not available into python because no available optimized data structure available to map std::vector< std::vector<int> >.

Parameters
[in]vthe input data structure to be translate into skyline format.
[out]datathe first element of the skyline format. The user is expected to deal with newly allocated array.
[out]dataIndexthe second element of the skyline format.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::end(), and New().

Referenced by MEDCoupling::MEDCouplingUMesh::conformize2D().

DataArrayInt * DataArrayInt::buildComplement ( int  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.

Parameters
[in]nbOfElement- maximal size of the result array.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.
Ifany element x of this array violates condition ( 0 <= x < nbOfElement ).

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

DataArrayInt * DataArrayInt::buildSubstraction ( const DataArrayInt other) const
DataArrayInt * DataArrayInt::buildSubstractionOptimized ( const DataArrayInt other) const
DataArrayInt * DataArrayInt::buildUnion ( const DataArrayInt 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.

Parameters
[in]other- an array to unite with this one.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis or other is not allocated.
Ifthis->getNumberOfComponents() != 1.
Ifother->getNumberOfComponents() != 1.

References BuildUnion().

Referenced by MEDCoupling::MEDFileMesh::computeAllFamilyIdsInUse().

DataArrayInt * DataArrayInt::buildIntersection ( const DataArrayInt 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.

Parameters
[in]other- an array to intersect with this one.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis or other is not allocated.
Ifthis->getNumberOfComponents() != 1.
Ifother->getNumberOfComponents() != 1.

References BuildIntersection().

Referenced by MEDCoupling::MEDCouplingUMesh::conformize3D().

DataArrayInt * DataArrayInt::buildUnique ( ) const

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]

Returns
a newly allocated array that contain the result of the unique operation applied on this.
Exceptions
ifthis is not allocated or if this has not exactly one component.
See Also
DataArrayInt::buildUniqueNotSorted

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), deepCopy(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds(), and MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine().

DataArrayInt * DataArrayInt::buildUniqueNotSorted ( ) const

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.

Returns
a newly allocated array that contain the result of the unique operation applied on this.
Exceptions
ifthis is not allocated or if this has not exactly one component.
See Also
DataArrayInt::buildUnique

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< int >::end(), getMinMaxValues(), MEDCoupling::DataArray::getNumberOfComponents(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * DataArrayInt::deltaShiftIndex ( ) const

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 preforms the reverse operation of DataArrayInt::computeOffsetsFull.

Returns
DataArrayInt * - a new instance of DataArrayInt, whose number of tuples equals to this->getNumberOfComponents() - 1, and number of components is 1. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.
Ifthis->getNumberOfTuples() < 2.

Example:

  • this contains [1,3,6,7,7,9,15]
  • result array contains [2,3,1,0,2,6], where 2 = 3 - 1, 3 = 6 - 3, 1 = 7 - 6 etc.
See Also
DataArrayInt::computeOffsetsFull

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().

Referenced by MEDCoupling::MEDCouplingFieldDouble::cellToNodeDiscretization(), MEDCoupling::MEDCouplingUMesh::computeSkin(), MEDCoupling::MEDCouplingUMesh::conformize3D(), MEDCoupling::MEDCouplingUMesh::findCellIdsOnBoundary(), and MEDCoupling::MEDCouplingUMesh::orderConsecutiveCells1D().

void DataArrayInt::computeOffsets ( )

Modifies this one-dimensional array so that value of each element x of this array (a) is computed as $ x_i = \sum_{j=0}^{i-1} a[ j ] $. 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.

Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.

Example:

  • Before this contains [3,5,1,2,0,8]
  • After this contains [0,3,8,9,11,11]
    Note that the last element 19 = 11 + 8 is missing because size of this array is retained and thus there is no space to store the last element.

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

void DataArrayInt::computeOffsetsFull ( )

Modifies this one-dimensional array so that value of each element x of this array (a) is computed as $ x_i = \sum_{j=0}^{i-1} a[ j ] $. 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 preforms the reverse operation of DataArrayInt::deltaShiftIndex.

Exceptions
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.

Example:

References MEDCoupling::C_DEALLOC, MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::useArray().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getMeasureField(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::integral(), MEDCoupling::MEDCoupling1DGTUMesh::renumberCells(), and MEDCoupling::MEDCouplingUMesh::tetrahedrize().

void DataArrayInt::findIdsRangesInListOfIds ( const DataArrayInt listOfIds,
DataArrayInt *&  rangeIdsFetched,
DataArrayInt *&  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.

Parameters
[in]listOfIdsa list of ids that has to be sorted ascendingly.
[out]rangeIdsFetchedthe range ids fetched
[out]idsInInputListThatFetchcontains the list of ids in listOfIds that are fully included in a range in this. So idsInInputListThatFetch is a part of input listOfIds.
See Also
DataArrayInt::computeOffsetsFull

Example:

  • this : [0,3,7,9,15,18]
  • listOfIds contains [0,1,2,3,7,8,15,16,17]
  • rangeIdsFetched result array: [0,2,4]
  • idsInInputListThatFetch result array: [0,1,2,7,8,15,16,17] In this example id 3 in input listOfIds is alone so it do not appear in output idsInInputListThatFetch.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArray::getNumberOfComponents(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), MEDCoupling::DataArrayTemplate< T >::pushBackValsSilent(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds(), and MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds().

DataArrayInt * DataArrayInt::buildExplicitArrByRanges ( const DataArrayInt 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.

Exceptions
Ifoffsets is NULL.
Ifoffsets is not allocated.
Ifoffsets->getNumberOfComponents() != 1.
Ifoffsets is not monotonically increasing.
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.
Ifany element of this is not a valid index for offsets array.

Example:

  • this: [0,2,3]
  • offsets: [0,3,6,10,14,20]
  • result array: [0,1,2,6,7,8,9,10,11,12,13] ==
    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 ])

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getMeasureField(), and MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::integral().

DataArrayInt * DataArrayInt::buildExplicitArrOfSliceOnScaledArr ( int  bg,
int  stop,
int  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.

Exceptions
Ifis NULL.
Ifthis is not allocated.
Ifthis->getNumberOfComponents() != 1.
Ifthis->getNumberOfTuples() == 0.
Ifthis is not monotonically increasing.
Ifany element of ids in ( bg stop step ) points outside the scale in this.
\b Example: <br>
        - \a bg , \a stop and \a step : (0,5,2)
        - \a this: [0,3,6,10,14,20]
        - result array: [0,0,0, 2,2,2,2, 4,4,4,4,4,4] == <br>

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayTemplate< int >::isAllocated(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingUMesh::tetrahedrize().

DataArrayInt * DataArrayInt::findRangeIdForEachTuple ( const DataArrayInt 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]**

Parameters
[in]rangestypically 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.
Exceptions
Ifoffsets 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.
See Also
DataArrayInt::findIdInRangeForEachTuple

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * DataArrayInt::findIdInRangeForEachTuple ( const DataArrayInt 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.

Parameters
[in]rangestypically 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.
Exceptions
Ifoffsets 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.
See Also
DataArrayInt::findRangeIdForEachTuple

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::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 internaly the connectibity without any coordinates consideration.

See Also
MEDCouplingUMesh::orderConsecutiveCells1D

References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::duplicateEachTupleNTimes ( int  nbTimes) const
Parameters
[in]nbTimesspecifies the nb of times each tuples in this will be duplicated contiguouly in returned DataArrayInt instance. nbTimes should be at least equal to 1.
Returns
a newly allocated DataArrayInt having one component and number of tuples equal to nbTimes * this->getNumberOfTuples.
Exceptions
ifthis is not allocated or if this has not number of components set to one or if nbTimes is lower than 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

std::vector< DataArrayInt * > DataArrayInt::partitionByDifferentValues ( std::vector< int > &  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]]

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArray::getNumberOfComponents(), and New().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationPerCell::splitIntoSingleGaussDicrPerCellType().

std::vector< std::pair< int, int > > DataArrayInt::splitInBalancedSlices ( int  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.

Parameters
[in]nbOfSlices- number of slices expected.
Returns
- a vector having a size equal to nbOfSlices giving the start (included) and the stop (excluded) of each chunks.
See Also
DataArray::GetSlice
Exceptions
Ifthis is not allocated or not with exactly one component.
Ifan element in this if < 0.

References accumulate(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::isAllocated().

void MEDCoupling::DataArrayInt::writeOnPlace ( std::size_t  id,
int  element0,
const int *  others,
int  sizeOfOthers 
)
DataArrayInt * DataArrayInt::Add ( const DataArrayInt a1,
const DataArrayInt a2 
)
static

Returns a new DataArrayInt that is a sum of two given arrays. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of the result array (a) is a sum of the corresponding values of a1 and a2, i.e.: a [ i, j ] = a1 [ i, j ] + a2 [ i, j ].
  2. The arrays have same number of tuples and one array, say a2, has one component. Then a [ i, j ] = a1 [ i, j ] + a2 [ i, 0 ].
  3. The arrays have same number of components and one array, say a2, has one tuple. Then a [ i, j ] = a1 [ i, j ] + a2 [ 0, j ].

Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).

Parameters
[in]a1- an array to sum up.
[in]a2- another array to sum up.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::addEqual ( const DataArrayInt other)

Adds values of another DataArrayInt to values of this one. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of other array is added to the corresponding value of this array, i.e.: a [ i, j ] += other [ i, j ].
  2. The arrays have same number of tuples and other array has one component. Then a [ i, j ] += other [ i, 0 ].
  3. The arrays have same number of components and other array has one tuple. Then a [ i, j ] += a2 [ 0, j ].
Parameters
[in]other- an array to add to this one.
Exceptions
Ifother is NULL.
Ifthis->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::Substract ( const DataArrayInt a1,
const DataArrayInt a2 
)
static

Returns a new DataArrayInt that is a subtraction of two given arrays. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of the result array (a) is a subtraction of the corresponding values of a1 and a2, i.e.: a [ i, j ] = a1 [ i, j ] - a2 [ i, j ].
  2. The arrays have same number of tuples and one array, say a2, has one component. Then a [ i, j ] = a1 [ i, j ] - a2 [ i, 0 ].
  3. The arrays have same number of components and one array, say a2, has one tuple. Then a [ i, j ] = a1 [ i, j ] - a2 [ 0, j ].

Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).

Parameters
[in]a1- an array to subtract from.
[in]a2- an array to subtract.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::checkNbOfComps(), MEDCoupling::DataArray::checkNbOfTuples(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::substractEqual ( const DataArrayInt other)

Subtract values of another DataArrayInt from values of this one. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of other array is subtracted from the corresponding value of this array, i.e.: a [ i, j ] -= other [ i, j ].
  2. The arrays have same number of tuples and other array has one component. Then a [ i, j ] -= other [ i, 0 ].
  3. The arrays have same number of components and other array has one tuple. Then a [ i, j ] -= a2 [ 0, j ].
Parameters
[in]other- an array to subtract from this one.
Exceptions
Ifother is NULL.
Ifthis->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::Multiply ( const DataArrayInt a1,
const DataArrayInt a2 
)
static

Returns a new DataArrayInt that is a product of two given arrays. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of the result array (a) is a product of the corresponding values of a1 and a2, i.e.: a [ i, j ] = a1 [ i, j ] * a2 [ i, j ].
  2. The arrays have same number of tuples and one array, say a2, has one component. Then a [ i, j ] = a1 [ i, j ] * a2 [ i, 0 ].
  3. The arrays have same number of components and one array, say a2, has one tuple. Then a [ i, j ] = a1 [ i, j ] * a2 [ 0, j ].

Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).

Parameters
[in]a1- a factor array.
[in]a2- another factor array.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::multiplyEqual ( const DataArrayInt other)

Multiply values of another DataArrayInt to values of this one. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of other array is multiplied to the corresponding value of this array, i.e.: a [ i, j ] *= other [ i, j ].
  2. The arrays have same number of tuples and other array has one component. Then a [ i, j ] *= other [ i, 0 ].
  3. The arrays have same number of components and other array has one tuple. Then a [ i, j ] *= a2 [ 0, j ].
Parameters
[in]other- an array to multiply to this one.
Exceptions
Ifother is NULL.
Ifthis->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::Divide ( const DataArrayInt a1,
const DataArrayInt a2 
)
static

Returns a new DataArrayInt that is a division of two given arrays. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of the result array (a) is a division of the corresponding values of a1 and a2, i.e.: a [ i, j ] = a1 [ i, j ] / a2 [ i, j ].
  2. The arrays have same number of tuples and one array, say a2, has one component. Then a [ i, j ] = a1 [ i, j ] / a2 [ i, 0 ].
  3. The arrays have same number of components and one array, say a2, has one tuple. Then a [ i, j ] = a1 [ i, j ] / a2 [ 0, j ].

Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).

Warning
No check of division by zero is performed!
Parameters
[in]a1- a numerator array.
[in]a2- a denominator array.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::checkNbOfComps(), MEDCoupling::DataArray::checkNbOfTuples(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::divideEqual ( const DataArrayInt other)

Divide values of this array by values of another DataArrayInt. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of this array is divided by the corresponding value of other one, i.e.: a [ i, j ] /= other [ i, j ].
  2. The arrays have same number of tuples and other array has one component. Then a [ i, j ] /= other [ i, 0 ].
  3. The arrays have same number of components and other array has one tuple. Then a [ i, j ] /= a2 [ 0, j ].
Warning
No check of division by zero is performed!
Parameters
[in]other- an array to divide this one by.
Exceptions
Ifother is NULL.
Ifthis->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::Modulus ( const DataArrayInt a1,
const DataArrayInt a2 
)
static

Returns a new DataArrayInt that is a modulus of two given arrays. There are 3 valid cases.

  1. The arrays have same number of tuples and components. Then each value of the result array (a) is a division of the corresponding values of a1 and a2, i.e.: a [ i, j ] = a1 [ i, j ] % a2 [ i, j ].
  2. The arrays have same number of tuples and one array, say a2, has one component. Then a [ i, j ] = a1 [ i, j ] % a2 [ i, 0 ].
  3. The arrays have same number of components and one array, say a2, has one tuple. Then a [ i, j ] = a1 [ i, j ] % a2 [ 0, j ].

Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).

Warning
No check of division by zero is performed!
Parameters
[in]a1- a dividend array.
[in]a2- a divisor array.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::checkNbOfComps(), MEDCoupling::DataArray::checkNbOfTuples(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::modulusEqual ( const DataArrayInt 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.

  1. The arrays have same number of tuples and components. Then each value of this array is divided by the corresponding value of other one, i.e.: a [ i, j ] %= other [ i, j ].
  2. The arrays have same number of tuples and other array has one component. Then a [ i, j ] %= other [ i, 0 ].
  3. The arrays have same number of components and other array has one tuple. Then a [ i, j ] %= a2 [ 0, j ].
Warning
No check of division by zero is performed!
Parameters
[in]other- a divisor array.
Exceptions
Ifother is NULL.
Ifthis->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1.

References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().

DataArrayInt * DataArrayInt::Pow ( const DataArrayInt a1,
const DataArrayInt a2 
)
static

Returns a new DataArrayInt that is the result of pow of two given arrays. There are 3 valid cases.

Parameters
[in]a1- an array to pow up.
[in]a2- another array to sum up.
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != 1 or a2->getNumberOfComponents() != 1.
Ifthere is a negative value in a2.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

void DataArrayInt::powEqual ( const DataArrayInt other)
void MEDCoupling::DataArrayInt::updateTime ( ) const
virtual

This method should be called on high level classes as Field or Mesh to take into acount modifications done in aggregates objects.

Implements MEDCoupling::TimeLabel.

MemArray<int>& MEDCoupling::DataArrayInt::accessToMemArray ( )
const MemArray<int>& MEDCoupling::DataArrayInt::accessToMemArray ( ) const
int * DataArrayInt::CheckAndPreparePermutation ( const int *  start,
const int *  end 
)
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].

Parameters
[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 ].
Returns
int * - the result permutation array that the caller is to delete as it is no more needed.
Exceptions
Ifthere are equal values in the input array.

References MEDCoupling::DataArrayTemplate< int >::end().

Referenced by checkAndPreparePermutation(), MEDCoupling::MEDCouplingFieldDiscretizationP0::renumberArraysForCell(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::renumberArraysForCell(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::renumberArraysForCell(), MEDCoupling::MEDCouplingUMesh::renumberCells(), and MEDCoupling::MEDCouplingFieldDiscretizationPerCell::renumberCells().

DataArrayInt * DataArrayInt::Range ( int  begin,
int  end,
int  step 
)
static

Returns a new DataArrayInt containing an arithmetic progression that is equal to the sequence returned by Python range(begin,end,step ) function.

Parameters
[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.
Returns
DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifstep == 0.
Ifend < begin && step > 0.
Ifend > begin && step < 0.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by MEDCoupling::MEDCouplingMesh::buildPartRange(), MEDCoupling::MEDCouplingMesh::buildPartRangeAndReduceNodes(), MEDCoupling::MEDCouplingFieldDiscretization::buildSubMeshDataRange(), MEDCoupling::MEDCoupling1SGTUMesh::buildUnstructured(), MEDCoupling::MEDCoupling1GTUMesh::splitProfilePerType(), and MEDCoupling::MEDCouplingStructuredMesh::splitProfilePerType().

void DataArrayInt::getTinySerializationIntInformation ( std::vector< int > &  tinyInfo) const

Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. Server side.

References MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::isAllocated().

void DataArrayInt::getTinySerializationStrInformation ( std::vector< std::string > &  tinyInfo) const

Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. Server side.

References MEDCoupling::DataArray::getInfoOnComponent(), MEDCoupling::DataArray::getName(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::isAllocated().

bool DataArrayInt::resizeForUnserialization ( const std::vector< int > &  tinyInfoI)

Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class. This method returns if a feeding is needed.

References MEDCoupling::DataArrayTemplate< int >::alloc().

Referenced by MEDCoupling::MEDCoupling1SGTUMesh::resizeForUnserialization(), and MEDCoupling::MEDCoupling1DGTUMesh::resizeForUnserialization().

void DataArrayInt::finishUnserialization ( const std::vector< int > &  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.

References MEDCoupling::DataArrayTemplate< int >::isAllocated(), MEDCoupling::DataArray::setInfoOnComponent(), and MEDCoupling::DataArray::setName().