Public Member Functions | |
void | abs () |
MemArray< int > & | accessToMemArray () |
const MemArray< int > & | accessToMemArray () const |
void | accumulate (int *res) const |
int | accumulate (int compId) const |
DataArrayInt * | accumulatePerChunck (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) |
DataArrayInt * | buildComplement (int nbOfElement) const |
DataArrayInt * | buildExplicitArrByRanges (const DataArrayInt *offsets) const |
DataArrayInt * | buildExplicitArrOfSliceOnScaledArr (int begin, int stop, int step) const |
DataArrayInt * | buildIntersection (const DataArrayInt *other) const |
DataArrayInt * | buildNewEmptyInstance () const |
DataArrayInt * | buildPermArrPerLevel () const |
DataArrayInt * | buildPermutationArr (const DataArrayInt &other) const |
DataArrayInt * | buildSubstraction (const DataArrayInt *other) const |
DataArrayInt * | buildSubstractionOptimized (const DataArrayInt *other) const |
DataArrayInt * | buildUnion (const DataArrayInt *other) const |
DataArrayInt * | buildUnique () const |
DataArrayInt * | buildUniqueNotSorted () const |
void | changeSurjectiveFormat (int targetNb, DataArrayInt *&arr, DataArrayInt *&arrI) const |
int | changeValue (int oldValue, int newValue) |
bool | checkAllIdsInRange (int vmin, int vmax) const |
DataArrayInt * | checkAndPreparePermutation () const |
void | checkMonotonic (bool increasing) const |
void | checkStrictlyMonotonic (bool increasing) const |
DataArrayInt * | computeAbs () const |
void | computeOffsets () |
void | computeOffsetsFull () |
DataArrayDouble * | convertToDblArr () const |
int | count (int value) const |
DataArrayInt * | deepCopy () const |
DataArrayInt * | deltaShiftIndex () const |
void | divideEqual (const DataArrayInt *other) |
DataArrayInt * | duplicateEachTupleNTimes (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 |
DataArrayInt * | findIdInRangeForEachTuple (const DataArrayInt *ranges) const |
DataArrayInt * | findIdsEqual (int val) const |
DataArrayInt * | findIdsEqualList (const int *valsBg, const int *valsEnd) const |
DataArrayInt * | findIdsEqualTuple (const int *tupleBg, const int *tupleEnd) const |
int | findIdSequence (const std::vector< int > &vals) const |
DataArrayInt * | findIdsInRange (int vmin, int vmax) const |
DataArrayInt * | findIdsNotEqual (int val) const |
DataArrayInt * | findIdsNotEqualList (const int *valsBg, const int *valsEnd) const |
DataArrayInt * | findIdsNotInRange (int vmin, int vmax) const |
void | findIdsRangesInListOfIds (const DataArrayInt *listOfIds, DataArrayInt *&rangeIdsFetched, DataArrayInt *&idsInInputListThatFetch) const |
DataArrayInt * | findIdsStricltyNegative () const |
DataArrayInt * | findRangeIdForEachTuple (const DataArrayInt *ranges) const |
void | finishUnserialization (const std::vector< int > &tinyInfoI, const std::vector< std::string > &tinyInfoS) |
DataArrayInt * | fromNoInterlace () const |
DataArrayInt * | getDifferentValues () 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 |
DataArrayInt * | indicesOfSubPart (const DataArrayInt &partOfThis) const |
template<class InputIterator > | |
void | insertAtTheEnd (InputIterator first, InputIterator last) |
int | intValue () const |
DataArrayInt * | invertArrayN2O2O2N (int oldNbOfElem) const |
DataArrayInt * | invertArrayO2N2N2O (int newNbOfElem) const |
DataArrayInt * | invertArrayO2N2N2OBis (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 |
DataArrayIntIterator * | iterator () |
DataArrayInt * | keepSelectedComponents (const std::vector< int > &compoIds) const |
void | meldWith (const DataArrayInt *other) |
void | modulusEqual (const DataArrayInt *other) |
void | multiplyEqual (const DataArrayInt *other) |
DataArrayInt * | negate () const |
std::vector< DataArrayInt * > | partitionByDifferentValues (std::vector< int > &differentIds) const |
DataArrayInt * | performCopyOrIncrRef (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) |
DataArrayInt * | selectByTupleId (const int *new2OldBg, const int *new2OldEnd) const |
DataArrayInt * | selectByTupleId (const DataArrayInt &di) const |
DataArrayInt * | selectByTupleIdSafe (const int *new2OldBg, const int *new2OldEnd) const |
DataArrayInt * | selectByTupleIdSafeSlice (int bg, int end2, int step) const |
DataArrayInt * | selectByTupleRanges (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) |
DataArrayInt * | sumPerTuple () const |
void | switchOnTupleEqualTo (int val, std::vector< bool > &vec) const |
void | switchOnTupleNotEqualTo (int val, std::vector< bool > &vec) const |
DataArrayInt * | toNoInterlace () const |
void | transformWithIndArr (const int *indArrBg, const int *indArrEnd) |
DataArrayInt * | transformWithIndArrR (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 |
TimeLabel & | operator= (const TimeLabel &other) |
Static Public Member Functions | |
static DataArrayInt * | Add (const DataArrayInt *a1, const DataArrayInt *a2) |
static DataArrayInt * | Aggregate (const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2) |
static DataArrayInt * | Aggregate (const std::vector< const DataArrayInt * > &arr) |
static DataArrayInt * | AggregateIndexes (const std::vector< const DataArrayInt * > &arrs) |
static DataArrayInt * | BuildIntersection (const std::vector< const DataArrayInt * > &arr) |
static DataArrayInt * | BuildListOfSwitchedOff (const std::vector< bool > &v) |
static DataArrayInt * | BuildListOfSwitchedOn (const std::vector< bool > &v) |
static DataArrayInt * | BuildUnion (const std::vector< const DataArrayInt * > &arr) |
static int * | CheckAndPreparePermutation (const int *start, const int *end) |
static DataArrayInt * | ConvertIndexArrayToO2N (int nbOfOldTuples, const int *arr, const int *arrIBg, const int *arrIEnd, int &newNbOfTuples) |
static DataArrayInt * | Divide (const DataArrayInt *a1, const DataArrayInt *a2) |
static DataArrayInt * | FindPermutationFromFirstToSecond (const DataArrayInt *ids1, const DataArrayInt *ids2) |
static DataArrayInt * | MakePartition (const std::vector< const DataArrayInt * > &groups, int newNb, std::vector< std::vector< int > > &fidsOfGroups) |
static DataArrayInt * | Meld (const DataArrayInt *a1, const DataArrayInt *a2) |
static DataArrayInt * | Meld (const std::vector< const DataArrayInt * > &arr) |
static DataArrayInt * | Modulus (const DataArrayInt *a1, const DataArrayInt *a2) |
static DataArrayInt * | Multiply (const DataArrayInt *a1, const DataArrayInt *a2) |
static DataArrayInt * | New () |
static DataArrayInt * | Pow (const DataArrayInt *a1, const DataArrayInt *a2) |
static void | PutIntoToSkylineFrmt (const std::vector< std::vector< int > > &v, DataArrayInt *&data, DataArrayInt *&dataIndex) |
static DataArrayInt * | Range (int begin, int end, int step) |
static void | SetArrayIn (DataArrayInt *newArray, DataArrayInt *&arrayToSet) |
static DataArrayInt * | Substract (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 DataArray * | Aggregate (const std::vector< const DataArray * > &arrs) |
static std::string | BuildInfoFromVarAndUnit (const std::string &var, const std::string &unit) |
static std::string | GetAxisTypeRepr (MEDCouplingAxisType at) |
static 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 |
|
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.
If | at 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.
If | this 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().
|
virtual |
Returns a full copy of this. For more info on copying data arrays see Deep copy of DataArray.
Implements MEDCoupling::DataArray.
Referenced by MEDCoupling::MEDFileUMesh::buildExtrudedMesh(), buildUnique(), MEDCoupling::MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds(), MEDCoupling::MEDCouplingUMesh::conformize3D(), FindPermutationFromFirstToSecond(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), isEqualWithoutConsideringStrAndOrder(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), MEDCoupling::MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(), performCopyOrIncrRef(), MEDCoupling::MEDFileUMesh::quadraticToLinear(), MEDCoupling::MEDFileMesh::rearrangeFamilies(), and MEDCoupling::MEDCouplingStructuredMesh::splitProfilePerType().
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.
[in] | dCpy | - if true, a deep copy is returned, else, a shallow one. |
References deepCopy(), and MEDCoupling::RefCountObjectOnly::incrRef().
|
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.
[in] | other | - an instance of DataArrayInt to compare with this one. |
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.
[in] | other | the instance to be compared with this |
[out] | reason | In case of inequality returns the reason. |
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.
[in] | other | - an instance of DataArrayInt to compare with this one. |
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.
[in] | other | - an instance of DataArrayInt to compare with this one. |
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.
[in] | v | - the vector of 'flags' to be compared with this. |
If | this is not sorted ascendingly. |
If | this has not exactly one component. |
If | this 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.
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.
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.
[in] | other | - an array to compute permutation to. |
If | this->getNumberOfComponents() != 1. |
If | other->getNumberOfComponents() != 1. |
If | this->getNumberOfTuples() != other->getNumberOfTuples(). |
If | other includes a value which is not in this array. |
References MEDCoupling::DataArrayTemplate< T >::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.
[in] | partOfThis | - A 1 compo allocated array |
if | two same element is present twice in this |
if | an element in partOfThis is NOT in this. |
References MEDCoupling::DataArrayTemplate< 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.
If | this 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.
[in] | increasing | - if true, the array values should be increasing. |
If | sequence of values is not strictly monotonic in agreement with increasing arg. |
If | this->getNumberOfComponents() != 1. |
If | this is not allocated. |
References isMonotonic().
bool DataArrayInt::isMonotonic | ( | bool | increasing | ) | const |
Checks that this array is consistently increasing or decreasing in value.
[in] | increasing | - if true, array values should be increasing. |
If | this->getNumberOfComponents() != 1. |
If | this is not allocated. |
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 |
This method check that array consistently INCREASING or DECREASING in value.
References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().
Referenced by checkStrictlyMonotonic().
void DataArrayInt::fillWithZero | ( | ) |
Assign zero to all values in this array. To know more on filling arrays see Filling DataArray with values.
If | this is not allocated. |
References MEDCoupling::DataArrayTemplate< int >::fillWithValue().
Referenced by MEDCoupling::MEDCouplingUMesh::areCellsIncludedInPolicy7(), MEDCoupling::MEDCouplingUMesh::getLevArrPerCellTypes(), MEDCoupling::MEDFileMesh::getOrCreateAndGetFamilyFieldAtLevel(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), and MEDCoupling::MEDFileMesh::normalizeFamIdsTrio().
void DataArrayInt::iota | ( | int | init = 0 | ) |
Set all values in this array so that the i-th element equals to init + i (i starts from zero). To know more on filling arrays see Filling DataArray with values.
[in] | init | - value to assign to the first element of array. |
If | this->getNumberOfComponents() != 1 |
If | this is not allocated. |
References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().
Referenced by MEDCoupling::MEDCouplingStructuredMesh::buildPartAndReduceNodes(), MEDCoupling::MEDCouplingGaussLocalization::buildRefCell(), MEDCoupling::MEDCouplingFieldDiscretizationP0::getOffsetArr(), MEDCoupling::MEDCouplingFieldDiscretizationOnNodes::getOffsetArr(), MEDCoupling::MEDCouplingStructuredMesh::giveCellsWithType(), MEDCoupling::MEDCoupling1GTUMesh::giveCellsWithType(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), and MEDCoupling::MEDCoupling1DGTUMesh::simplexize().
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.
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.
References reprNotTooLongStream().
void DataArrayInt::writeVTK | ( | std::ostream & | ofs, |
int | indent, | ||
const std::string & | type, | ||
const std::string & | nameInFile, | ||
DataArrayByte * | byteArr | ||
) | const |
References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< int >::getMaxValueInArray(), MEDCoupling::DataArrayTemplate< int >::getMinValueInArray(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayChar::insertAtTheEnd().
Referenced by MEDCoupling::MEDCouplingUMesh::writeVTKLL().
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArray::_name, and reprWithoutNameStream().
Referenced by repr().
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArray::_name, and reprZipWithoutNameStream().
Referenced by reprZip().
void DataArrayInt::reprNotTooLongStream | ( | std::ostream & | stream | ) | const |
References MEDCoupling::DataArray::_name, and reprNotTooLongWithoutNameStream().
Referenced by reprNotTooLong().
|
virtual |
Reimplemented from MEDCoupling::DataArray.
References MEDCoupling::DataArrayTemplate< int >::_mem, MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::MemArray< T >::repr(), and MEDCoupling::DataArray::reprWithoutNameStream().
Referenced by reprStream().
|
virtual |
void DataArrayInt::reprNotTooLongWithoutNameStream | ( | std::ostream & | stream | ) | const |
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getName(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().
Referenced by MEDCoupling::MEDCouplingUMesh::cppRepr().
|
virtual |
Method that gives a quick overvien of this for python.
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArray::_info_on_compo, MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::isAllocated(), and reprQuickOverviewData().
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArray::_info_on_compo, MEDCoupling::DataArrayTemplate< int >::begin(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().
Referenced by reprQuickOverview().
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.
[in] | indArrBg | - pointer to the first element of array of new values to assign to this array. |
[in] | indArrEnd | - specifies the end of the array indArrBg, so that the last value of indArrBg is indArrEnd[ -1 ]. |
If | this->getNumberOfComponents() != 1 |
If | any value of this can't be used as a valid index for [indArrBg, indArrEnd). |
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.
[in] | indArrBg | - the array holding indices within the result array to assign indices of values of this array pointing to values of indArrBg. |
[in] | indArrEnd | - specifies the end of the array indArrBg, so that the last value of indArrBg is indArrEnd[ -1 ]. |
If | this->getNumberOfComponents() != 1. |
If | any value of this array is not a valid index for indArrBg array. |
If | any value of indArrBg is not a valid index for this array. |
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.
[in] | arrBg | - the array of ascending values defining the value ranges. The i-th value of arrBg (arrBg[ i ]) gives the lowest value of the i-th range, and the greatest value of the i-th range equals to arrBg[ i+1 ] - 1. arrBg containing n values defines n-1 ranges. The last value of arrBg should be more than every value in this array. |
[in] | arrEnd | - specifies the end of the array arrBg, so that the last value of arrBg is arrEnd[ -1 ]. |
[out] | castArr | - a new instance of DataArrayInt, of same size as this array (same number of tuples and components), the caller is to delete using decrRef() as it is no more needed. This array contains indices of ranges for every value of this array. I.e. the i-th value of castArr gives the index of range the i-th value of this belongs to. Or, in other words, this parameter contains for each tuple in this in which cast it holds. |
[out] | rankInsideCast | - a new instance of DataArrayInt, of same size as this array, the caller is to delete using decrRef() as it is no more needed. This array contains ranks of values of this array within ranges they belongs to. I.e. the i-th value of rankInsideCast gives the rank of the i-th value of this array within the castArr[ i ]-th range, to which the i-th value of this belongs to. Or, in other words, this param contains for each tuple its rank inside its cast. The rank is computed as difference between the value and the lowest value of range. |
[out] | castsPresent | - a new instance of DataArrayInt, containing indices of ranges (casts) to which at least one value of this array belongs. Or, in other words, this param contains the casts that this contains. The caller is to delete this array using decrRef() as it is no more needed. |
Example: If this contains [6,5,0,3,2,7,8,1,4] and arrBg contains [0,4,9] then the output of this method will be :
I.e. values of this array belong to 2 ranges: #0 and #1. Value 6 belongs to the range #1 and its rank within this range is 2; etc.
If | this->getNumberOfComponents() != 1. |
If | arrEnd - arrBg < 2. |
If | any value of this is not less than arrEnd[-1]. |
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.
[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. |
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.
[in] | newNbOfElem | - the number of tuples in the result array. |
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.
[in] | newNbOfElem | - the number of tuples in the result array. |
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 |
This method is similar to DataArrayInt::invertArrayO2N2N2O except that Example : If this contains [0,1,2,0,3,4,5,4,6,4] this method will return [0,1,2,4,5,6,8] whereas DataArrayInt::invertArrayO2N2N2O returns [3,1,2,4,9,6,8]
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::MEDFileUMesh::zipCoords().
DataArrayDouble * DataArrayInt::convertToDblArr | ( | ) | const |
Creates a new DataArrayDouble and assigns all (textual and numerical) data of this array to the new one.
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::copyStringInfoFrom(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArrayTemplate< int >::getNbOfElems(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and MEDCoupling::DataArrayDouble::New().
Referenced by MEDCoupling::MEDFileIntField1TSWithoutSDA::convertToDouble().
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: , then the result array holds these values arranged as follows: .
If | this 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: , then the result array holds these values arranged as follows: .
If | this 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().
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArrayTemplate< T >::mySelectByTupleId().
Referenced by MEDCoupling::MEDFileMesh::addGroupUnderground(), MEDCoupling::MEDCouplingUMesh::buildSlice3D(), MEDCoupling::MEDCouplingUMesh::buildSlice3DSurf(), and MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine().
DataArrayInt* MEDCoupling::DataArrayInt::selectByTupleId | ( | const DataArrayInt & | di | ) | const |
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArrayTemplate< T >::mySelectByTupleIdSafe().
Referenced by MEDCoupling::MEDFileMesh::addGroupUnderground(), MEDCoupling::MEDFileUMesh::extractPart(), MEDCoupling::MEDFileField1TS::extractPart(), FindPermutationFromFirstToSecond(), and MEDCoupling::MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell().
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArrayTemplate< T >::myKeepSelectedComponents().
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArrayTemplate< T >::mySelectByTupleIdSafeSlice().
Referenced by MEDCoupling::DataArrayDouble::areIncludedInMe(), MEDCoupling::MEDFileUMesh::buildInnerBoundaryAlongM1Group(), MEDCoupling::MEDCouplingPointSet::checkDeepEquivalOnSameNodesWith(), MEDCoupling::MEDCouplingPointSet::checkDeepEquivalWith(), MEDCoupling::MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(), MEDCoupling::MEDFileUMesh::quadraticToLinear(), and MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell().
|
virtual |
Implements MEDCoupling::DataArray.
References MEDCoupling::DataArrayTemplate< T >::mySelectByTupleRanges().
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.
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
If | there 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().
|
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.
If | either 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 result means:
the element of B 0 encounters within A once (arrI[ 0+1 ] - arrI[ 0 ]) and its index within A is 0 ( arr[ 0:1 ] == arr[ arrI[ 0 ] : arrI[ 0+1 ]]);
the element of B 2 encounters within A 4 times (arrI[ 2+1 ] - arrI[ 2 ]) and its indices within A are [2,4,5,7] ( arr[ 2:6 ] == arr[ arrI[ 2 ] : arrI[ 2+1 ]]);
etc.
[in] | targetNb | - the size of the set B. targetNb must be equal or more than the maximal value of A. |
[out] | arr | - a new instance of DataArrayInt returning indices of elements of this, grouped by their place in the set B. The caller is to delete this array using decrRef() as it is no more needed. |
[out] | arrI | - a new instance of DataArrayInt returning size of groups of equal elements of this. The caller is to delete this array using decrRef() as it is no more needed. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
If | any value in this is more or equal to targetNb. |
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().
|
static |
Returns a new DataArrayInt containing a renumbering map in "Old to New" mode computed from a zip representation of a surjective format (returned e.g. by DataArrayDouble::findCommonTuples() for example). The result array minimizes the permutation.
For more info on renumbering see Array indexing and numbering.
Example:
[in] | nbOfOldTuples | - number of tuples in the initial array arr. |
[in] | arr | - the array of tuple indices grouped by arrIBg array. |
[in] | arrIBg | - the array dividing all indices stored in arr into groups of (indices of) equal values. Its every element (except the last one) points to the first element of a group of equal values. |
[in] | arrIEnd | - specifies the end of arrIBg, so that the last element of arrIBg is arrIEnd[ -1 ]. |
[out] | newNbOfTuples | - number of tuples after surjection application. |
If | any value of arr breaks condition ( 0 <= arr[ i ] < nbOfOldTuples ). |
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:
If | this is not allocated. |
If | this->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.
[in] | sizeExpected | - The number of elements expected. |
If | this is not allocated. |
If | this->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.
[in] | val | - value to check equality of array values to. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1 |
References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().
bool DataArrayInt::hasUniqueValues | ( | ) | const |
Checks if all values in this array are unique.
If | this is not allocated. |
If | this->getNumberOfComponents() != 1 |
References MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().
void DataArrayInt::meldWith | ( | const DataArrayInt * | other | ) |
Appends components of another array to components of this one, tuple by tuple. So that the number of tuples of this array remains the same and the number of components increases.
[in] | other | - the DataArrayInt to append to this one. |
If | this is not allocated. |
If | this and other arrays have different number of tuples. |
References MEDCoupling::C_DEALLOC, MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArray::copyPartOfStringInfoFrom2(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::useArray().
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.
[in] | a | - the array to copy data from. |
[in] | compoIds | - sequence of zero based indices of components, data of which is to be copied. |
If | a is NULL. |
If | compoIds.size() != a->getNumberOfComponents(). |
If | compoIds[i] < 0 or compoIds[i] > this->getNumberOfComponents(). |
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 |
|
static |
Assign pointer to one array to a pointer to another appay. Reference counter of arrayToSet is incremented / decremented.
[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::findIdsEqual | ( | int | val | ) | const |
Creates a new DataArrayInt containing IDs (indices) of tuples holding value equal to a given one. The ids are sorted in the ascending order.
[in] | val | - the value to find within this. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
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::MEDFileMesh::addGroupUnderground(), MEDCoupling::MEDCouplingFieldDiscretizationPerCell::checkNoOrphanCells(), MEDCoupling::MEDCouplingUMesh::computeSkin(), MEDCoupling::MEDCouplingUMesh::conformize3D(), MEDCoupling::MEDCouplingUMesh::findCellIdsOnBoundary(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), and MEDCoupling::MEDCouplingUMesh::splitProfilePerType().
DataArrayInt * DataArrayInt::findIdsNotEqual | ( | int | val | ) | const |
Creates a new DataArrayInt containing IDs (indices) of tuples holding value not equal to a given one.
[in] | val | - the value to ignore within this. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
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.
[in] | valsBg | - an array of values to find within this array. |
[in] | valsEnd | - specifies the end of the array valsBg, so that the last value of valsBg is valsEnd[ -1 ]. |
If | this->getNumberOfComponents() != 1. |
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.
[in] | valsBg | - an array of values to ignore within this array. |
[in] | valsEnd | - specifies the end of the array valsBg, so that the last value of valsBg is valsEnd[ -1 ]. |
If | this->getNumberOfComponents() != 1. |
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.
[in] | tupleBg | - the begin (included) of the input tuple to find within this. |
[in] | tupleEnd | - the end (excluded) of the input tuple to find within this. |
If | this is not allocated. |
If | this->getNumberOfComponents() != std::distance(tupleBg,tupleEnd). |
If | this->getNumberOfComponents() is equal to 0. |
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.
[in] | oldValue | - the value to replace. |
[in] | newValue | - the value to assign. |
If | this is not allocated. |
If | this->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.
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.
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.
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.
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.
References findIdFirstEqualTuple().
bool DataArrayInt::presenceOfValue | ( | int | value | ) | const |
Returns true if a given value is present within this one-dimensional array.
[in] | value | - the value to find within this array. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
References findIdFirstEqual().
Referenced by MEDCoupling::MEDCouplingUMesh::areCellsIncludedInPolicy7(), MEDCoupling::MEDFileMesh::ensureDifferentFamIdsPerLevel(), MEDCoupling::MEDFileStructuredMesh::getFamsNonEmptyLevels(), MEDCoupling::MEDFileUMesh::getFamsNonEmptyLevelsExt(), MEDCoupling::MEDFileStructuredMesh::getFamsNonEmptyLevelsExt(), MEDCoupling::MEDFileMesh::normalizeFamIdsMEDFile(), MEDCoupling::MEDFileMesh::normalizeFamIdsTrio(), and MEDCoupling::MEDFileMesh::removeOrphanFamilies().
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.
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.
this->getNumberOfTuples()
)If | this 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.
[out] | res | - an array of length this->getNumberOfComponents(), allocated by the caller, that is filled by this method with sum value for each component. |
If | this is not allocated. |
References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples().
Referenced by MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getMeasureField(), and splitInBalancedSlices().
int DataArrayInt::accumulate | ( | int | compId | ) | const |
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
).
[in] | bgOfIndex | - begin (included) of the input index array. |
[in] | endOfIndex | - end (excluded) of the input index array. |
If | bgOfIndex or end is NULL. |
If | input index array is not ascendingly sorted. |
If | there is an id in [ bgOfIndex, endOfIndex ) not in [0, this->getNumberOfTuples ). |
If | std::distance(bgOfIndex,endOfIndex)==0. |
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.
[out] | minValue | - the min value in this. |
[out] | maxValue | - the max value in this. |
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.
If | this is not allocated. |
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.
If | this is not allocated. |
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 | ||
) |
Apply a liner function to a given component of this array, so that an array element (x) becomes .
[in] | a | - the first coefficient of the function. |
[in] | b | - the second coefficient of the function. |
[in] | compoId | - the index of component to modify. |
If | this is not allocated. |
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::MEDCouplingMappedExtrudedMesh::computeNbOfFacesPerCell(), MEDCoupling::MEDCouplingMappedExtrudedMesh::computeNbOfNodesPerCell(), MEDCoupling::MEDFileUMesh::linearToQuadratic(), and MEDCoupling::MEDFileMesh::TranslateFamilyIds().
void DataArrayInt::applyLin | ( | int | a, |
int | b | ||
) |
Apply a liner function to all elements of this array, so that an element x becomes .
[in] | a | - the first coefficient of the function. |
[in] | b | - the second coefficient of the function. |
If | this 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 .
[in] | numerator | - the numerator used to modify array elements. |
If | this is not allocated. |
If | there is an element equal to 0 in this array. |
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.
If | this 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 .
[in] | val | - the denominator used to modify array elements. |
If | this is not allocated. |
If | val == 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 .
[in] | val | - the divisor used to modify array elements. |
If | this is not allocated. |
If | val <= 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 .
[in] | val | - the divident used to modify array elements. |
If | this is not allocated. |
If | there is an element equal to or less than 0 in this array. |
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 .
[in] | val | - the value used to apply pow on all array elements. |
If | this is not allocated. |
If | val < 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 .
[in] | val | - the value used to apply pow on all array elements. |
If | this is not allocated. |
If | there is an element < 0 in this array. |
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)
[in] | vmin | begin of range. This value is included in range (included). |
[in] | vmax | end of range. This value is not included in range (excluded). |
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)
[in] | vmin | begin of range. This value is not included in range (excluded). |
[in] | vmax | end of range. This value is included in range (included). |
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.
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.
[in] | vmin | begin of range. This value is included in range (included). |
[in] | vmax | end of range. This value is not included in range (excluded). |
this->getNumberOfTuples()
). 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().
|
static |
Returns a new DataArrayInt by concatenating two given arrays, so that (1) the number of tuples in the result array is a1->getNumberOfTuples() + a2->getNumberOfTuples() - offsetA2 and (2) the number of component in the result array is same as that of each of given arrays. First offsetA2 tuples of a2 are skipped and thus are missing from the result array. Info on components is copied from the first of the given arrays. Number of components in the given arrays must be the same.
[in] | a1 | - an array to include in the result array. |
[in] | a2 | - another array to include in the result array. |
[in] | offsetA2 | - number of tuples of a2 to skip. |
If | either a1 or a2 is NULL. |
If | a1->getNumberOfComponents() != a2->getNumberOfComponents(). |
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().
|
static |
Returns a new DataArrayInt by concatenating all given arrays, so that (1) the number of tuples in the result array is a sum of the number of tuples of given arrays and (2) the number of component in the result array is same as that of each of given arrays. Info on components is copied from the first of the given arrays. Number of components in the given arrays must be the same. If the number of non null of elements in arr is equal to one the returned object is a copy of it not the object itself.
[in] | arr | - a sequence of arrays to include in the result array. |
If | all arrays within arr are NULL. |
If | getNumberOfComponents() of arrays within arr. |
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().
|
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.
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().
|
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.
[in] | a1 | - an array to include in the result array. |
[in] | a2 | - another array to include in the result array. |
If | both a1 and a2 are NULL. |
If | any given array is not allocated. |
If | a1->getNumberOfTuples() != a2->getNumberOfTuples() |
|
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.
[in] | arr | - a sequence of arrays to include in the result array. |
If | all arrays within arr are NULL. |
If | any given array is not allocated. |
If | getNumberOfTuples() of arrays within arr is different. |
References MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::getConstPointer(), and New().
|
static |
Returns a new DataArrayInt which is a minimal partition of elements of groups. The i-th item of the result array is an ID of a set of elements belonging to a unique set of groups, which the i-th element is a part of. This set of elements belonging to a unique set of groups is called family, so the result array contains IDs of families each element belongs to.
Example: if we have two groups of elements: group1 [0,4] and group2 [ 0,1,2 ], then there are 3 families:
[in] | groups | - sequence of groups of element IDs. |
[in] | newNb | - total number of elements; it must be more than max ID of element in groups. |
[out] | fidsOfGroups | - IDs of families the elements of each group belong to. |
If | any element ID in groups violates condition ( 0 <= ID < newNb ). |
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().
Referenced by MEDCoupling::MEDFileMesh::setGroupsAtLevel().
|
static |
Returns a new DataArrayInt which contains all elements of given one-dimensional arrays. The result array does not contain any duplicates and its values are sorted in ascending order.
[in] | arr | - sequence of DataArrayInt's to unite. |
If | any arr[i] is not allocated. |
If | arr[i]->getNumberOfComponents() != 1. |
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().
Referenced by buildUnion().
|
static |
Returns a new DataArrayInt which contains elements present in each of given one-dimensional arrays. The result array does not contain any duplicates and its values are sorted in ascending order.
[in] | arr | - sequence of DataArrayInt's to intersect. |
If | any arr[i] is not allocated. |
If | arr[i]->getNumberOfComponents() != 1. |
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().
Referenced by buildIntersection(), and MEDCoupling::MEDFileUMesh::checkSMESHConsistency().
|
static |
This method returns the list of ids in ascending mode so that v[id]==true.
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().
Referenced by MEDCoupling::MEDCouplingUMesh::computeFetchedNodeIds(), and MEDCoupling::MEDFileUMesh::deduceNodeSubPartFromCellSubPart().
|
static |
This method returns the list of ids in ascending mode so that v[id]==false.
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().
Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildUnstructured(), and MEDCoupling::MEDFileMesh::rearrangeFamilies().
|
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> >.
[in] | v | the input data structure to be translate into skyline format. |
[out] | data | the first element of the skyline format. The user is expected to deal with newly allocated array. |
[out] | dataIndex | the second element of the skyline format. |
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.
[in] | nbOfElement | - maximal size of the result array. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
If | any element x of this array violates condition ( 0 <= x < nbOfElement ). |
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 |
Returns a new DataArrayInt containing elements of this one-dimensional missing from an other one-dimensional array.
[in] | other | - a DataArrayInt containing elements not to include in the result array. |
If | other is NULL. |
If | other is not allocated. |
If | other->getNumberOfComponents() != 1. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
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< int >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), and New().
Referenced by MEDCoupling::MEDCouplingUMesh::findNodesToDuplicate(), and MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine().
DataArrayInt * DataArrayInt::buildSubstractionOptimized | ( | const DataArrayInt * | other | ) | const |
this is expected to have one component and to be sorted ascendingly (as for other). other is expected to be a part of this. If not DataArrayInt::buildSubstraction should be called instead.
[in] | other | an array with one component and expected to be sorted ascendingly. list of ids in this but not in other. |
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::end(), MEDCoupling::DataArray::getNumberOfComponents(), New(), MEDCoupling::DataArrayTemplate< T >::pushBackSilent(), and MEDCoupling::MCAuto< T >::retn().
Referenced by MEDCoupling::MEDFileMesh::addGroupUnderground().
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.
[in] | other | - an array to unite with this one. |
If | this or other is not allocated. |
If | this->getNumberOfComponents() != 1. |
If | other->getNumberOfComponents() != 1. |
References 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.
[in] | other | - an array to intersect with this one. |
If | this or other is not allocated. |
If | this->getNumberOfComponents() != 1. |
If | other->getNumberOfComponents() != 1. |
References 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]
if | this is not allocated or if this has not exactly one component. |
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.
if | this is not allocated or if this has not exactly one component. |
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.
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
If | this->getNumberOfTuples() < 2. |
Example:
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 . Or: for each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. Number of tuples and components remains the same.
This method is useful for allToAllV in MPI with contiguous policy. This method differs from computeOffsetsFull() in that the number of tuples is not changed by this one.
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
Example:
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 . 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.
If | this is not allocated. |
If | this->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.
[in] | listOfIds | a list of ids that has to be sorted ascendingly. |
[out] | rangeIdsFetched | the range ids fetched |
[out] | idsInInputListThatFetch | contains the list of ids in listOfIds that are fully included in a range in this. So idsInInputListThatFetch is a part of input listOfIds. |
Example:
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.
If | offsets is NULL. |
If | offsets is not allocated. |
If | offsets->getNumberOfComponents() != 1. |
If | offsets is not monotonically increasing. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
If | any element of this is not a valid index for offsets array. |
Example:
range(0,3)
+ range(6,10)
+ range(10,14)
==range
( offsets[ this[0] ], offsets[ this[0]+1 ]) + range
( offsets[ this[1] ], offsets[ this[1]+1 ]) + range
( offsets[ this[2] ], offsets[ this[2]+1 ]) 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.
If | is NULL. |
If | this is not allocated. |
If | this->getNumberOfComponents() != 1. |
If | this->getNumberOfTuples() == 0. |
If | this is not monotonically increasing. |
If | any element of ids in ( bg stop step ) points outside the scale in this. \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]**
[in] | ranges | typically come from output of MEDCouplingUMesh::ComputeRangesFromTypeDistribution. Each range is specified like this : 1st component is for lower value included and 2nd component is the upper value of corresponding range excluded. |
If | offsets is a null pointer or does not have 2 components or if this is not allocated or this do not have exactly one component. To finish an exception is thrown if no ranges in ranges contains value in this. |
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.
[in] | ranges | typically come from output of MEDCouplingUMesh::ComputeRangesFromTypeDistribution. Each range is specified like this : 1st component is for lower value included and 2nd component is the upper value of corresponding range excluded. |
If | offsets is a null pointer or does not have 2 components or if this is not allocated or this do not have exactly one component. To finish an exception is thrown if no ranges in ranges contains value in this. |
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.
References MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().
DataArrayInt * DataArrayInt::duplicateEachTupleNTimes | ( | int | nbTimes | ) | const |
[in] | nbTimes | specifies the nb of times each tuples in this will be duplicated contiguouly in returned DataArrayInt instance. nbTimes should be at least equal to 1. |
this->getNumberOfTuples
. if | this 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().
DataArrayInt * DataArrayInt::getDifferentValues | ( | ) | const |
This method returns all different values found in this. This method throws if this has not been allocated. But the number of components can be different from one.
References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< int >::begin(), MEDCoupling::DataArrayTemplate< int >::checkAllocated(), MEDCoupling::DataArrayTemplate< int >::end(), MEDCoupling::DataArrayTemplate< T >::getPointer(), New(), and MEDCoupling::MCAuto< T >::retn().
Referenced by MEDCoupling::MEDFileMesh::addGroupUnderground(), MEDCoupling::MEDFileMesh::computeAllFamilyIdsInUse(), MEDCoupling::MEDFileMesh::createGroupOnAll(), MEDCoupling::MEDFileMesh::ensureDifferentFamIdsPerLevel(), MEDCoupling::MEDFileMesh::keepFamIdsOnlyOnLevs(), MEDCoupling::MEDFileMesh::normalizeFamIdsMEDFile(), MEDCoupling::MEDFileMesh::normalizeFamIdsTrio(), MEDCoupling::MEDFileUMesh::optimizeFamilies(), and MEDCoupling::MEDFileMesh::setGroupsAtLevel().
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.
[in] | nbOfSlices | - number of slices expected. |
If | this is not allocated or not with exactly one component. |
If | an 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::insertAtTheEnd | ( | InputIterator | first, |
InputIterator | last | ||
) |
References MEDCoupling::DataArray::_info_on_compo, MEDCoupling::DataArrayTemplate< int >::_mem, MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::MemArray< T >::insertAtTheEnd().
Referenced by MEDCoupling::MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(), MEDCoupling::MEDCouplingUMesh::ComputeNeighborsOfCellsAdv(), MEDCoupling::DataArrayDouble::findCommonTuplesAlg(), MEDCoupling::DataArrayDouble::FindTupleIdsNearTuplesAlg(), MEDCoupling::MEDCouplingMesh::getCellsContainingPoints(), MEDCoupling::MEDCouplingUMesh::simplifyPolyhedra(), and MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell().
void DataArrayInt::aggregate | ( | const DataArrayInt * | other | ) |
void MEDCoupling::DataArrayInt::writeOnPlace | ( | std::size_t | id, |
int | element0, | ||
const int * | others, | ||
int | sizeOfOthers | ||
) |
Referenced by MEDCoupling::MEDCouplingUMesh::insertNextCell().
|
static |
Returns a new DataArrayInt that is a sum of two given arrays. There are 3 valid cases.
Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).
[in] | a1 | - an array to sum up. |
[in] | a2 | - another array to sum up. |
If | either a1 or a2 is NULL. |
If | a1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1. |
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.
[in] | other | - an array to add to this one. |
If | other is NULL. |
If | this->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1. |
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().
|
static |
Returns a new DataArrayInt that is a subtraction of two given arrays. There are 3 valid cases.
Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).
[in] | a1 | - an array to subtract from. |
[in] | a2 | - an array to subtract. |
If | either a1 or a2 is NULL. |
If | a1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1. |
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.
[in] | other | - an array to subtract from this one. |
If | other is NULL. |
If | this->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1. |
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().
|
static |
Returns a new DataArrayInt that is a product of two given arrays. There are 3 valid cases.
Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).
[in] | a1 | - a factor array. |
[in] | a2 | - another factor array. |
If | either a1 or a2 is NULL. |
If | a1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1. |
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.
[in] | other | - an array to multiply to this one. |
If | other is NULL. |
If | this->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1. |
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().
|
static |
Returns a new DataArrayInt that is a division of two given arrays. There are 3 valid cases.
Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).
[in] | a1 | - a numerator array. |
[in] | a2 | - a denominator array. |
If | either a1 or a2 is NULL. |
If | a1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1. |
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.
[in] | other | - an array to divide this one by. |
If | other is NULL. |
If | this->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1. |
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().
|
static |
Returns a new DataArrayInt that is a modulus of two given arrays. There are 3 valid cases.
Info on components is copied either from the first array (in the first case) or from the array with maximal number of elements (getNbOfElems()).
[in] | a1 | - a dividend array. |
[in] | a2 | - a divisor array. |
If | either a1 or a2 is NULL. |
If | a1->getNumberOfTuples() != a2->getNumberOfTuples() and a1->getNumberOfComponents() != a2->getNumberOfComponents() and none of them has number of tuples or components equal to 1. |
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.
[in] | other | - a divisor array. |
If | other is NULL. |
If | this->getNumberOfTuples() != other->getNumberOfTuples() and this->getNumberOfComponents() != other->getNumberOfComponents() and other has number of both tuples and components not equal to 1. |
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().
|
static |
Returns a new DataArrayInt that is the result of pow of two given arrays. There are 3 valid cases.
[in] | a1 | - an array to pow up. |
[in] | a2 | - another array to sum up. |
If | either a1 or a2 is NULL. |
If | a1->getNumberOfTuples() != a2->getNumberOfTuples() |
If | a1->getNumberOfComponents() != 1 or a2->getNumberOfComponents() != 1. |
If | there is a negative value in a2. |
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 | ) |
Apply pow on values of another DataArrayInt to values of this one.
[in] | other | - an array to pow to this one. |
If | other is NULL. |
If | this->getNumberOfTuples() != other->getNumberOfTuples() |
If | this->getNumberOfComponents() != 1 or other->getNumberOfComponents() != 1 |
If | there is a negative value in other. |
References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< int >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< int >::getPointer().
|
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 |
|
static |
Returns a C array which is a renumbering map in "Old to New" mode for the input array. This map, if applied to start array, would make it sorted. For example, if start array contents are [9,10,0,6,4,11,3,7] then the contents of the result array is [5,6,0,3,2,7,1,4].
[in] | start | - pointer to the first element of the array for which the permutation map is computed. |
[in] | end | - pointer specifying the end of the array start, so that the last value of start is end[ -1 ]. |
If | there are equal values in the input array. |
References MEDCoupling::DataArrayTemplate< int >::end().
Referenced by checkAndPreparePermutation(), MEDCoupling::MEDCouplingFieldDiscretizationP0::renumberArraysForCell(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::renumberArraysForCell(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::renumberArraysForCell(), MEDCoupling::MEDCouplingUMesh::renumberCells(), and MEDCoupling::MEDCouplingFieldDiscretizationPerCell::renumberCells().
|
static |
Returns a new DataArrayInt containing an arithmetic progression that is equal to the sequence returned by Python range
(begin,end,step ) function.
[in] | begin | - the start value of the result sequence. |
[in] | end | - limiting value, so that every value of the result array is less than end. |
[in] | step | - specifies the increment or decrement. |
If | step == 0. |
If | end < begin && step > 0. |
If | end > begin && step < 0. |
References MEDCoupling::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().