Back to index

salome-med  6.5.0
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes
ParaMEDMEM::DataArrayInt Class Reference

#include <MEDCouplingMemArray.hxx>

Inheritance diagram for ParaMEDMEM::DataArrayInt:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::DataArrayInt:
Collaboration graph
[legend]

List of all members.

Public Member Functions

MEDCOUPLING_EXPORT bool isAllocated () const
MEDCOUPLING_EXPORT void checkAllocated () const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void setInfoAndChangeNbOfCompo (const std::vector< std::string > &info) throw (INTERP_KERNEL::Exception)
 This method differs from DataArray::setInfoOnComponents in the sense that if 'this->getNumberOfComponents()!=info.size()' and if 'this' is not allocated it will change the number of components of 'this'.
MEDCOUPLING_EXPORT int intValue () const throw (INTERP_KERNEL::Exception)
 This method 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.
MEDCOUPLING_EXPORT int getHashCode () const throw (INTERP_KERNEL::Exception)
 This method expects that this is well allocated.
MEDCOUPLING_EXPORT bool empty () const throw (INTERP_KERNEL::Exception)
 This method should be called on an allocated DataArrayInt instance.
MEDCOUPLING_EXPORT DataArrayIntdeepCpy () const
MEDCOUPLING_EXPORT DataArrayIntperformCpy (bool deepCpy) const
MEDCOUPLING_EXPORT void cpyFrom (const DataArrayInt &other) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void alloc (int nbOfTuple, int nbOfCompo) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void allocIfNecessary (int nbOfTuple, int nbOfCompo)
MEDCOUPLING_EXPORT bool isEqual (const DataArrayInt &other) const
MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr (const DataArrayInt &other) const
MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStrAndOrder (const DataArrayInt &other) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntbuildPermutationArr (const DataArrayInt &other) const throw (INTERP_KERNEL::Exception)
 This method expects that 'this' and 'other' have the same number of tuples and exactly one component both.
MEDCOUPLING_EXPORT void sort () throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void reverse () throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void fillWithZero () throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void fillWithValue (int val) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void iota (int init=0) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT std::string repr () const
MEDCOUPLING_EXPORT std::string reprZip () const
MEDCOUPLING_EXPORT void writeVTK (std::ostream &ofs, int indent, const char *type, const char *nameInFile) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void reprStream (std::ostream &stream) const
MEDCOUPLING_EXPORT void reprZipStream (std::ostream &stream) const
MEDCOUPLING_EXPORT void reprWithoutNameStream (std::ostream &stream) const
MEDCOUPLING_EXPORT void reprZipWithoutNameStream (std::ostream &stream) const
MEDCOUPLING_EXPORT void transformWithIndArr (const int *indArrBg, const int *indArrEnd) throw (INTERP_KERNEL::Exception)
 This method expects a number of components equal to 1.
MEDCOUPLING_EXPORT DataArrayInttransformWithIndArrR (const int *indArrBg, const int *indArrEnd) const throw (INTERP_KERNEL::Exception)
 This method expects a number of components equal to 1.
MEDCOUPLING_EXPORT void splitByValueRange (const int *arrBg, const int *arrEnd, DataArrayInt *&castArr, DataArrayInt *&rankInsideCast, DataArrayInt *&castsPresent) const throw (INTERP_KERNEL::Exception)
 'this' should be allocated and with numberOfComponents set to one.
MEDCOUPLING_EXPORT DataArrayIntinvertArrayO2N2N2O (int newNbOfElem) const
 This method invert array 'di' that is a conversion map from Old to New numbering to New to Old numbering.
MEDCOUPLING_EXPORT DataArrayIntinvertArrayN2O2O2N (int oldNbOfElem) const
 This method invert array 'di' that is a conversion map from New to old numbering to Old to New numbering.
MEDCOUPLING_EXPORT void reAlloc (int nbOfTuples) throw (INTERP_KERNEL::Exception)
 alloc or useArray should have been called before.
MEDCOUPLING_EXPORT
DataArrayDouble
convertToDblArr () const
MEDCOUPLING_EXPORT DataArrayIntfromNoInterlace () const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayInttoNoInterlace () const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void renumberInPlace (const int *old2New)
MEDCOUPLING_EXPORT void renumberInPlaceR (const int *new2Old)
MEDCOUPLING_EXPORT DataArrayIntrenumber (const int *old2New) const
 This method expects that 'this' is allocated, if not an exception is thrown.
MEDCOUPLING_EXPORT DataArrayIntrenumberR (const int *new2Old) const
MEDCOUPLING_EXPORT DataArrayIntrenumberAndReduce (const int *old2NewBg, int newNbOfTuple) const
 Idem DataArrayDouble::renumber method except that the number of tuples is reduced.
MEDCOUPLING_EXPORT DataArrayIntselectByTupleId (const int *new2OldBg, const int *new2OldEnd) const
 This method is a generalization of DataArrayDouble::substr method because a not contigous range can be specified here.
MEDCOUPLING_EXPORT DataArrayIntselectByTupleIdSafe (const int *new2OldBg, const int *new2OldEnd) const throw (INTERP_KERNEL::Exception)
 This method is equivalent to DataArrayInt::selectByTupleId except that an analyze to the content of input range to check that it will not lead to memory corruption !
MEDCOUPLING_EXPORT DataArrayIntselectByTupleId2 (int bg, int end, int step) const throw (INTERP_KERNEL::Exception)
 Idem than DataArrayInt::selectByTupleIdSafe except that the input array is not constructed explicitely.
MEDCOUPLING_EXPORT DataArrayIntselectByTupleRanges (const std::vector< std::pair< int, int > > &ranges) const throw (INTERP_KERNEL::Exception)
 This method returns a newly allocated array that is the concatenation of all tuples ranges in param 'ranges'.
MEDCOUPLING_EXPORT DataArrayIntcheckAndPreparePermutation () const throw (INTERP_KERNEL::Exception)
 This method works only for arrays having single component.
MEDCOUPLING_EXPORT void changeSurjectiveFormat (int targetNb, DataArrayInt *&arr, DataArrayInt *&arrI) const throw (INTERP_KERNEL::Exception)
 This method makes the assumption that 'this' is correctly set, and has exactly one component.
MEDCOUPLING_EXPORT DataArrayIntbuildPermArrPerLevel () const throw (INTERP_KERNEL::Exception)
 This method expects that 'this' is allocated and with only one component.
MEDCOUPLING_EXPORT bool isIdentity () const throw (INTERP_KERNEL::Exception)
 This method checks that 'this' is with numberofcomponents == 1 and that it is equal to stdext::iota() of size getNumberOfTuples.
MEDCOUPLING_EXPORT bool isUniform (int val) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntsubstr (int tupleIdBg, int tupleIdEnd=-1) const throw (INTERP_KERNEL::Exception)
 This methods has a similar behaviour than std::string::substr.
MEDCOUPLING_EXPORT void rearrange (int newNbOfCompo) throw (INTERP_KERNEL::Exception)
 Contrary to DataArrayInt::changeNbOfComponents method this method is not const.
MEDCOUPLING_EXPORT void transpose () throw (INTERP_KERNEL::Exception)
 This method makes the assumption that this is allocated.
MEDCOUPLING_EXPORT DataArrayIntchangeNbOfComponents (int newNbOfComp, int dftValue) const throw (INTERP_KERNEL::Exception)
 This method builds a new instance of DataArrayInt (to deal with) that is reduction or an extension of 'this'.
MEDCOUPLING_EXPORT DataArrayIntkeepSelectedComponents (const std::vector< int > &compoIds) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void meldWith (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
 This method melds the components of 'this' with components of 'other'.
MEDCOUPLING_EXPORT void setSelectedComponents (const DataArrayInt *a, const std::vector< int > &compoIds) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void setPartOfValues1 (const DataArrayInt *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw (INTERP_KERNEL::Exception)
 This method performs a partial assignment of 'this' using 'a' as input.
MEDCOUPLING_EXPORT void setPartOfValuesSimple1 (int a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw (INTERP_KERNEL::Exception)
 This method performs a partial assignment of 'this' using 'a' as input.
MEDCOUPLING_EXPORT void setPartOfValues2 (const DataArrayInt *a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp, bool strictCompoCompare=true) throw (INTERP_KERNEL::Exception)
 This method performs a partial assignment of 'this' using 'a' as input.
MEDCOUPLING_EXPORT void setPartOfValuesSimple2 (int a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp) throw (INTERP_KERNEL::Exception)
 This method performs a partial assignment of 'this' using 'a' as input.
MEDCOUPLING_EXPORT void setPartOfValues3 (const DataArrayInt *a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true) throw (INTERP_KERNEL::Exception)
 This method performs a partial assignment of 'this' using 'a' as input.
MEDCOUPLING_EXPORT void setPartOfValuesSimple3 (int a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp) throw (INTERP_KERNEL::Exception)
 This method performs a partial assignment of 'this' using 'a' as input.
MEDCOUPLING_EXPORT void setPartOfValuesAdv (const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw (INTERP_KERNEL::Exception)
 'this', 'a' and 'tuplesSelec' are expected to be defined.
MEDCOUPLING_EXPORT void setContigPartOfSelectedValues (int tupleIdStart, const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw (INTERP_KERNEL::Exception)
 'this', 'a' and 'tuplesSelec' are expected to be defined.
MEDCOUPLING_EXPORT void setContigPartOfSelectedValues2 (int tupleIdStart, const DataArrayInt *a, int bg, int end2, int step) throw (INTERP_KERNEL::Exception)
 'this' and 'a' are expected to be defined.
MEDCOUPLING_EXPORT void getTuple (int tupleId, int *res) const
MEDCOUPLING_EXPORT int getIJ (int tupleId, int compoId) const
MEDCOUPLING_EXPORT int getIJSafe (int tupleId, int compoId) const throw (INTERP_KERNEL::Exception)
 This method is equivalent to DataArrayInt::getIJ except that here tupleId is checked to be in [0,this->getNumberOfTuples()) and compoId to be in [0,this->getNumberOfComponents()).
MEDCOUPLING_EXPORT int back () const throw (INTERP_KERNEL::Exception)
 This method returns the last element in 'this'.
MEDCOUPLING_EXPORT void setIJ (int tupleId, int compoId, int newVal)
MEDCOUPLING_EXPORT void setIJSilent (int tupleId, int compoId, int newVal)
MEDCOUPLING_EXPORT int * getPointer ()
MEDCOUPLING_EXPORT const int * getConstPointer () const
MEDCOUPLING_EXPORT
DataArrayIntIterator
iterator ()
MEDCOUPLING_EXPORT const int * begin () const
MEDCOUPLING_EXPORT const int * end () const
MEDCOUPLING_EXPORT DataArrayIntgetIdsEqual (int val) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntgetIdsNotEqual (int val) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntgetIdsEqualList (const std::vector< int > &vals) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntgetIdsNotEqualList (const std::vector< int > &vals) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT int changeValue (int oldValue, int newValue) throw (INTERP_KERNEL::Exception)
 This method expects that 'this' is allocated.
MEDCOUPLING_EXPORT bool presenceOfValue (const std::vector< int > &vals) const throw (INTERP_KERNEL::Exception)
 This method expects to be called when number of components of this is equal to one.
MEDCOUPLING_EXPORT int getMaxValue (int &tupleId) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT int getMaxValueInArray () const throw (INTERP_KERNEL::Exception)
 Idem to DataArrayInt::getMaxValue expect that here number of components can be >=1.
MEDCOUPLING_EXPORT int getMinValue (int &tupleId) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT int getMinValueInArray () const throw (INTERP_KERNEL::Exception)
 Idem to DataArrayInt::getMinValue expect that here number of components can be >=1.
MEDCOUPLING_EXPORT void abs () throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void applyLin (int a, int b, int compoId) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void applyLin (int a, int b) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void applyInv (int numerator) throw (INTERP_KERNEL::Exception)
 This method applies the operation 'numerator/x' for each element 'x' in 'this'.
MEDCOUPLING_EXPORT DataArrayIntnegate () const throw (INTERP_KERNEL::Exception)
 This method returns a newly allocated array containing the application of negate on this.
MEDCOUPLING_EXPORT void applyDivideBy (int val) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void applyModulus (int val) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void applyRModulus (int val) throw (INTERP_KERNEL::Exception)
 This method applies the operation 'numeratorx' for each element 'x' in 'this'.
MEDCOUPLING_EXPORT DataArrayIntbuildComplement (int nbOfElement) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntbuildSubstraction (const DataArrayInt *other) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntbuildUnion (const DataArrayInt *other) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntbuildIntersection (const DataArrayInt *other) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT DataArrayIntdeltaShiftIndex () const throw (INTERP_KERNEL::Exception)
 This method could be usefull for returned DataArrayInt marked as index.
MEDCOUPLING_EXPORT void computeOffsets () throw (INTERP_KERNEL::Exception)
 This method performs the work on itself.
MEDCOUPLING_EXPORT void computeOffsets2 () throw (INTERP_KERNEL::Exception)
 Idem DataArrayInt::computeOffsets method execpt that 'this' changes its number of tuples.
MEDCOUPLING_EXPORT DataArrayIntbuildExplicitArrByRanges (const DataArrayInt *offsets) const throw (INTERP_KERNEL::Exception)
 This method works on array with number of component equal to one and allocated.
MEDCOUPLING_EXPORT std::set< int > getDifferentValues () const throw (INTERP_KERNEL::Exception)
 This method returns all different values found in 'this'.
MEDCOUPLING_EXPORT void useArray (const int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo)
MEDCOUPLING_EXPORT void writeOnPlace (int id, int element0, const int *others, int sizeOfOthers)
MEDCOUPLING_EXPORT void addEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void substractEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void multiplyEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void divideEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void modulusEqual (const DataArrayInt *other) throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void updateTime () const
 nothing to do here because this class does not aggregate any TimeLabel instance.
MEDCOUPLING_EXPORT void getTinySerializationIntInformation (std::vector< int > &tinyInfo) const
 Useless method for end user.
MEDCOUPLING_EXPORT void getTinySerializationStrInformation (std::vector< std::string > &tinyInfo) const
 Useless method for end user.
MEDCOUPLING_EXPORT bool resizeForUnserialization (const std::vector< int > &tinyInfoI)
 Useless method for end user.
MEDCOUPLING_EXPORT void finishUnserialization (const std::vector< int > &tinyInfoI, const std::vector< std::string > &tinyInfoS)
 Useless method for end user.
def __init__
def isAllocated
def checkAllocated
def setInfoAndChangeNbOfCompo
def intValue
def getHashCode
def empty
def deepCpy
def performCpy
def cpyFrom
def alloc
def allocIfNecessary
def isEqual
def isEqualWithoutConsideringStr
def isEqualWithoutConsideringStrAndOrder
def buildPermutationArr
def sort
def reverse
def fillWithZero
def fillWithValue
def iota
def repr
def reprZip
def reprStream
def reprZipStream
def reprWithoutNameStream
def reprZipWithoutNameStream
def invertArrayO2N2N2O
def invertArrayN2O2O2N
def reAlloc
def convertToDblArr
def fromNoInterlace
def toNoInterlace
def selectByTupleId2
def checkAndPreparePermutation
def buildPermArrPerLevel
def isIdentity
def isUniform
def substr
def rearrange
def transpose
def changeNbOfComponents
def meldWith
def setPartOfValues1
def setPartOfValuesSimple1
def setPartOfValues2
def setPartOfValuesSimple2
def setPartOfValues3
def setPartOfValuesSimple3
def setPartOfValuesAdv
def setContigPartOfSelectedValues
def setContigPartOfSelectedValues2
def getIJ
def getIJSafe
def back
def setIJ
def setIJSilent
def getPointer
def getConstPointer
def iterator
def begin
def end
def getIdsEqual
def getIdsNotEqual
def getIdsEqualList
def getIdsNotEqualList
def changeValue
def presenceOfValue
def getMaxValueInArray
def getMinValueInArray
def abs
def applyLin
def applyInv
def negate
def applyDivideBy
def applyModulus
def applyRModulus
def buildComplement
def buildSubstraction
def buildUnion
def buildIntersection
def deltaShiftIndex
def computeOffsets
def computeOffsets2
def buildExplicitArrByRanges
def useArray
def writeOnPlace
def Add
def addEqual
def Substract
def substractEqual
def Multiply
def multiplyEqual
def Divide
def divideEqual
def Modulus
def modulusEqual
def updateTime
def CheckAndPreparePermutation
def Range
def getTinySerializationIntInformation
def getTinySerializationStrInformation
def resizeForUnserialization
def finishUnserialization
def New
def __str__
def __len__
def __int__
def __iter__
def getDifferentValues
def BuildOld2NewArrayFromSurjectiveFormat2
def setValues
def getValues
def getValuesAsTuple
def MakePartition
def transformWithIndArr
def splitByValueRange
def transformWithIndArrR
def renumberInPlace
def renumberInPlaceR
def renumberAndReduce
def renumber
def renumberR
def selectByTupleId
def selectByTupleIdSafe
def keepSelectedComponents
def setSelectedComponents
def getTuple
def changeSurjectiveFormat
def selectByTupleRanges
def Meld
def Aggregate
def BuildUnion
def BuildIntersection
def getMaxValue
def getMinValue
def __getitem__
def __setitem__
def __neg__
def __add__
def __radd__
def __iadd__
def __sub__
def __rsub__
def __isub__
def __mul__
def __rmul__
def __imul__
def __div__
def __rdiv__
def __idiv__
def __mod__
def __rmod__
def __imod__
MEDCOUPLING_EXPORT void setName (const char *name)
def setName
MEDCOUPLING_EXPORT void copyStringInfoFrom (const DataArray &other) throw (INTERP_KERNEL::Exception)
def copyStringInfoFrom
MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom (const DataArray &other, const std::vector< int > &compoIds) throw (INTERP_KERNEL::Exception)
def copyPartOfStringInfoFrom
MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom2 (const std::vector< int > &compoIds, const DataArray &other) throw (INTERP_KERNEL::Exception)
def copyPartOfStringInfoFrom2
MEDCOUPLING_EXPORT bool areInfoEquals (const DataArray &other) const
def areInfoEquals
MEDCOUPLING_EXPORT std::string getName () const
def getName
MEDCOUPLING_EXPORT const
std::vector< std::string > & 
getInfoOnComponents () const
MEDCOUPLING_EXPORT std::vector
< std::string > & 
getInfoOnComponents ()
def getInfoOnComponents
MEDCOUPLING_EXPORT void setInfoOnComponents (const std::vector< std::string > &info) throw (INTERP_KERNEL::Exception)
def setInfoOnComponents
MEDCOUPLING_EXPORT std::vector
< std::string > 
getVarsOnComponent () const
def getVarsOnComponent
MEDCOUPLING_EXPORT std::vector
< std::string > 
getUnitsOnComponent () const
def getUnitsOnComponent
MEDCOUPLING_EXPORT std::string getInfoOnComponent (int i) const throw (INTERP_KERNEL::Exception)
def getInfoOnComponent
MEDCOUPLING_EXPORT std::string getVarOnComponent (int i) const throw (INTERP_KERNEL::Exception)
 In the info part of i_th component this method returns the var part.
def getVarOnComponent
MEDCOUPLING_EXPORT std::string getUnitOnComponent (int i) const throw (INTERP_KERNEL::Exception)
 In the info part of i_th component this method returns the var part.
def getUnitOnComponent
MEDCOUPLING_EXPORT void setInfoOnComponent (int i, const char *info) throw (INTERP_KERNEL::Exception)
def setInfoOnComponent
MEDCOUPLING_EXPORT int getNumberOfComponents () const
def getNumberOfComponents
MEDCOUPLING_EXPORT int getNumberOfTuples () const
def getNumberOfTuples
MEDCOUPLING_EXPORT int getNbOfElems () const
def getNbOfElems
MEDCOUPLING_EXPORT void checkNbOfTuplesAndComp (const DataArray &other, const char *msg) const throw (INTERP_KERNEL::Exception)
MEDCOUPLING_EXPORT void checkNbOfTuplesAndComp (int nbOfTuples, int nbOfCompo, const char *msg) const throw (INTERP_KERNEL::Exception)
def checkNbOfTuplesAndComp
MEDCOUPLING_EXPORT void checkNbOfElems (int nbOfElems, const char *msg) const throw (INTERP_KERNEL::Exception)
def checkNbOfElems
def GetNumberOfItemGivenBES
def GetNumberOfItemGivenBESRelative
def GetVarNameFromInfo
def GetUnitFromInfo
def incrRef
def getHiddenCppPointer
def assign
def declareAsNew
def getTimeOfThis

Static Public Member Functions

static MEDCOUPLING_EXPORT
DataArrayInt
New ()
static MEDCOUPLING_EXPORT
DataArrayInt
BuildOld2NewArrayFromSurjectiveFormat2 (int nbOfOldTuples, const DataArrayInt *arr, const DataArrayInt *arrI, int &newNbOfTuples) throw (INTERP_KERNEL::Exception)
 This static method computes a old 2 new format DataArrayInt instance from a zip representation of a surjective format (retrived by DataArrayDouble::findCommonTuples for example) The retrieved array minimizes the permutation.
static MEDCOUPLING_EXPORT void SetArrayIn (DataArrayInt *newArray, DataArrayInt *&arrayToSet)
static MEDCOUPLING_EXPORT
DataArrayInt
Aggregate (const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2)
static MEDCOUPLING_EXPORT
DataArrayInt
Aggregate (const std::vector< const DataArrayInt * > &a) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
Meld (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
Meld (const std::vector< const DataArrayInt * > &a) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
MakePartition (const std::vector< const DataArrayInt * > &groups, int newNb, std::vector< std::vector< int > > &fidsOfGroups)
 This method create a minimal partition of groups 'groups' the std::iota array of size 'newNb'.
static MEDCOUPLING_EXPORT
DataArrayInt
BuildUnion (const std::vector< const DataArrayInt * > &a) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
BuildIntersection (const std::vector< const DataArrayInt * > &a) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
Add (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
Substract (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
Multiply (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
Divide (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
DataArrayInt
Modulus (const DataArrayInt *a1, const DataArrayInt *a2) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT int * CheckAndPreparePermutation (const int *start, const int *end)
static MEDCOUPLING_EXPORT
DataArrayInt
Range (int begin, int end, int step) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT int GetNumberOfItemGivenBES (int begin, int end, int step, const char *msg) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT int GetNumberOfItemGivenBESRelative (int begin, int end, int step, const char *msg) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
std::string 
GetVarNameFromInfo (const std::string &info) throw (INTERP_KERNEL::Exception)
static MEDCOUPLING_EXPORT
std::string 
GetUnitFromInfo (const std::string &info) throw (INTERP_KERNEL::Exception)

Static Protected Member Functions

static void CheckValueInRange (int ref, int value, const char *msg) throw (INTERP_KERNEL::Exception)
static void CheckClosingParInRange (int ref, int value, const char *msg) throw (INTERP_KERNEL::Exception)

Protected Attributes

int _nb_of_tuples
std::string _name
std::vector< std::string > _info_on_compo

Private Member Functions

 DataArrayInt ()

Private Attributes

MemArray< int > _mem

Static Private Attributes

dictionary __swig_setmethods__ = {}
tuple __setattr__ = lambdaself,name,value:_swig_setattr(self, DataArrayInt, name, value)
dictionary __swig_getmethods__ = {}
tuple __getattr__ = lambdaself,name:_swig_getattr(self, DataArrayInt, name)
 __repr__ = _swig_repr
 __swig_destroy__ = _ParaMEDMEM.delete_DataArrayInt

Detailed Description

1

Definition at line 317 of file MEDCouplingMemArray.hxx.


Constructor & Destructor Documentation

Definition at line 459 of file MEDCouplingMemArray.hxx.

{ }

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.__init__ (   self,
  args,
  kwargs 
)

Reimplemented from ParaMEDMEM::DataArray.

Definition at line 2591 of file ParaMEDMEM.py.

02591 
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")

Member Function Documentation

def ParaMEDMEM.DataArrayInt.__add__ (   self,
  args 
)
__add__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3775 of file ParaMEDMEM.py.

03775 
03776     def __add__(self, *args):
03777         """
03778         __add__(self, PyObject obj) -> DataArrayInt
03779 
03780         1
03781         """
03782         return _ParaMEDMEM.DataArrayInt___add__(self, *args)

def ParaMEDMEM.DataArrayInt.__div__ (   self,
  args 
)
__div__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3847 of file ParaMEDMEM.py.

03847 
03848     def __div__(self, *args):
03849         """
03850         __div__(self, PyObject obj) -> DataArrayInt
03851 
03852         1
03853         """
03854         return _ParaMEDMEM.DataArrayInt___div__(self, *args)

def ParaMEDMEM.DataArrayInt.__getitem__ (   self,
  args 
)
__getitem__(self, PyObject obj) -> PyObject

1

Definition at line 3751 of file ParaMEDMEM.py.

03751 
03752     def __getitem__(self, *args):
03753         """
03754         __getitem__(self, PyObject obj) -> PyObject
03755 
03756         1
03757         """
03758         return _ParaMEDMEM.DataArrayInt___getitem__(self, *args)

def ParaMEDMEM.DataArrayInt.__iadd__ (   self,
  args 
)
__iadd__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3791 of file ParaMEDMEM.py.

03791 
03792     def __iadd__(self, *args):
03793         """
03794         __iadd__(self, PyObject obj) -> DataArrayInt
03795 
03796         1
03797         """
03798         return _ParaMEDMEM.DataArrayInt___iadd__(self, *args)

def ParaMEDMEM.DataArrayInt.__idiv__ (   self,
  args 
)
__idiv__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3863 of file ParaMEDMEM.py.

03863 
03864     def __idiv__(self, *args):
03865         """
03866         __idiv__(self, PyObject obj) -> DataArrayInt
03867 
03868         1
03869         """
03870         return _ParaMEDMEM.DataArrayInt___idiv__(self, *args)

def ParaMEDMEM.DataArrayInt.__imod__ (   self,
  args 
)
__imod__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3887 of file ParaMEDMEM.py.

03887 
03888     def __imod__(self, *args):
03889         """
03890         __imod__(self, PyObject obj) -> DataArrayInt
03891 
03892         1
03893         """
03894         return _ParaMEDMEM.DataArrayInt___imod__(self, *args)

def ParaMEDMEM.DataArrayInt.__imul__ (   self,
  args 
)
__imul__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3839 of file ParaMEDMEM.py.

03839 
03840     def __imul__(self, *args):
03841         """
03842         __imul__(self, PyObject obj) -> DataArrayInt
03843 
03844         1
03845         """
03846         return _ParaMEDMEM.DataArrayInt___imul__(self, *args)

__int__(self) -> int

1

Definition at line 3477 of file ParaMEDMEM.py.

03477 
03478     def __int__(self):
03479         """
03480         __int__(self) -> int
03481 
03482         1
03483         """
03484         return _ParaMEDMEM.DataArrayInt___int__(self)

def ParaMEDMEM.DataArrayInt.__isub__ (   self,
  args 
)
__isub__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3815 of file ParaMEDMEM.py.

03815 
03816     def __isub__(self, *args):
03817         """
03818         __isub__(self, PyObject obj) -> DataArrayInt
03819 
03820         1
03821         """
03822         return _ParaMEDMEM.DataArrayInt___isub__(self, *args)

__iter__(self) -> DataArrayIntIterator

1

Definition at line 3485 of file ParaMEDMEM.py.

03485 
03486     def __iter__(self):
03487         """
03488         __iter__(self) -> DataArrayIntIterator
03489 
03490         1
03491         """
03492         return _ParaMEDMEM.DataArrayInt___iter__(self)

__len__(self) -> int

1

Definition at line 3469 of file ParaMEDMEM.py.

03469 
03470     def __len__(self):
03471         """
03472         __len__(self) -> int
03473 
03474         1
03475         """
03476         return _ParaMEDMEM.DataArrayInt___len__(self)

def ParaMEDMEM.DataArrayInt.__mod__ (   self,
  args 
)
__mod__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3871 of file ParaMEDMEM.py.

03871 
03872     def __mod__(self, *args):
03873         """
03874         __mod__(self, PyObject obj) -> DataArrayInt
03875 
03876         1
03877         """
03878         return _ParaMEDMEM.DataArrayInt___mod__(self, *args)

def ParaMEDMEM.DataArrayInt.__mul__ (   self,
  args 
)
__mul__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3823 of file ParaMEDMEM.py.

03823 
03824     def __mul__(self, *args):
03825         """
03826         __mul__(self, PyObject obj) -> DataArrayInt
03827 
03828         1
03829         """
03830         return _ParaMEDMEM.DataArrayInt___mul__(self, *args)

__neg__(self) -> DataArrayInt

1

Definition at line 3767 of file ParaMEDMEM.py.

03767 
03768     def __neg__(self):
03769         """
03770         __neg__(self) -> DataArrayInt
03771 
03772         1
03773         """
03774         return _ParaMEDMEM.DataArrayInt___neg__(self)

def ParaMEDMEM.DataArrayInt.__radd__ (   self,
  args 
)
__radd__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3783 of file ParaMEDMEM.py.

03783 
03784     def __radd__(self, *args):
03785         """
03786         __radd__(self, PyObject obj) -> DataArrayInt
03787 
03788         1
03789         """
03790         return _ParaMEDMEM.DataArrayInt___radd__(self, *args)

def ParaMEDMEM.DataArrayInt.__rdiv__ (   self,
  args 
)
__rdiv__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3855 of file ParaMEDMEM.py.

03855 
03856     def __rdiv__(self, *args):
03857         """
03858         __rdiv__(self, PyObject obj) -> DataArrayInt
03859 
03860         1
03861         """
03862         return _ParaMEDMEM.DataArrayInt___rdiv__(self, *args)

def ParaMEDMEM.DataArrayInt.__rmod__ (   self,
  args 
)
__rmod__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3879 of file ParaMEDMEM.py.

03879 
03880     def __rmod__(self, *args):
03881         """
03882         __rmod__(self, PyObject obj) -> DataArrayInt
03883 
03884         1
03885         """
03886         return _ParaMEDMEM.DataArrayInt___rmod__(self, *args)

def ParaMEDMEM.DataArrayInt.__rmul__ (   self,
  args 
)
__rmul__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3831 of file ParaMEDMEM.py.

03831 
03832     def __rmul__(self, *args):
03833         """
03834         __rmul__(self, PyObject obj) -> DataArrayInt
03835 
03836         1
03837         """
03838         return _ParaMEDMEM.DataArrayInt___rmul__(self, *args)

def ParaMEDMEM.DataArrayInt.__rsub__ (   self,
  args 
)
__rsub__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3807 of file ParaMEDMEM.py.

03807 
03808     def __rsub__(self, *args):
03809         """
03810         __rsub__(self, PyObject obj) -> DataArrayInt
03811 
03812         1
03813         """
03814         return _ParaMEDMEM.DataArrayInt___rsub__(self, *args)

def ParaMEDMEM.DataArrayInt.__setitem__ (   self,
  args 
)
__setitem__(self, PyObject obj, PyObject value) -> DataArrayInt

1

Definition at line 3759 of file ParaMEDMEM.py.

03759 
03760     def __setitem__(self, *args):
03761         """
03762         __setitem__(self, PyObject obj, PyObject value) -> DataArrayInt
03763 
03764         1
03765         """
03766         return _ParaMEDMEM.DataArrayInt___setitem__(self, *args)

__str__(self) -> string

1

Definition at line 3461 of file ParaMEDMEM.py.

03461 
03462     def __str__(self):
03463         """
03464         __str__(self) -> string
03465 
03466         1
03467         """
03468         return _ParaMEDMEM.DataArrayInt___str__(self)

def ParaMEDMEM.DataArrayInt.__sub__ (   self,
  args 
)
__sub__(self, PyObject obj) -> DataArrayInt

1

Definition at line 3799 of file ParaMEDMEM.py.

03799 
03800     def __sub__(self, *args):
03801         """
03802         __sub__(self, PyObject obj) -> DataArrayInt
03803 
03804         1
03805         """
03806         return _ParaMEDMEM.DataArrayInt___sub__(self, *args)

void DataArrayInt::abs ( ) throw (INTERP_KERNEL::Exception)

Definition at line 4449 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  int *ptr=getPointer();
  int nbOfElems=getNbOfElems();
  std::transform(ptr,ptr+nbOfElems,ptr,std::ptr_fun<int,int>(std::abs));
}

Here is the call graph for this function:

Here is the caller graph for this function:

abs(self)

1

Definition at line 3160 of file ParaMEDMEM.py.

03160 
03161     def abs(self):
03162         """
03163         abs(self)
03164 
03165         1
03166         """
03167         return _ParaMEDMEM.DataArrayInt_abs(self)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::Add ( const DataArrayInt a1,
const DataArrayInt a2 
) throw (INTERP_KERNEL::Exception) [static]

Definition at line 4926 of file MEDCouplingMemArray.cxx.

{
  int nbOfTuple=a1->getNumberOfTuples();
  int nbOfTuple2=a2->getNumberOfTuples();
  int nbOfComp=a1->getNumberOfComponents();
  int nbOfComp2=a2->getNumberOfComponents();
  if(nbOfTuple!=nbOfTuple2)
    throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array Add !");
  DataArrayInt *ret=0;
  if(nbOfComp==nbOfComp2)
    {
      ret=DataArrayInt::New();
      ret->alloc(nbOfTuple,nbOfComp);
      std::transform(a1->begin(),a1->end(),a2->begin(),ret->getPointer(),std::plus<int>());
      ret->copyStringInfoFrom(*a1);
    }
  else
    {
      int nbOfCompMin,nbOfCompMax;
      const DataArrayInt *aMin, *aMax;
      if(nbOfComp>nbOfComp2)
        {
          nbOfCompMin=nbOfComp2; nbOfCompMax=nbOfComp;
          aMin=a2; aMax=a1;
        }
      else
        {
          nbOfCompMin=nbOfComp; nbOfCompMax=nbOfComp2;
          aMin=a1; aMax=a2;
        }
      if(nbOfCompMin==1)
        {
          ret=DataArrayInt::New();
          ret->alloc(nbOfTuple,nbOfCompMax);
          const int *aMinPtr=aMin->getConstPointer();
          const int *aMaxPtr=aMax->getConstPointer();
          int *res=ret->getPointer();
          for(int i=0;i<nbOfTuple;i++)
            res=std::transform(aMaxPtr+i*nbOfCompMax,aMaxPtr+(i+1)*nbOfCompMax,res,std::bind2nd(std::plus<int>(),aMinPtr[i]));
          ret->copyStringInfoFrom(*aMax);
        }
      else
        throw INTERP_KERNEL::Exception("Nb of components mismatch for array Add !");
    }
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Add(DataArrayInt a1, DataArrayInt a2) -> DataArrayInt

1

Definition at line 3298 of file ParaMEDMEM.py.

03298 
03299     def Add(*args):
03300         """
03301         Add(DataArrayInt a1, DataArrayInt a2) -> DataArrayInt
03302 
03303         1
03304         """
03305         return _ParaMEDMEM.DataArrayInt_Add(*args)

Here is the call graph for this function:

void DataArrayInt::addEqual ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)

Definition at line 4973 of file MEDCouplingMemArray.cxx.

{
  const char *msg="Nb of tuples mismatch for DataArrayInt::addEqual  !";
  int nbOfTuple=getNumberOfTuples();
  int nbOfTuple2=other->getNumberOfTuples();
  int nbOfComp=getNumberOfComponents();
  int nbOfComp2=other->getNumberOfComponents();
  if(nbOfTuple==nbOfTuple2)
    {
      if(nbOfComp==nbOfComp2)
        {
          std::transform(begin(),end(),other->begin(),getPointer(),std::plus<int>());
        }
      else if(nbOfComp2==1)
        {
          int *ptr=getPointer();
          const int *ptrc=other->getConstPointer();
          for(int i=0;i<nbOfTuple;i++)
            std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptr+i*nbOfComp,std::bind2nd(std::plus<int>(),*ptrc++));
        }
      else
        throw INTERP_KERNEL::Exception(msg);
    }
  else if(nbOfTuple2==1)
    {
      if(nbOfComp2==nbOfComp)
        {
          int *ptr=getPointer();
          const int *ptrc=other->getConstPointer();
          for(int i=0;i<nbOfTuple;i++)
            std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptrc,ptr+i*nbOfComp,std::plus<int>());
        }
      else
        throw INTERP_KERNEL::Exception(msg);
    }
  else
    throw INTERP_KERNEL::Exception(msg);
  declareAsNew();
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.addEqual (   self,
  args 
)
addEqual(self, DataArrayInt other)

1

Definition at line 3308 of file ParaMEDMEM.py.

03308 
03309     def addEqual(self, *args):
03310         """
03311         addEqual(self, DataArrayInt other)
03312 
03313         1
03314         """
03315         return _ParaMEDMEM.DataArrayInt_addEqual(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::Aggregate ( const DataArrayInt a1,
const DataArrayInt a2,
int  offsetA2 
) [static]

Definition at line 4366 of file MEDCouplingMemArray.cxx.

{
  int nbOfComp=a1->getNumberOfComponents();
  if(nbOfComp!=a2->getNumberOfComponents())
    throw INTERP_KERNEL::Exception("Nb of components mismatch for array Aggregation !");
  int nbOfTuple1=a1->getNumberOfTuples();
  int nbOfTuple2=a2->getNumberOfTuples();
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc(nbOfTuple1+nbOfTuple2-offsetA2,nbOfComp);
  int *pt=std::copy(a1->getConstPointer(),a1->getConstPointer()+nbOfTuple1*nbOfComp,ret->getPointer());
  std::copy(a2->getConstPointer()+offsetA2*nbOfComp,a2->getConstPointer()+nbOfTuple2*nbOfComp,pt);
  ret->copyStringInfoFrom(*a1);
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

DataArrayInt * DataArrayInt::Aggregate ( const std::vector< const DataArrayInt * > &  a) throw (INTERP_KERNEL::Exception) [static]

Definition at line 4381 of file MEDCouplingMemArray.cxx.

{
  if(a.empty())
    throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : input list must be NON EMPTY !");
  std::vector<const DataArrayInt *>::const_iterator it=a.begin();
  int nbOfComp=(*it)->getNumberOfComponents();
  int nbt=(*it++)->getNumberOfTuples();
  for(int i=1;it!=a.end();it++,i++)
    {
      if((*it)->getNumberOfComponents()!=nbOfComp)
        throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : Nb of components mismatch for array aggregation !");
      nbt+=(*it)->getNumberOfTuples();
    }
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc(nbt,nbOfComp);
  int *pt=ret->getPointer();
  for(it=a.begin();it!=a.end();it++)
    pt=std::copy((*it)->getConstPointer(),(*it)->getConstPointer()+(*it)->getNbOfElems(),pt);
  ret->copyStringInfoFrom(*(a[0]));
  return ret;
}

Here is the call graph for this function:

Aggregate(DataArrayInt a1, DataArrayInt a2, int offsetA2) -> DataArrayInt
Aggregate(std::vector<(p.q(const).ParaMEDMEM::DataArrayInt,std::allocator<(p.q(const).ParaMEDMEM::DataArrayInt)>)> a) -> DataArrayInt
Aggregate(PyObject li) -> DataArrayInt

1

Definition at line 3699 of file ParaMEDMEM.py.

03699 
03700     def Aggregate(*args):
03701         """
03702         Aggregate(DataArrayInt a1, DataArrayInt a2, int offsetA2) -> DataArrayInt
03703         Aggregate(std::vector<(p.q(const).ParaMEDMEM::DataArrayInt,std::allocator<(p.q(const).ParaMEDMEM::DataArrayInt)>)> a) -> DataArrayInt
03704         Aggregate(PyObject li) -> DataArrayInt
03705 
03706         1
03707         """
03708         return _ParaMEDMEM.DataArrayInt_Aggregate(*args)

Here is the call graph for this function:

void DataArrayInt::alloc ( int  nbOfTuple,
int  nbOfCompo 
) throw (INTERP_KERNEL::Exception)

Definition at line 2981 of file MEDCouplingMemArray.cxx.

{
  if(nbOfTuple<0 || nbOfCompo<0)
    throw INTERP_KERNEL::Exception("DataArrayDouble::alloc : request for negative length of data !");
  _nb_of_tuples=nbOfTuple;
  _info_on_compo.resize(nbOfCompo);
  _mem.alloc(nbOfCompo*_nb_of_tuples);
  declareAsNew();
}
def ParaMEDMEM.DataArrayInt.alloc (   self,
  args 
)
alloc(self, int nbOfTuple, int nbOfCompo)

1

Definition at line 2665 of file ParaMEDMEM.py.

02665 
02666     def alloc(self, *args):
02667         """
02668         alloc(self, int nbOfTuple, int nbOfCompo)
02669 
02670         1
02671         """
02672         return _ParaMEDMEM.DataArrayInt_alloc(self, *args)

Here is the call graph for this function:

void DataArrayInt::allocIfNecessary ( int  nbOfTuple,
int  nbOfCompo 
)

Definition at line 2970 of file MEDCouplingMemArray.cxx.

{
  if(isAllocated())
    {
      if(nbOfTuple!=getNumberOfTuples() || nbOfCompo!=getNumberOfComponents())
        alloc(nbOfTuple,nbOfCompo);
    }
  else
    alloc(nbOfTuple,nbOfCompo);
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.allocIfNecessary (   self,
  args 
)
allocIfNecessary(self, int nbOfTuple, int nbOfCompo)

1

Definition at line 2673 of file ParaMEDMEM.py.

02673 
02674     def allocIfNecessary(self, *args):
02675         """
02676         allocIfNecessary(self, int nbOfTuple, int nbOfCompo)
02677 
02678         1
02679         """
02680         return _ParaMEDMEM.DataArrayInt_allocIfNecessary(self, *args)

Here is the call graph for this function:

void DataArrayInt::applyDivideBy ( int  val) throw (INTERP_KERNEL::Exception)

Definition at line 4521 of file MEDCouplingMemArray.cxx.

{
  if(val==0)
    throw INTERP_KERNEL::Exception("DataArrayInt::applyDivideBy : Trying to divide by 0 !");
  checkAllocated();
  int *ptr=getPointer();
  int nbOfElems=getNbOfElems();
  std::transform(ptr,ptr+nbOfElems,ptr,std::bind2nd(std::divides<int>(),val));
  declareAsNew();
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.applyDivideBy (   self,
  args 
)
applyDivideBy(self, int val)

1

Definition at line 3193 of file ParaMEDMEM.py.

03193 
03194     def applyDivideBy(self, *args):
03195         """
03196         applyDivideBy(self, int val)
03197 
03198         1
03199         """
03200         return _ParaMEDMEM.DataArrayInt_applyDivideBy(self, *args)

Here is the call graph for this function:

void DataArrayInt::applyInv ( int  numerator) throw (INTERP_KERNEL::Exception)

This method applies the operation 'numerator/x' for each element 'x' in 'this'.

If there is a value in 'this' exactly equal to 0. an exception is thrown. Warning if presence of null this is modified for each values previous than place where exception was thrown !

Definition at line 4500 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  int *ptr=getPointer();
  int nbOfElems=getNbOfElems();
  for(int i=0;i<nbOfElems;i++,ptr++)
    {
      if(*ptr!=0)
        {
          *ptr=numerator/(*ptr);
        }
      else
        {
          std::ostringstream oss; oss << "DataArrayInt::applyInv : presence of null value in tuple #" << i/getNumberOfComponents() << " component #" << i%getNumberOfComponents();
          oss << " !";
          throw INTERP_KERNEL::Exception(oss.str().c_str());
        }
    }
  declareAsNew();
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.applyInv (   self,
  args 
)
applyInv(self, int numerator)

1

Definition at line 3177 of file ParaMEDMEM.py.

03177 
03178     def applyInv(self, *args):
03179         """
03180         applyInv(self, int numerator)
03181 
03182         1
03183         """
03184         return _ParaMEDMEM.DataArrayInt_applyInv(self, *args)

Here is the call graph for this function:

void DataArrayInt::applyLin ( int  a,
int  b,
int  compoId 
) throw (INTERP_KERNEL::Exception)

Definition at line 4457 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  int *ptr=getPointer()+compoId;
  int nbOfComp=getNumberOfComponents();
  int nbOfTuple=getNumberOfTuples();
  for(int i=0;i<nbOfTuple;i++,ptr+=nbOfComp)
    *ptr=a*(*ptr)+b;
  declareAsNew();
}

Here is the caller graph for this function:

void DataArrayInt::applyLin ( int  a,
int  b 
) throw (INTERP_KERNEL::Exception)

Definition at line 4468 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  int *ptr=getPointer();
  int nbOfElems=getNbOfElems();
  for(int i=0;i<nbOfElems;i++,ptr++)
    *ptr=a*(*ptr)+b;
  declareAsNew();
}
def ParaMEDMEM.DataArrayInt.applyLin (   self,
  args 
)
applyLin(self, int a, int b, int compoId)
applyLin(self, int a, int b)

1

Definition at line 3168 of file ParaMEDMEM.py.

03168 
03169     def applyLin(self, *args):
03170         """
03171         applyLin(self, int a, int b, int compoId)
03172         applyLin(self, int a, int b)
03173 
03174         1
03175         """
03176         return _ParaMEDMEM.DataArrayInt_applyLin(self, *args)

Here is the call graph for this function:

void DataArrayInt::applyModulus ( int  val) throw (INTERP_KERNEL::Exception)

Definition at line 4532 of file MEDCouplingMemArray.cxx.

{
  if(val<=0)
    throw INTERP_KERNEL::Exception("DataArrayInt::applyDivideBy : Trying to operate modulus on value <= 0 !");
  checkAllocated();
  int *ptr=getPointer();
  int nbOfElems=getNbOfElems();
  std::transform(ptr,ptr+nbOfElems,ptr,std::bind2nd(std::modulus<int>(),val));
  declareAsNew();
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.applyModulus (   self,
  args 
)
applyModulus(self, int val)

1

Definition at line 3201 of file ParaMEDMEM.py.

03201 
03202     def applyModulus(self, *args):
03203         """
03204         applyModulus(self, int val)
03205 
03206         1
03207         """
03208         return _ParaMEDMEM.DataArrayInt_applyModulus(self, *args)

Here is the call graph for this function:

void DataArrayInt::applyRModulus ( int  val) throw (INTERP_KERNEL::Exception)

This method applies the operation 'numeratorx' for each element 'x' in 'this'.

If there is a value in 'this' exactly equals or lower than 0. an exception is thrown. Warning if presence of null this is modified for each values previous than place where exception was thrown !

Definition at line 4548 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  int *ptr=getPointer();
  int nbOfElems=getNbOfElems();
  for(int i=0;i<nbOfElems;i++,ptr++)
    {
      if(*ptr>0)
        {
          *ptr=val%(*ptr);
        }
      else
        {
          std::ostringstream oss; oss << "DataArrayInt::applyRModulus : presence of value <=0 in tuple #" << i/getNumberOfComponents() << " component #" << i%getNumberOfComponents();
          oss << " !";
          throw INTERP_KERNEL::Exception(oss.str().c_str());
        }
    }
  declareAsNew();
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.applyRModulus (   self,
  args 
)
applyRModulus(self, int val)

1

Definition at line 3209 of file ParaMEDMEM.py.

03209 
03210     def applyRModulus(self, *args):
03211         """
03212         applyRModulus(self, int val)
03213 
03214         1
03215         """
03216         return _ParaMEDMEM.DataArrayInt_applyRModulus(self, *args)

Here is the call graph for this function:

bool DataArray::areInfoEquals ( const DataArray other) const [inherited]

Definition at line 121 of file MEDCouplingMemArray.cxx.

{
  if(_nb_of_tuples!=other._nb_of_tuples)
    return false;
  if(_name!=other._name)
    return false;
  return _info_on_compo==other._info_on_compo;
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.areInfoEquals (   self,
  args 
) [inherited]
areInfoEquals(self, DataArray other) -> bool

1

Definition at line 887 of file ParaMEDMEM.py.

00887 
00888     def areInfoEquals(self, *args):
00889         """
00890         areInfoEquals(self, DataArray other) -> bool
00891 
00892         1
00893         """
00894         return _ParaMEDMEM.DataArray_areInfoEquals(self, *args)

Here is the call graph for this function:

def ParaMEDMEM.TimeLabel.assign (   self,
  args 
) [inherited]
assign(self, TimeLabel other) -> TimeLabel

1

Reimplemented in ParaMEDMEM.MEDCouplingFieldDouble.

Definition at line 284 of file ParaMEDMEM.py.

00284 
00285     def assign(self, *args):
00286         """
00287         assign(self, TimeLabel other) -> TimeLabel
00288 
00289         1
00290         """
00291         return _ParaMEDMEM.TimeLabel_assign(self, *args)

int DataArrayInt::back ( ) const throw (INTERP_KERNEL::Exception)

This method returns the last element in 'this'.

So this method makes the hypothesis that 'this' is allocated. This method works only for arrays that have exactly number of components equal to 1. If not an exception is thrown. And to finish this method works for arrays that have number of tuples >= 1.

Definition at line 4229 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::back : number of components not equal to one !");
  int nbOfTuples=getNumberOfTuples();
  if(nbOfTuples<1)
    throw INTERP_KERNEL::Exception("DataArrayInt::back : number of tuples must be >= 1 !");
  return *(getConstPointer()+nbOfTuples-1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

back(self) -> int

1

Definition at line 3032 of file ParaMEDMEM.py.

03032 
03033     def back(self):
03034         """
03035         back(self) -> int
03036 
03037         1
03038         """
03039         return _ParaMEDMEM.DataArrayInt_back(self)

Here is the call graph for this function:

MEDCOUPLING_EXPORT const int* ParaMEDMEM::DataArrayInt::begin ( ) const [inline]

Definition at line 400 of file MEDCouplingMemArray.hxx.

{ return getConstPointer(); }

Here is the call graph for this function:

Here is the caller graph for this function:

begin(self) -> int

1

Definition at line 3080 of file ParaMEDMEM.py.

03080 
03081     def begin(self):
03082         """
03083         begin(self) -> int
03084 
03085         1
03086         """
03087         return _ParaMEDMEM.DataArrayInt_begin(self)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::buildComplement ( int  nbOfElement) const throw (INTERP_KERNEL::Exception)

Definition at line 4726 of file MEDCouplingMemArray.cxx.

{
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayInt::buildComplement : only single component allowed !");
   std::vector<bool> tmp(nbOfElement);
   const int *pt=getConstPointer();
   int nbOfTuples=getNumberOfTuples();
   for(const int *w=pt;w!=pt+nbOfTuples;w++)
     if(*w>=0 && *w<nbOfElement)
       tmp[*w]=true;
     else
       throw INTERP_KERNEL::Exception("DataArrayInt::buildComplement : an element is not in valid range : [0,nbOfElement) !");
   int nbOfRetVal=(int)std::count(tmp.begin(),tmp.end(),false);
   DataArrayInt *ret=DataArrayInt::New();
   ret->alloc(nbOfRetVal,1);
   int j=0;
   int *retPtr=ret->getPointer();
   for(int i=0;i<nbOfElement;i++)
     if(!tmp[i])
       retPtr[j++]=i;
   return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.buildComplement (   self,
  args 
)
buildComplement(self, int nbOfElement) -> DataArrayInt

1

Definition at line 3217 of file ParaMEDMEM.py.

03217 
03218     def buildComplement(self, *args):
03219         """
03220         buildComplement(self, int nbOfElement) -> DataArrayInt
03221 
03222         1
03223         """
03224         return _ParaMEDMEM.DataArrayInt_buildComplement(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::buildExplicitArrByRanges ( const DataArrayInt offsets) const throw (INTERP_KERNEL::Exception)

This method works on array with number of component equal to one and allocated.

If not an exception is thrown. 'offsets' should be monotic ascendently. If not, an exception will be thrown. This method retrives a newly created DataArrayInt instance with 1 component and this->getNumberOfTuples()-1 tuples. If 'this' contains [0,2,3] and 'offsets' [0,3,6,10,14,20] the returned array will contain [0,1,2,6,7,8,9,10,11,12,13]

Definition at line 4866 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : only single component allowed !");
  offsets->checkAllocated();
  if(offsets->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : input array should have only single component !");
  int othNbTuples=offsets->getNumberOfTuples()-1;
  int nbOfTuples=getNumberOfTuples();
  int retNbOftuples=0;
  const int *work=getConstPointer();
  const int *offPtr=offsets->getConstPointer();
  for(int i=0;i<nbOfTuples;i++)
    {
      int val=work[i];
      if(val>=0 && val<othNbTuples)
        {
          int delta=offPtr[val+1]-offPtr[val];
          if(delta>=0)
            retNbOftuples+=delta;
          else
            {
              std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrByRanges : Tuple #" << val << " of offset array has a delta < 0 !";
              throw INTERP_KERNEL::Exception(oss.str().c_str());
            }
        }
      else
        {
          std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrByRanges : Tuple #" << i << " in this contains " << val;
          oss << " whereas offsets array is of size " << othNbTuples+1 << " !";
          throw INTERP_KERNEL::Exception(oss.str().c_str());
        }
    }
  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
  ret->alloc(retNbOftuples,1);
  int *retPtr=ret->getPointer();
  for(int i=0;i<nbOfTuples;i++)
    {
      int val=work[i];
      int start=offPtr[val];
      int off=offPtr[val+1]-start;
      for(int j=0;j<off;j++,retPtr++)
        *retPtr=start+j;
    }
  ret->incrRef();
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

buildExplicitArrByRanges(self, DataArrayInt offsets) -> DataArrayInt

1

Definition at line 3273 of file ParaMEDMEM.py.

03273 
03274     def buildExplicitArrByRanges(self, *args):
03275         """
03276         buildExplicitArrByRanges(self, DataArrayInt offsets) -> DataArrayInt
03277 
03278         1
03279         """
03280         return _ParaMEDMEM.DataArrayInt_buildExplicitArrByRanges(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::BuildIntersection ( const std::vector< const DataArrayInt * > &  a) throw (INTERP_KERNEL::Exception) [static]

Definition at line 4691 of file MEDCouplingMemArray.cxx.

{
  int valm=std::numeric_limits<int>::max();
  for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
    {
      (*it)->checkAllocated();
      if((*it)->getNumberOfComponents()!=1)
        throw INTERP_KERNEL::Exception("DataArrayInt::BuildUnion : only single component allowed !");
      int tmp1;
      valm=std::min((*it)->getMinValue(tmp1),valm);
    }
  if(valm<0)
    throw INTERP_KERNEL::Exception("DataArrayInt::BuildUnion : a negative value has been detected !");
  //
  std::set<int> r;
  for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
    {
      const int *pt=(*it)->getConstPointer();
      int nbOfTuples=(*it)->getNumberOfTuples();
      std::set<int> s1(pt,pt+nbOfTuples);
      if(it!=a.begin())
        {
          std::set<int> r2;
          std::set_intersection(r.begin(),r.end(),s1.begin(),s1.end(),inserter(r2,r2.end()));
          r=r2;
        }
      else
        r=s1;
    }
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc((int)r.size(),1);
  std::copy(r.begin(),r.end(),ret->getPointer());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

DataArrayInt * DataArrayInt::buildIntersection ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)

Definition at line 4779 of file MEDCouplingMemArray.cxx.

{
  std::vector<const DataArrayInt *>arrs(2);
  arrs[0]=this; arrs[1]=other;
  return BuildIntersection(arrs);
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.buildIntersection (   self,
  args 
)
buildIntersection(self, DataArrayInt other) -> DataArrayInt

1

Definition at line 3241 of file ParaMEDMEM.py.

03241 
03242     def buildIntersection(self, *args):
03243         """
03244         buildIntersection(self, DataArrayInt other) -> DataArrayInt
03245 
03246         1
03247         """
03248         return _ParaMEDMEM.DataArrayInt_buildIntersection(self, *args)

Here is the call graph for this function:

BuildIntersection(std::vector<(p.q(const).ParaMEDMEM::DataArrayInt,std::allocator<(p.q(const).ParaMEDMEM::DataArrayInt)>)> a) -> DataArrayInt
BuildIntersection(PyObject li) -> DataArrayInt

1

Definition at line 3722 of file ParaMEDMEM.py.

03722 
03723     def BuildIntersection(*args):
03724         """
03725         BuildIntersection(std::vector<(p.q(const).ParaMEDMEM::DataArrayInt,std::allocator<(p.q(const).ParaMEDMEM::DataArrayInt)>)> a) -> DataArrayInt
03726         BuildIntersection(PyObject li) -> DataArrayInt
03727 
03728         1
03729         """
03730         return _ParaMEDMEM.DataArrayInt_BuildIntersection(*args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2 ( int  nbOfOldTuples,
const DataArrayInt arr,
const DataArrayInt arrI,
int &  newNbOfTuples 
) throw (INTERP_KERNEL::Exception) [static]

This static method computes a old 2 new format DataArrayInt instance from a zip representation of a surjective format (retrived by DataArrayDouble::findCommonTuples for example) The retrieved array minimizes the permutation.

Let's take an example : If 'nbOfOldTuples'==10 and 'arr'==[0,3, 5,7,9] and 'arrI'==[0,2,5] it returns the following array [0,1,2,0,3,4,5,4,6,4] and newNbOfTuples==7.

Parameters:
nbOfOldTuplesis the number of tuples in initial array.
arris the list of tuples ids grouped by 'arrI' array
arrIis the entry point of 'arr' array. arrI->getNumberOfTuples()-1 is the number of common groups > 1 tuple.
newNbOfTuplesoutput parameter that retrieves the new number of tuples after surjection application

Definition at line 3614 of file MEDCouplingMemArray.cxx.

{
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc(nbOfOldTuples,1);
  int *pt=ret->getPointer();
  std::fill(pt,pt+nbOfOldTuples,-1);
  int nbOfGrps=arrI->getNumberOfTuples()-1;
  const int *cIPtr=arrI->getConstPointer();
  const int *cPtr=arr->getConstPointer();
  for(int i=0;i<nbOfGrps;i++)
    pt[cPtr[cIPtr[i]]]=-(i+2);
  int newNb=0;
  for(int iNode=0;iNode<nbOfOldTuples;iNode++)
    {
      if(pt[iNode]<0)
        {
          if(pt[iNode]==-1)
            pt[iNode]=newNb++;
          else
            {
              int grpId=-(pt[iNode]+2);
              for(int j=cIPtr[grpId];j<cIPtr[grpId+1];j++)
                pt[cPtr[j]]=newNb;
              newNb++;
            }
        }
    }
  newNbOfTuples=newNb;
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

BuildOld2NewArrayFromSurjectiveFormat2(int nbOfOldTuples, DataArrayInt arr, DataArrayInt arrI, 
    int newNbOfTuples) -> DataArrayInt
BuildOld2NewArrayFromSurjectiveFormat2(int nbOfOldTuples, DataArrayInt arr, DataArrayInt arrI) -> PyObject

1

Definition at line 3502 of file ParaMEDMEM.py.

03502 
03503     def BuildOld2NewArrayFromSurjectiveFormat2(*args):
03504         """
03505         BuildOld2NewArrayFromSurjectiveFormat2(int nbOfOldTuples, DataArrayInt arr, DataArrayInt arrI, 
03506             int newNbOfTuples) -> DataArrayInt
03507         BuildOld2NewArrayFromSurjectiveFormat2(int nbOfOldTuples, DataArrayInt arr, DataArrayInt arrI) -> PyObject
03508 
03509         1
03510         """
03511         return _ParaMEDMEM.DataArrayInt_BuildOld2NewArrayFromSurjectiveFormat2(*args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::buildPermArrPerLevel ( ) const throw (INTERP_KERNEL::Exception)

This method expects that 'this' is allocated and with only one component.

If not an exception will be thrown. This method returns a newly created array with 'this->getNumberOfTuples()' tuples and 1 component. This methods returns an 'old2New' corresponding array that allows to follow the following rules :

  • Lower a value in tuple in 'this' is, higher is its priority.
  • If two tuples i and j have same value if i<j then ret[i]<ret[j]
  • The first tuple with the lowest value will have the value 0, inversely the last tuple with highest value will have value 'this->getNumberOfTuples()-1'

Example if 'this' contains the following array : [2,0,1,1,0,1,2,0,1,1,0,0] this method returns [10,0,5,6,1,7,11,2,8,9,3,4]

Definition at line 3655 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::buildPermArrPerLevel : number of components must == 1 !");
  int nbOfTuples=getNumberOfTuples();
  const int *pt=getConstPointer();
  std::map<int,int> m;
  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
  ret->alloc(nbOfTuples,1);
  int *opt=ret->getPointer();
  for(int i=0;i<nbOfTuples;i++,pt++,opt++)
    {
      int val=*pt;
      std::map<int,int>::iterator it=m.find(val);
      if(it!=m.end())
        {
          *opt=(*it).second;
          (*it).second++;
        }
      else
        {
          *opt=0;
          m.insert(std::pair<int,int>(val,1));
        }
    }
  int sum=0;
  for(std::map<int,int>::iterator it=m.begin();it!=m.end();it++)
    {
      int vt=(*it).second;
      (*it).second=sum;
      sum+=vt;
    }
  pt=getConstPointer();
  opt=ret->getPointer();
  for(int i=0;i<nbOfTuples;i++,pt++,opt++)
    *opt+=m[*pt];
  //
  ret->incrRef();
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

buildPermArrPerLevel(self) -> DataArrayInt

1

Definition at line 2866 of file ParaMEDMEM.py.

02866 
02867     def buildPermArrPerLevel(self):
02868         """
02869         buildPermArrPerLevel(self) -> DataArrayInt
02870 
02871         1
02872         """
02873         return _ParaMEDMEM.DataArrayInt_buildPermArrPerLevel(self)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::buildPermutationArr ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)

This method expects that 'this' and 'other' have the same number of tuples and exactly one component both.

If not an exception will be thrown. This method retrieves a newly created array with same number of tuples than 'this' and 'other' with one component. The returned array 'ret' contains the correspondance from 'this' to 'other' that is to say for every i so that 0<=i<getNumberOfTuples() other.getIJ(i,0)==this->getIJ(ret->getIJ(i),0) If such permutation is not possible because it exists some elements in 'other' not in 'this', an exception will be thrown.

Definition at line 3267 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=1 || other.getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::buildPermutationArr : 'this' and 'other' have to have exactly ONE component !");
  int nbTuple=getNumberOfTuples();
  if(nbTuple!=other.getNumberOfTuples())
    throw INTERP_KERNEL::Exception("DataArrayInt::buildPermutationArr : 'this' and 'other' must have the same number of tuple !");
  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
  ret->alloc(nbTuple,1);
  ret->fillWithValue(-1);
  const int *pt=getConstPointer();
  std::map<int,int> mm;
  for(int i=0;i<nbTuple;i++)
    mm[pt[i]]=i;
  pt=other.getConstPointer();
  int *retToFill=ret->getPointer();
  for(int i=0;i<nbTuple;i++)
    {
      std::map<int,int>::const_iterator it=mm.find(pt[i]);
      if(it==mm.end())
        {
          std::ostringstream oss; oss << "DataArrayInt::buildPermutationArr : Arrays mismatch : element (" << pt[i] << ") in 'other' not findable in 'this' !";
          throw INTERP_KERNEL::Exception(oss.str().c_str());
        }
      retToFill[i]=(*it).second;
    }
  ret->incrRef();
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.buildPermutationArr (   self,
  args 
)
buildPermutationArr(self, DataArrayInt other) -> DataArrayInt

1

Definition at line 2705 of file ParaMEDMEM.py.

02705 
02706     def buildPermutationArr(self, *args):
02707         """
02708         buildPermutationArr(self, DataArrayInt other) -> DataArrayInt
02709 
02710         1
02711         """
02712         return _ParaMEDMEM.DataArrayInt_buildPermutationArr(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::buildSubstraction ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)

Definition at line 4750 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  other->checkAllocated();
  if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed !");
  if(other->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed for other type !");
  const int *pt=getConstPointer();
  int nbOfTuples=getNumberOfTuples();
  std::set<int> s1(pt,pt+nbOfTuples);
  pt=other->getConstPointer();
  nbOfTuples=other->getNumberOfTuples();
  std::set<int> s2(pt,pt+nbOfTuples);
  std::vector<int> r;
  std::set_difference(s1.begin(),s1.end(),s2.begin(),s2.end(),std::back_insert_iterator< std::vector<int> >(r));
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc((int)r.size(),1);
  std::copy(r.begin(),r.end(),ret->getPointer());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.buildSubstraction (   self,
  args 
)
buildSubstraction(self, DataArrayInt other) -> DataArrayInt

1

Definition at line 3225 of file ParaMEDMEM.py.

03225 
03226     def buildSubstraction(self, *args):
03227         """
03228         buildSubstraction(self, DataArrayInt other) -> DataArrayInt
03229 
03230         1
03231         """
03232         return _ParaMEDMEM.DataArrayInt_buildSubstraction(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::BuildUnion ( const std::vector< const DataArrayInt * > &  a) throw (INTERP_KERNEL::Exception) [static]

Definition at line 4664 of file MEDCouplingMemArray.cxx.

{
  int valm=std::numeric_limits<int>::max();
  for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
    {
      (*it)->checkAllocated();
      if((*it)->getNumberOfComponents()!=1)
        throw INTERP_KERNEL::Exception("DataArrayInt::BuildUnion : only single component allowed !");
      int tmp1;
      valm=std::min((*it)->getMinValue(tmp1),valm);
    }
  if(valm<0)
    throw INTERP_KERNEL::Exception("DataArrayInt::BuildUnion : a negative value has been detected !");
  //
  std::set<int> r;
  for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
    {
      const int *pt=(*it)->getConstPointer();
      int nbOfTuples=(*it)->getNumberOfTuples();
      r.insert(pt,pt+nbOfTuples);
    }
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc((int)r.size(),1);
  std::copy(r.begin(),r.end(),ret->getPointer());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

DataArrayInt * DataArrayInt::buildUnion ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)

Definition at line 4772 of file MEDCouplingMemArray.cxx.

{
  std::vector<const DataArrayInt *>arrs(2);
  arrs[0]=this; arrs[1]=other;
  return BuildUnion(arrs);
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.buildUnion (   self,
  args 
)
buildUnion(self, DataArrayInt other) -> DataArrayInt

1

Definition at line 3233 of file ParaMEDMEM.py.

03233 
03234     def buildUnion(self, *args):
03235         """
03236         buildUnion(self, DataArrayInt other) -> DataArrayInt
03237 
03238         1
03239         """
03240         return _ParaMEDMEM.DataArrayInt_buildUnion(self, *args)

Here is the call graph for this function:

BuildUnion(std::vector<(p.q(const).ParaMEDMEM::DataArrayInt,std::allocator<(p.q(const).ParaMEDMEM::DataArrayInt)>)> a) -> DataArrayInt
BuildUnion(PyObject li) -> DataArrayInt

1

Definition at line 3711 of file ParaMEDMEM.py.

03711 
03712     def BuildUnion(*args):
03713         """
03714         BuildUnion(std::vector<(p.q(const).ParaMEDMEM::DataArrayInt,std::allocator<(p.q(const).ParaMEDMEM::DataArrayInt)>)> a) -> DataArrayInt
03715         BuildUnion(PyObject li) -> DataArrayInt
03716 
03717         1
03718         """
03719         return _ParaMEDMEM.DataArrayInt_BuildUnion(*args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::changeNbOfComponents ( int  newNbOfComp,
int  dftValue 
) const throw (INTERP_KERNEL::Exception)

This method builds a new instance of DataArrayInt (to deal with) that is reduction or an extension of 'this'.

if 'newNbOfComp' < this->getNumberOfComponents() a reduction is done and for each tuple 'newNbOfComp' first components are kept. If 'newNbOfComp' > this->getNumberOfComponents() an extension is done, and for each components i such that i > getNumberOfComponents() 'dftValue' parameter is taken.

Definition at line 3806 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc(getNumberOfTuples(),newNbOfComp);
  const int *oldc=getConstPointer();
  int *nc=ret->getPointer();
  int nbOfTuples=getNumberOfTuples();
  int oldNbOfComp=getNumberOfComponents();
  int dim=std::min(oldNbOfComp,newNbOfComp);
  for(int i=0;i<nbOfTuples;i++)
    {
      int j=0;
      for(;j<dim;j++)
        nc[newNbOfComp*i+j]=oldc[i*oldNbOfComp+j];
      for(;j<newNbOfComp;j++)
        nc[newNbOfComp*i+j]=dftValue;
    }
  ret->setName(getName().c_str());
  for(int i=0;i<dim;i++)
    ret->setInfoOnComponent(i,getInfoOnComponent(i).c_str());
  ret->setName(getName().c_str());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

changeNbOfComponents(self, int newNbOfComp, int dftValue) -> DataArrayInt

1

Definition at line 2915 of file ParaMEDMEM.py.

02915 
02916     def changeNbOfComponents(self, *args):
02917         """
02918         changeNbOfComponents(self, int newNbOfComp, int dftValue) -> DataArrayInt
02919 
02920         1
02921         """
02922         return _ParaMEDMEM.DataArrayInt_changeNbOfComponents(self, *args)

Here is the call graph for this function:

void DataArrayInt::changeSurjectiveFormat ( int  targetNb,
DataArrayInt *&  arr,
DataArrayInt *&  arrI 
) const throw (INTERP_KERNEL::Exception)

This method makes the assumption that 'this' is correctly set, and has exactly one component.

If not an exception will be thrown. Given a sujective application defined by 'this' from a set of size this->getNumberOfTuples() to a set of size targetNb. 'targetNb'<this->getNumberOfTuples(). 'this' should be surjective that is to say for each id in [0,'targetNb') it exists at least one tupleId tid so that this->getIJ(tid,0)==id. If not an exception will be thrown. This method returns 2 newly allocated arrays 'arr' and 'arrI', corresponding respectively to array and its corresponding index. This method is usefull for methods that returns old2New numbering concecutive to a reduction ( MEDCouplingUMesh::zipConnectivityTraducer, MEDCouplingUMesh::zipConnectivityTraducer for example) Example : if 'this' equals [0,3,2,3,2,2,1,2] this method will return arrI=[0,1,2,6,8] arr=[0, 6, 2,4,5,7, 1,3] That is to say elt id 2 has arrI[2+1]-arrI[2]=4 places in 'this'. The corresponding tuple ids are [2,4,5,7].

Definition at line 3565 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::changeSurjectiveFormat : number of components must == 1 !");
  int nbOfTuples=getNumberOfTuples();
  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret(DataArrayInt::New());
  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> retI(DataArrayInt::New());
  retI->alloc(targetNb+1,1);
  const int *input=getConstPointer();
  std::vector< std::vector<int> > tmp(targetNb);
  for(int i=0;i<nbOfTuples;i++)
    {
      int tmp2=input[i];
      if(tmp2<targetNb)
        tmp[tmp2].push_back(i);
      else
        {
          std::ostringstream oss; oss << "DataArrayInt::changeSurjectiveFormat : At pos " << i << " presence of element " << tmp2 << " higher than " << targetNb;
          throw INTERP_KERNEL::Exception(oss.str().c_str());
        }
    }
  int *retIPtr=retI->getPointer();
  *retIPtr=0;
  for(std::vector< std::vector<int> >::const_iterator it1=tmp.begin();it1!=tmp.end();it1++,retIPtr++)
    retIPtr[1]=retIPtr[0]+(int)((*it1).size());
  if(nbOfTuples!=retI->getIJ(targetNb,0))
    throw INTERP_KERNEL::Exception("DataArrayInt::changeSurjectiveFormat : big problem should never happen !");
  ret->alloc(nbOfTuples,1);
  int *retPtr=ret->getPointer();
  for(std::vector< std::vector<int> >::const_iterator it1=tmp.begin();it1!=tmp.end();it1++)
    retPtr=std::copy((*it1).begin(),(*it1).end(),retPtr);
  ret->incrRef();
  retI->incrRef();
  arr=ret;
  arrI=retI;
}

Here is the call graph for this function:

Here is the caller graph for this function:

changeSurjectiveFormat(self, int targetNb, DataArrayInt arr, DataArrayInt arrI)
changeSurjectiveFormat(self, int targetNb) -> PyObject

1

Definition at line 3669 of file ParaMEDMEM.py.

03669 
03670     def changeSurjectiveFormat(self, *args):
03671         """
03672         changeSurjectiveFormat(self, int targetNb, DataArrayInt arr, DataArrayInt arrI)
03673         changeSurjectiveFormat(self, int targetNb) -> PyObject
03674 
03675         1
03676         """
03677         return _ParaMEDMEM.DataArrayInt_changeSurjectiveFormat(self, *args)

Here is the call graph for this function:

int DataArrayInt::changeValue ( int  oldValue,
int  newValue 
) throw (INTERP_KERNEL::Exception)

This method expects that 'this' is allocated.

If not an exception will be thrown. This method expect that the number of components is exactly equal to 1. If not an exception will be thrown. For each element in 'this' equal to 'oldValue' will take the value 'newValue'.

Returns:
number of elements impacted by the modification.

Definition at line 4295 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::changeValue : the array must have only one component, you can call 'rearrange' method before !");
  checkAllocated();
  int *start=getPointer();
  int *end2=start+getNbOfElems();
  int ret=0;
  for(int *val=start;val!=end2;val++)
    {
      if(*val==oldValue)
        {
          *val=newValue;
          ret++;
        }
    }
  return ret;
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.changeValue (   self,
  args 
)
changeValue(self, int oldValue, int newValue) -> int

1

Definition at line 3128 of file ParaMEDMEM.py.

03128 
03129     def changeValue(self, *args):
03130         """
03131         changeValue(self, int oldValue, int newValue) -> int
03132 
03133         1
03134         """
03135         return _ParaMEDMEM.DataArrayInt_changeValue(self, *args)

Here is the call graph for this function:

void DataArrayInt::checkAllocated ( ) const throw (INTERP_KERNEL::Exception)

Definition at line 2865 of file MEDCouplingMemArray.cxx.

{
  if(!isAllocated())
    throw INTERP_KERNEL::Exception("DataArrayInt::checkAllocated : Array is defined but not allocated ! Call alloc or setValues method first !");
}

Here is the call graph for this function:

Here is the caller graph for this function:

checkAllocated(self)

1

Definition at line 2601 of file ParaMEDMEM.py.

02601 
02602     def checkAllocated(self):
02603         """
02604         checkAllocated(self)
02605 
02606         1
02607         """
02608         return _ParaMEDMEM.DataArrayInt_checkAllocated(self)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::checkAndPreparePermutation ( ) const throw (INTERP_KERNEL::Exception)

This method works only for arrays having single component.

If this contains the array a1 containing [9,10,0,6,4,11,3,7] this method returns an array a2 [5,6,0,3,2,7,1,4]. By doing a1.renumber(a2) the user will obtain array a3 equal to a1 sorted. This method is useful for renumbering (in MED file for example). This method is used by MEDCouplingFieldDouble::renumberCells when check is set to true. This method throws an exception if more 2 or more elements in 'this' are same.

Definition at line 3541 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::checkAndPreparePermutation : number of components must == 1 !");
  int nbTuples=getNumberOfTuples();
  const int *pt=getConstPointer();
  int *pt2=CheckAndPreparePermutation(pt,pt+nbTuples);
  DataArrayInt *ret=DataArrayInt::New();
  ret->useArray(pt2,true,CPP_DEALLOC,nbTuples,1);
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int * DataArrayInt::CheckAndPreparePermutation ( const int *  start,
const int *  end 
) [static]

Definition at line 5274 of file MEDCouplingMemArray.cxx.

{
  std::size_t sz=std::distance(start,end);
  int *ret=new int[sz];
  int *work=new int[sz];
  std::copy(start,end,work);
  std::sort(work,work+sz);
  if(std::unique(work,work+sz)!=work+sz)
    {
      delete [] work;
      delete [] ret;
      throw INTERP_KERNEL::Exception("Some elements are equals in the specified array !");
    }
  int *iter2=ret;
  for(const int *iter=start;iter!=end;iter++,iter2++)
    *iter2=(int)std::distance(work,std::find(work,work+sz,*iter));
  delete [] work;
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

checkAndPreparePermutation(self) -> DataArrayInt

1

Definition at line 2858 of file ParaMEDMEM.py.

02858 
02859     def checkAndPreparePermutation(self):
02860         """
02861         checkAndPreparePermutation(self) -> DataArrayInt
02862 
02863         1
02864         """
02865         return _ParaMEDMEM.DataArrayInt_checkAndPreparePermutation(self)

Here is the call graph for this function:

CheckAndPreparePermutation(int start, int end) -> int

1

Definition at line 3396 of file ParaMEDMEM.py.

03396 
03397     def CheckAndPreparePermutation(*args):
03398         """
03399         CheckAndPreparePermutation(int start, int end) -> int
03400 
03401         1
03402         """
03403         return _ParaMEDMEM.DataArrayInt_CheckAndPreparePermutation(*args)

Here is the call graph for this function:

void DataArray::CheckClosingParInRange ( int  ref,
int  value,
const char *  msg 
) throw (INTERP_KERNEL::Exception) [static, protected, inherited]

Definition at line 294 of file MEDCouplingMemArray.cxx.

{
  if(value<0 || value>ref)
    {
      std::ostringstream oss; oss << "DataArray::CheckClosingParInRange : " << msg  << " ! Expected a range in [0," << ref << "] having closing open parenthesis " << value << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

void DataArray::checkNbOfElems ( int  nbOfElems,
const char *  msg 
) const throw (INTERP_KERNEL::Exception) [inherited]

Definition at line 276 of file MEDCouplingMemArray.cxx.

{
  if(getNbOfElems()!=nbOfElems)
    {
      std::ostringstream oss; oss << msg << " : mismatch number of elems : Expected " << nbOfElems << " having " << getNbOfElems() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.checkNbOfElems (   self,
  args 
) [inherited]
checkNbOfElems(self, int nbOfElems, char msg)

1

Definition at line 1009 of file ParaMEDMEM.py.

01009 
01010     def checkNbOfElems(self, *args):
01011         """
01012         checkNbOfElems(self, int nbOfElems, char msg)
01013 
01014         1
01015         """
01016         return _ParaMEDMEM.DataArray_checkNbOfElems(self, *args)

Here is the call graph for this function:

void DataArray::checkNbOfTuplesAndComp ( const DataArray other,
const char *  msg 
) const throw (INTERP_KERNEL::Exception) [inherited]

Definition at line 248 of file MEDCouplingMemArray.cxx.

{
   if(getNumberOfTuples()!=other.getNumberOfTuples())
    {
      std::ostringstream oss; oss << msg << " : mismatch number of tuples : expected " <<  other.getNumberOfTuples() << " having " << getNumberOfTuples() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(getNumberOfComponents()!=other.getNumberOfComponents())
    {
      std::ostringstream oss; oss << msg << " : mismatch number of components : expected " << other.getNumberOfComponents() << " having " << getNumberOfComponents() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

void DataArray::checkNbOfTuplesAndComp ( int  nbOfTuples,
int  nbOfCompo,
const char *  msg 
) const throw (INTERP_KERNEL::Exception) [inherited]

Definition at line 262 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfTuples()!=nbOfTuples)
    {
      std::ostringstream oss; oss << msg << " : mismatch number of tuples : expected " <<  nbOfTuples << " having " << getNumberOfTuples() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(getNumberOfComponents()!=nbOfCompo)
    {
      std::ostringstream oss; oss << msg << " : mismatch number of components : expected " << nbOfCompo << " having " << getNumberOfComponents() << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}
def ParaMEDMEM.DataArray.checkNbOfTuplesAndComp (   self,
  args 
) [inherited]
checkNbOfTuplesAndComp(self, DataArray other, char msg)
checkNbOfTuplesAndComp(self, int nbOfTuples, int nbOfCompo, char msg)

1

Definition at line 1000 of file ParaMEDMEM.py.

01000 
01001     def checkNbOfTuplesAndComp(self, *args):
01002         """
01003         checkNbOfTuplesAndComp(self, DataArray other, char msg)
01004         checkNbOfTuplesAndComp(self, int nbOfTuples, int nbOfCompo, char msg)
01005 
01006         1
01007         """
01008         return _ParaMEDMEM.DataArray_checkNbOfTuplesAndComp(self, *args)

Here is the call graph for this function:

void DataArray::CheckValueInRange ( int  ref,
int  value,
const char *  msg 
) throw (INTERP_KERNEL::Exception) [static, protected, inherited]

Definition at line 285 of file MEDCouplingMemArray.cxx.

{
  if(value<0 || value>=ref)
    {
      std::ostringstream oss; oss << "DataArray::CheckValueInRange : " << msg  << " ! Expected in range [0," << ref << "[ having " << value << " !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

void DataArrayInt::computeOffsets ( ) throw (INTERP_KERNEL::Exception)

This method performs the work on itself.

This method works on array with number of component equal to one and allocated. If not an exception is thrown. This method conserves the number of tuples and number of components (1). No reallocation is done. For an array [3,5,1,2,0,8] it becomes [0,3,8,9,11,11]. For each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. This could be usefull for allToAllV in MPI with contiguous policy.

Definition at line 4816 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsets : only single component allowed !");
  int nbOfTuples=getNumberOfTuples();
  if(nbOfTuples==0)
    return ;
  int *work=getPointer();
  int tmp=work[0];
  work[0]=0;
  for(int i=1;i<nbOfTuples;i++)
    {
      int tmp2=work[i];
      work[i]=work[i-1]+tmp;
      tmp=tmp2;
    }
  declareAsNew();
}

Here is the call graph for this function:

Here is the caller graph for this function:

computeOffsets(self)

1

Definition at line 3257 of file ParaMEDMEM.py.

03257 
03258     def computeOffsets(self):
03259         """
03260         computeOffsets(self)
03261 
03262         1
03263         """
03264         return _ParaMEDMEM.DataArrayInt_computeOffsets(self)

Here is the call graph for this function:

void DataArrayInt::computeOffsets2 ( ) throw (INTERP_KERNEL::Exception)

Idem DataArrayInt::computeOffsets method execpt that 'this' changes its number of tuples.

After the call in case of success new number of tuples is equal to old number of tuples +1. The content in 'this' for the first old number of tuples is exactly the same than those given by DataArrayInt::computeOffsets method. For an array [3,5,1,2,0,8] it becomes [0,3,8,9,11,11,19].

Definition at line 4843 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsets2 : only single component allowed !");
  int nbOfTuples=getNumberOfTuples();
  int *ret=new int[nbOfTuples+1];
  if(nbOfTuples==0)
    return ;
  const int *work=getConstPointer();
  ret[0]=0;
  for(int i=0;i<nbOfTuples;i++)
    ret[i+1]=work[i]+ret[i];
  useArray(ret,true,CPP_DEALLOC,nbOfTuples+1,1);
  declareAsNew();
}

Here is the call graph for this function:

Here is the caller graph for this function:

computeOffsets2(self)

1

Definition at line 3265 of file ParaMEDMEM.py.

03265 
03266     def computeOffsets2(self):
03267         """
03268         computeOffsets2(self)
03269 
03270         1
03271         """
03272         return _ParaMEDMEM.DataArrayInt_computeOffsets2(self)

Here is the call graph for this function:

Definition at line 3729 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  DataArrayDouble *ret=DataArrayDouble::New();
  ret->alloc(getNumberOfTuples(),getNumberOfComponents());
  int nbOfVals=getNbOfElems();
  const int *src=getConstPointer();
  double *dest=ret->getPointer();
  std::copy(src,src+nbOfVals,dest);
  ret->copyStringInfoFrom(*this);
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

convertToDblArr(self) -> DataArrayDouble

1

Definition at line 2826 of file ParaMEDMEM.py.

02826 
02827     def convertToDblArr(self):
02828         """
02829         convertToDblArr(self) -> DataArrayDouble
02830 
02831         1
02832         """
02833         return _ParaMEDMEM.DataArrayInt_convertToDblArr(self)

Here is the call graph for this function:

void DataArray::copyPartOfStringInfoFrom ( const DataArray other,
const std::vector< int > &  compoIds 
) throw (INTERP_KERNEL::Exception) [inherited]

Definition at line 91 of file MEDCouplingMemArray.cxx.

{
  int nbOfCompoOth=other.getNumberOfComponents();
  std::size_t newNbOfCompo=compoIds.size();
  for(std::size_t i=0;i<newNbOfCompo;i++)
    if(compoIds[i]>=nbOfCompoOth || compoIds[i]<0)
      {
        std::ostringstream oss; oss << "Specified component id is out of range (" << compoIds[i] << ") compared with nb of actual components (" << nbOfCompoOth << ")";
        throw INTERP_KERNEL::Exception(oss.str().c_str());
      }
  for(std::size_t i=0;i<newNbOfCompo;i++)
    setInfoOnComponent((int)i,other.getInfoOnComponent(compoIds[i]).c_str());
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.copyPartOfStringInfoFrom (   self,
  args 
) [inherited]
copyPartOfStringInfoFrom(self, DataArray other, ivec compoIds)
copyPartOfStringInfoFrom(self, DataArray other, PyObject li)

1

Definition at line 1057 of file ParaMEDMEM.py.

01057 
01058     def copyPartOfStringInfoFrom(self, *args):
01059         """
01060         copyPartOfStringInfoFrom(self, DataArray other, ivec compoIds)
01061         copyPartOfStringInfoFrom(self, DataArray other, PyObject li)
01062 
01063         1
01064         """
01065         return _ParaMEDMEM.DataArray_copyPartOfStringInfoFrom(self, *args)

Here is the call graph for this function:

void DataArray::copyPartOfStringInfoFrom2 ( const std::vector< int > &  compoIds,
const DataArray other 
) throw (INTERP_KERNEL::Exception) [inherited]

Definition at line 105 of file MEDCouplingMemArray.cxx.

{
  int nbOfCompo=getNumberOfComponents();
  std::size_t partOfCompoToSet=compoIds.size();
  if((int)partOfCompoToSet!=other.getNumberOfComponents())
    throw INTERP_KERNEL::Exception("Given compoIds has not the same size as number of components of given array !");
  for(std::size_t i=0;i<partOfCompoToSet;i++)
    if(compoIds[i]>=nbOfCompo || compoIds[i]<0)
      {
        std::ostringstream oss; oss << "Specified component id is out of range (" << compoIds[i] << ") compared with nb of actual components (" << nbOfCompo << ")";
        throw INTERP_KERNEL::Exception(oss.str().c_str());
      }
  for(std::size_t i=0;i<partOfCompoToSet;i++)
    setInfoOnComponent(compoIds[i],other.getInfoOnComponent((int)i).c_str());
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.copyPartOfStringInfoFrom2 (   self,
  args 
) [inherited]
copyPartOfStringInfoFrom2(self, ivec compoIds, DataArray other)
copyPartOfStringInfoFrom2(self, PyObject li, DataArray other)

1

Definition at line 1066 of file ParaMEDMEM.py.

01066 
01067     def copyPartOfStringInfoFrom2(self, *args):
01068         """
01069         copyPartOfStringInfoFrom2(self, ivec compoIds, DataArray other)
01070         copyPartOfStringInfoFrom2(self, PyObject li, DataArray other)
01071 
01072         1
01073         """
01074         return _ParaMEDMEM.DataArray_copyPartOfStringInfoFrom2(self, *args)

Here is the call graph for this function:

void DataArray::copyStringInfoFrom ( const DataArray other) throw (INTERP_KERNEL::Exception) [inherited]

Definition at line 83 of file MEDCouplingMemArray.cxx.

{
  if(_info_on_compo.size()!=other._info_on_compo.size())
    throw INTERP_KERNEL::Exception("Size of arrays mismatches on copyStringInfoFrom !");
  _name=other._name;
  _info_on_compo=other._info_on_compo;
}
def ParaMEDMEM.DataArray.copyStringInfoFrom (   self,
  args 
) [inherited]
copyStringInfoFrom(self, DataArray other)

1

Definition at line 879 of file ParaMEDMEM.py.

00879 
00880     def copyStringInfoFrom(self, *args):
00881         """
00882         copyStringInfoFrom(self, DataArray other)
00883 
00884         1
00885         """
00886         return _ParaMEDMEM.DataArray_copyStringInfoFrom(self, *args)

Here is the call graph for this function:

void DataArrayInt::cpyFrom ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)

Definition at line 2956 of file MEDCouplingMemArray.cxx.

{
  other.checkAllocated();
  int nbOfTuples=other.getNumberOfTuples();
  int nbOfComp=other.getNumberOfComponents();
  allocIfNecessary(nbOfTuples,nbOfComp);
  int nbOfElems=nbOfTuples*nbOfComp;
  int *pt=getPointer();
  const int *ptI=other.getConstPointer();
  for(int i=0;i<nbOfElems;i++)
    pt[i]=ptI[i];
  copyStringInfoFrom(other);
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.cpyFrom (   self,
  args 
)
cpyFrom(self, DataArrayInt other)

1

Definition at line 2657 of file ParaMEDMEM.py.

02657 
02658     def cpyFrom(self, *args):
02659         """
02660         cpyFrom(self, DataArrayInt other)
02661 
02662         1
02663         """
02664         return _ParaMEDMEM.DataArrayInt_cpyFrom(self, *args)

Here is the call graph for this function:

def ParaMEDMEM.TimeLabel.declareAsNew (   self) [inherited]
declareAsNew(self)

1

Definition at line 292 of file ParaMEDMEM.py.

00292 
00293     def declareAsNew(self):
00294         """
00295         declareAsNew(self)
00296 
00297         1
00298         """
00299         return _ParaMEDMEM.TimeLabel_declareAsNew(self)

Here is the caller graph for this function:

Definition at line 2940 of file MEDCouplingMemArray.cxx.

{
  return new DataArrayInt(*this);
}

Here is the call graph for this function:

Here is the caller graph for this function:

deepCpy(self) -> DataArrayInt

1

Definition at line 2641 of file ParaMEDMEM.py.

02641 
02642     def deepCpy(self):
02643         """
02644         deepCpy(self) -> DataArrayInt
02645 
02646         1
02647         """
02648         return _ParaMEDMEM.DataArrayInt_deepCpy(self)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::deltaShiftIndex ( ) const throw (INTERP_KERNEL::Exception)

This method could be usefull for returned DataArrayInt marked as index.

Some methods that generate such DataArrayInt instances:

Definition at line 4794 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : only single component allowed !");
  int nbOfTuples=getNumberOfTuples();
  if(nbOfTuples<2)
    throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : 1 tuple at least must be present in 'this' !");
  const int *ptr=getConstPointer();
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc(nbOfTuples-1,1);
  int *out=ret->getPointer();
  std::transform(ptr+1,ptr+nbOfTuples,ptr,out,std::minus<int>());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

deltaShiftIndex(self) -> DataArrayInt

1

Definition at line 3249 of file ParaMEDMEM.py.

03249 
03250     def deltaShiftIndex(self):
03251         """
03252         deltaShiftIndex(self) -> DataArrayInt
03253 
03254         1
03255         """
03256         return _ParaMEDMEM.DataArrayInt_deltaShiftIndex(self)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::Divide ( const DataArrayInt a1,
const DataArrayInt a2 
) throw (INTERP_KERNEL::Exception) [static]

Definition at line 5147 of file MEDCouplingMemArray.cxx.

{
  int nbOfTuple=a1->getNumberOfTuples();
  int nbOfTuple2=a2->getNumberOfTuples();
  int nbOfComp=a1->getNumberOfComponents();
  int nbOfComp2=a2->getNumberOfComponents();
  if(nbOfTuple!=nbOfTuple2)
    throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array Divide !");
  DataArrayInt *ret=0;
  if(nbOfComp==nbOfComp2)
    {
      ret=DataArrayInt::New();
      ret->alloc(nbOfTuple,nbOfComp);
      std::transform(a1->begin(),a1->end(),a2->begin(),ret->getPointer(),std::divides<int>());
      ret->copyStringInfoFrom(*a1);
    }
  else
    {
      if(nbOfComp2==1)
        {
          ret=DataArrayInt::New();
          ret->alloc(nbOfTuple,nbOfComp);
          const int *a2Ptr=a2->getConstPointer();
          const int *a1Ptr=a1->getConstPointer();
          int *res=ret->getPointer();
          for(int i=0;i<nbOfTuple;i++)
            res=std::transform(a1Ptr+i*nbOfComp,a1Ptr+(i+1)*nbOfComp,res,std::bind2nd(std::divides<int>(),a2Ptr[i]));
          ret->copyStringInfoFrom(*a1);
        }
      else
        throw INTERP_KERNEL::Exception("Nb of components mismatch for array Divide !");
    }
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Divide(DataArrayInt a1, DataArrayInt a2) -> DataArrayInt

1

Definition at line 3352 of file ParaMEDMEM.py.

03352 
03353     def Divide(*args):
03354         """
03355         Divide(DataArrayInt a1, DataArrayInt a2) -> DataArrayInt
03356 
03357         1
03358         """
03359         return _ParaMEDMEM.DataArrayInt_Divide(*args)

Here is the call graph for this function:

void DataArrayInt::divideEqual ( const DataArrayInt other) throw (INTERP_KERNEL::Exception)

Definition at line 5182 of file MEDCouplingMemArray.cxx.

{
  const char *msg="Nb of tuples mismatch for DataArrayInt::divideEqual !";
  int nbOfTuple=getNumberOfTuples();
  int nbOfTuple2=other->getNumberOfTuples();
  int nbOfComp=getNumberOfComponents();
  int nbOfComp2=other->getNumberOfComponents();
  if(nbOfTuple==nbOfTuple2)
    {
      if(nbOfComp==nbOfComp2)
        {
          std::transform(begin(),end(),other->begin(),getPointer(),std::divides<int>());
        }
      else if(nbOfComp2==1)
        {
          int *ptr=getPointer();
          const int *ptrc=other->getConstPointer();
          for(int i=0;i<nbOfTuple;i++)
            std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptr+i*nbOfComp,std::bind2nd(std::divides<int>(),*ptrc++));
        }
      else
        throw INTERP_KERNEL::Exception(msg);
    }
  else if(nbOfTuple2==1)
    {
      if(nbOfComp2==nbOfComp)
        {
          int *ptr=getPointer();
          const int *ptrc=other->getConstPointer();
          for(int i=0;i<nbOfTuple;i++)
            std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptrc,ptr+i*nbOfComp,std::divides<int>());
        }
      else
        throw INTERP_KERNEL::Exception(msg);
    }
  else
    throw INTERP_KERNEL::Exception(msg);
  declareAsNew();
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.divideEqual (   self,
  args 
)
divideEqual(self, DataArrayInt other)

1

Definition at line 3362 of file ParaMEDMEM.py.

03362 
03363     def divideEqual(self, *args):
03364         """
03365         divideEqual(self, DataArrayInt other)
03366 
03367         1
03368         """
03369         return _ParaMEDMEM.DataArrayInt_divideEqual(self, *args)

Here is the call graph for this function:

bool DataArrayInt::empty ( ) const throw (INTERP_KERNEL::Exception)

This method should be called on an allocated DataArrayInt instance.

If not an exception will be throw ! This method checks the number of tupes. If it is equal to 0, it returns true, if not false is returned.

Definition at line 2934 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  return getNumberOfTuples()==0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

empty(self) -> bool

1

Definition at line 2633 of file ParaMEDMEM.py.

02633 
02634     def empty(self):
02635         """
02636         empty(self) -> bool
02637 
02638         1
02639         """
02640         return _ParaMEDMEM.DataArrayInt_empty(self)

Here is the call graph for this function:

MEDCOUPLING_EXPORT const int* ParaMEDMEM::DataArrayInt::end ( ) const [inline]

Definition at line 401 of file MEDCouplingMemArray.hxx.

{ return getConstPointer()+getNbOfElems(); }

Here is the call graph for this function:

Here is the caller graph for this function:

end(self) -> int

1

Definition at line 3088 of file ParaMEDMEM.py.

03088 
03089     def end(self):
03090         """
03091         end(self) -> int
03092 
03093         1
03094         """
03095         return _ParaMEDMEM.DataArrayInt_end(self)

Here is the call graph for this function:

void DataArrayInt::fillWithValue ( int  val) throw (INTERP_KERNEL::Exception)

Definition at line 2998 of file MEDCouplingMemArray.cxx.

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.fillWithValue (   self,
  args 
)
fillWithValue(self, int val)

1

Definition at line 2737 of file ParaMEDMEM.py.

02737 
02738     def fillWithValue(self, *args):
02739         """
02740         fillWithValue(self, int val)
02741 
02742         1
02743         """
02744         return _ParaMEDMEM.DataArrayInt_fillWithValue(self, *args)

Here is the call graph for this function:

void DataArrayInt::fillWithZero ( ) throw (INTERP_KERNEL::Exception)

Definition at line 2991 of file MEDCouplingMemArray.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

fillWithZero(self)

1

Definition at line 2729 of file ParaMEDMEM.py.

02729 
02730     def fillWithZero(self):
02731         """
02732         fillWithZero(self)
02733 
02734         1
02735         """
02736         return _ParaMEDMEM.DataArrayInt_fillWithZero(self)

Here is the call graph for this function:

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.

Definition at line 5374 of file MEDCouplingMemArray.cxx.

{
  setName(tinyInfoS[0].c_str());
  if(isAllocated())
    {
      int nbOfCompo=getNumberOfComponents();
      for(int i=0;i<nbOfCompo;i++)
        setInfoOnComponent(i,tinyInfoS[i+1].c_str());
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

finishUnserialization(self, ivec tinyInfoI, svec tinyInfoS)

1

Definition at line 3440 of file ParaMEDMEM.py.

03440 
03441     def finishUnserialization(self, *args):
03442         """
03443         finishUnserialization(self, ivec tinyInfoI, svec tinyInfoS)
03444 
03445         1
03446         """
03447         return _ParaMEDMEM.DataArrayInt_finishUnserialization(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::fromNoInterlace ( ) const throw (INTERP_KERNEL::Exception)

Definition at line 3305 of file MEDCouplingMemArray.cxx.

{
  if(_mem.isNull())
    throw INTERP_KERNEL::Exception("DataArrayInt::fromNoInterlace : Not defined array !");
  int *tab=_mem.fromNoInterlace(getNumberOfComponents());
  DataArrayInt *ret=DataArrayInt::New();
  ret->useArray(tab,true,CPP_DEALLOC,getNumberOfTuples(),getNumberOfComponents());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

fromNoInterlace(self) -> DataArrayInt

1

Definition at line 2834 of file ParaMEDMEM.py.

02834 
02835     def fromNoInterlace(self):
02836         """
02837         fromNoInterlace(self) -> DataArrayInt
02838 
02839         1
02840         """
02841         return _ParaMEDMEM.DataArrayInt_fromNoInterlace(self)

Here is the call graph for this function:

Definition at line 398 of file MEDCouplingMemArray.hxx.

{ return _mem.getConstPointer(); }

Here is the call graph for this function:

getConstPointer(self) -> int

1

Definition at line 3064 of file ParaMEDMEM.py.

03064 
03065     def getConstPointer(self):
03066         """
03067         getConstPointer(self) -> int
03068 
03069         1
03070         """
03071         return _ParaMEDMEM.DataArrayInt_getConstPointer(self)

Here is the call graph for this function:

std::set< int > DataArrayInt::getDifferentValues ( ) const throw (INTERP_KERNEL::Exception)

This method returns all different values found in 'this'.

Definition at line 4918 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  std::set<int> ret;
  ret.insert(getConstPointer(),getConstPointer()+getNbOfElems());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getDifferentValues (   self,
  args 
)
getDifferentValues(self) -> __dummy_0__
getDifferentValues(self, bool val) -> PyObject

1

Definition at line 3493 of file ParaMEDMEM.py.

03493 
03494     def getDifferentValues(self, *args):
03495         """
03496         getDifferentValues(self) -> __dummy_0__
03497         getDifferentValues(self, bool val) -> PyObject
03498 
03499         1
03500         """
03501         return _ParaMEDMEM.DataArrayInt_getDifferentValues(self, *args)

Here is the call graph for this function:

int DataArrayInt::getHashCode ( ) const throw (INTERP_KERNEL::Exception)

This method expects that this is well allocated.

If not an INTERP_KERNEL::Exception will be thrown. This method is useful for a quick comparison of many instances of DataArrayInt.

Definition at line 2915 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  int nbOfElems=getNbOfElems();
  int ret=nbOfElems*65536;
  int delta=3;
  if(nbOfElems>48)
    delta=nbOfElems/8;
  int ret0=0;
  const int *pt=begin();
  for(int i=0;i<nbOfElems;i+=delta)
    ret0+=pt[i] & 0x1FFF;
  return ret+ret0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

getHashCode(self) -> int

1

Definition at line 2625 of file ParaMEDMEM.py.

02625 
02626     def getHashCode(self):
02627         """
02628         getHashCode(self) -> int
02629 
02630         1
02631         """
02632         return _ParaMEDMEM.DataArrayInt_getHashCode(self)

Here is the call graph for this function:

getHiddenCppPointer(self) -> string

1

Definition at line 345 of file ParaMEDMEM.py.

00345 
00346     def getHiddenCppPointer(self):
00347         """
00348         getHiddenCppPointer(self) -> string
00349 
00350         1
00351         """
00352         return _ParaMEDMEM.RefCountObject_getHiddenCppPointer(self)

DataArrayInt * DataArrayInt::getIdsEqual ( int  val) const throw (INTERP_KERNEL::Exception)

Definition at line 4257 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::getIdsEqual : the array must have only one component, you can call 'rearrange' method before !");
  const int *cptr=getConstPointer();
  std::vector<int> res;
  int nbOfTuples=getNumberOfTuples();
  for(int i=0;i<nbOfTuples;i++,cptr++)
    if(*cptr==val)
      res.push_back(i);
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc((int)res.size(),1);
  std::copy(res.begin(),res.end(),ret->getPointer());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getIdsEqual (   self,
  args 
)
getIdsEqual(self, int val) -> DataArrayInt

1

Definition at line 3096 of file ParaMEDMEM.py.

03096 
03097     def getIdsEqual(self, *args):
03098         """
03099         getIdsEqual(self, int val) -> DataArrayInt
03100 
03101         1
03102         """
03103         return _ParaMEDMEM.DataArrayInt_getIdsEqual(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::getIdsEqualList ( const std::vector< int > &  vals) const throw (INTERP_KERNEL::Exception)

Definition at line 4314 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::getIdsEqualList : the array must have only one component, you can call 'rearrange' method before !");
  std::set<int> vals2(vals.begin(),vals.end());
  const int *cptr=getConstPointer();
  std::vector<int> res;
  int nbOfTuples=getNumberOfTuples();
  for(int i=0;i<nbOfTuples;i++,cptr++)
    if(vals2.find(*cptr)!=vals2.end())
      res.push_back(i);
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc((int)res.size(),1);
  std::copy(res.begin(),res.end(),ret->getPointer());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getIdsEqualList (   self,
  args 
)
getIdsEqualList(self, ivec vals) -> DataArrayInt

1

Definition at line 3112 of file ParaMEDMEM.py.

03112 
03113     def getIdsEqualList(self, *args):
03114         """
03115         getIdsEqualList(self, ivec vals) -> DataArrayInt
03116 
03117         1
03118         """
03119         return _ParaMEDMEM.DataArrayInt_getIdsEqualList(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::getIdsNotEqual ( int  val) const throw (INTERP_KERNEL::Exception)

Definition at line 4273 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::getIdsNotEqual : the array must have only one component, you can call 'rearrange' method before !");
  const int *cptr=getConstPointer();
  std::vector<int> res;
  int nbOfTuples=getNumberOfTuples();
  for(int i=0;i<nbOfTuples;i++,cptr++)
    if(*cptr!=val)
      res.push_back(i);
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc((int)res.size(),1);
  std::copy(res.begin(),res.end(),ret->getPointer());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getIdsNotEqual (   self,
  args 
)
getIdsNotEqual(self, int val) -> DataArrayInt

1

Definition at line 3104 of file ParaMEDMEM.py.

03104 
03105     def getIdsNotEqual(self, *args):
03106         """
03107         getIdsNotEqual(self, int val) -> DataArrayInt
03108 
03109         1
03110         """
03111         return _ParaMEDMEM.DataArrayInt_getIdsNotEqual(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::getIdsNotEqualList ( const std::vector< int > &  vals) const throw (INTERP_KERNEL::Exception)

Definition at line 4331 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::getIdsNotEqualList : the array must have only one component, you can call 'rearrange' method before !");
  std::set<int> vals2(vals.begin(),vals.end());
  const int *cptr=getConstPointer();
  std::vector<int> res;
  int nbOfTuples=getNumberOfTuples();
  for(int i=0;i<nbOfTuples;i++,cptr++)
    if(vals2.find(*cptr)==vals2.end())
      res.push_back(i);
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc((int)res.size(),1);
  std::copy(res.begin(),res.end(),ret->getPointer());
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getIdsNotEqualList (   self,
  args 
)
getIdsNotEqualList(self, ivec vals) -> DataArrayInt

1

Definition at line 3120 of file ParaMEDMEM.py.

03120 
03121     def getIdsNotEqualList(self, *args):
03122         """
03123         getIdsNotEqualList(self, ivec vals) -> DataArrayInt
03124 
03125         1
03126         """
03127         return _ParaMEDMEM.DataArrayInt_getIdsNotEqualList(self, *args)

Here is the call graph for this function:

MEDCOUPLING_EXPORT int ParaMEDMEM::DataArrayInt::getIJ ( int  tupleId,
int  compoId 
) const [inline]

Definition at line 391 of file MEDCouplingMemArray.hxx.

{ return _mem[tupleId*((int)_info_on_compo.size())+compoId]; }

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getIJ (   self,
  args 
)
getIJ(self, int tupleId, int compoId) -> int

1

Definition at line 3016 of file ParaMEDMEM.py.

03016 
03017     def getIJ(self, *args):
03018         """
03019         getIJ(self, int tupleId, int compoId) -> int
03020 
03021         1
03022         """
03023         return _ParaMEDMEM.DataArrayInt_getIJ(self, *args)

Here is the call graph for this function:

int DataArrayInt::getIJSafe ( int  tupleId,
int  compoId 
) const throw (INTERP_KERNEL::Exception)

This method is equivalent to DataArrayInt::getIJ except that here tupleId is checked to be in [0,this->getNumberOfTuples()) and compoId to be in [0,this->getNumberOfComponents()).

If one of these check fails an INTERP_KERNEL::Exception will be thrown. So this method is safe but expensive if used to go through all data of this.

Definition at line 4208 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(tupleId<0 || tupleId>=getNumberOfTuples())
    {
      std::ostringstream oss; oss << "DataArrayInt::getIJSafe : request for tupleId " << tupleId << " should be in [0," << getNumberOfTuples() << ") !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(compoId<0 || compoId>=getNumberOfComponents())
    {
      std::ostringstream oss; oss << "DataArrayInt::getIJSafe : request for compoId " << compoId << " should be in [0," << getNumberOfComponents() << ") !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  return _mem[tupleId*((int)_info_on_compo.size())+compoId];
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getIJSafe (   self,
  args 
)
getIJSafe(self, int tupleId, int compoId) -> int

1

Definition at line 3024 of file ParaMEDMEM.py.

03024 
03025     def getIJSafe(self, *args):
03026         """
03027         getIJSafe(self, int tupleId, int compoId) -> int
03028 
03029         1
03030         """
03031         return _ParaMEDMEM.DataArrayInt_getIJSafe(self, *args)

Here is the call graph for this function:

std::string DataArray::getInfoOnComponent ( int  i) const throw (INTERP_KERNEL::Exception) [inherited]

Definition at line 167 of file MEDCouplingMemArray.cxx.

{
  if(i<(int)_info_on_compo.size() && i>=0)
    return _info_on_compo[i];
  else
    {
      std::ostringstream oss; oss << "DataArray::getInfoOnComponent : Specified component id is out of range (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getInfoOnComponent (   self,
  args 
) [inherited]
getInfoOnComponent(self, int i) -> string

1

Definition at line 944 of file ParaMEDMEM.py.

00944 
00945     def getInfoOnComponent(self, *args):
00946         """
00947         getInfoOnComponent(self, int i) -> string
00948 
00949         1
00950         """
00951         return _ParaMEDMEM.DataArray_getInfoOnComponent(self, *args)

Here is the call graph for this function:

MEDCOUPLING_EXPORT const std::vector<std::string>& ParaMEDMEM::DataArray::getInfoOnComponents ( ) const [inline, inherited]

Definition at line 98 of file MEDCouplingMemArray.hxx.

{ return _info_on_compo; }

Here is the caller graph for this function:

MEDCOUPLING_EXPORT std::vector<std::string>& ParaMEDMEM::DataArray::getInfoOnComponents ( ) [inline, inherited]

Definition at line 99 of file MEDCouplingMemArray.hxx.

{ return _info_on_compo; }
def ParaMEDMEM.DataArray.getInfoOnComponents (   self,
  args 
) [inherited]
getInfoOnComponents(self) -> svec
getInfoOnComponents(self) -> svec

1

Definition at line 911 of file ParaMEDMEM.py.

00911 
00912     def getInfoOnComponents(self, *args):
00913         """
00914         getInfoOnComponents(self) -> svec
00915         getInfoOnComponents(self) -> svec
00916 
00917         1
00918         """
00919         return _ParaMEDMEM.DataArray_getInfoOnComponents(self, *args)

Here is the call graph for this function:

int DataArrayInt::getMaxValue ( int &  tupleId) const throw (INTERP_KERNEL::Exception)

Definition at line 4403 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::getMaxValue : must be applied on DataArrayInt with only one component !");
  int nbOfTuples=getNumberOfTuples();
  if(nbOfTuples<=0)
    throw INTERP_KERNEL::Exception("DataArrayInt::getMaxValue : array exists but number of tuples must be > 0 !");
  const int *vals=getConstPointer();
  const int *loc=std::max_element(vals,vals+nbOfTuples);
  tupleId=(int)std::distance(vals,loc);
  return *loc;
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getMaxValue (   self,
  args 
)
getMaxValue(self, int tupleId) -> int
getMaxValue(self) -> PyObject

1

Definition at line 3733 of file ParaMEDMEM.py.

03733 
03734     def getMaxValue(self, *args):
03735         """
03736         getMaxValue(self, int tupleId) -> int
03737         getMaxValue(self) -> PyObject
03738 
03739         1
03740         """
03741         return _ParaMEDMEM.DataArrayInt_getMaxValue(self, *args)

Here is the call graph for this function:

int DataArrayInt::getMaxValueInArray ( ) const throw (INTERP_KERNEL::Exception)

Idem to DataArrayInt::getMaxValue expect that here number of components can be >=1.

Definition at line 4419 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  const int *loc=std::max_element(begin(),end());
  return *loc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

getMaxValueInArray(self) -> int

1

Definition at line 3144 of file ParaMEDMEM.py.

03144 
03145     def getMaxValueInArray(self):
03146         """
03147         getMaxValueInArray(self) -> int
03148 
03149         1
03150         """
03151         return _ParaMEDMEM.DataArrayInt_getMaxValueInArray(self)

Here is the call graph for this function:

int DataArrayInt::getMinValue ( int &  tupleId) const throw (INTERP_KERNEL::Exception)

Definition at line 4426 of file MEDCouplingMemArray.cxx.

{
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::getMaxValue : must be applied on DataArrayInt with only one component !");
  int nbOfTuples=getNumberOfTuples();
  if(nbOfTuples<=0)
    throw INTERP_KERNEL::Exception("DataArrayInt::getMaxValue : array exists but number of tuples must be > 0 !");
  const int *vals=getConstPointer();
  const int *loc=std::min_element(vals,vals+nbOfTuples);
  tupleId=(int)std::distance(vals,loc);
  return *loc;
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getMinValue (   self,
  args 
)
getMinValue(self, int tupleId) -> int
getMinValue(self) -> PyObject

1

Definition at line 3742 of file ParaMEDMEM.py.

03742 
03743     def getMinValue(self, *args):
03744         """
03745         getMinValue(self, int tupleId) -> int
03746         getMinValue(self) -> PyObject
03747 
03748         1
03749         """
03750         return _ParaMEDMEM.DataArrayInt_getMinValue(self, *args)

Here is the call graph for this function:

int DataArrayInt::getMinValueInArray ( ) const throw (INTERP_KERNEL::Exception)

Idem to DataArrayInt::getMinValue expect that here number of components can be >=1.

Definition at line 4442 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  const int *loc=std::min_element(begin(),end());
  return *loc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

getMinValueInArray(self) -> int

1

Definition at line 3152 of file ParaMEDMEM.py.

03152 
03153     def getMinValueInArray(self):
03154         """
03155         getMinValueInArray(self) -> int
03156 
03157         1
03158         """
03159         return _ParaMEDMEM.DataArrayInt_getMinValueInArray(self)

Here is the call graph for this function:

MEDCOUPLING_EXPORT std::string ParaMEDMEM::DataArray::getName ( ) const [inline, inherited]

Definition at line 97 of file MEDCouplingMemArray.hxx.

{ return _name; }

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getName (   self) [inherited]
getName(self) -> string

1

Definition at line 903 of file ParaMEDMEM.py.

00903 
00904     def getName(self):
00905         """
00906         getName(self) -> string
00907 
00908         1
00909         """
00910         return _ParaMEDMEM.DataArray_getName(self)

Here is the call graph for this function:

MEDCOUPLING_EXPORT int ParaMEDMEM::DataArray::getNbOfElems ( ) const [inline, inherited]

Definition at line 109 of file MEDCouplingMemArray.hxx.

{ return ((int)_info_on_compo.size())*_nb_of_tuples; }
def ParaMEDMEM.DataArray.getNbOfElems (   self) [inherited]
getNbOfElems(self) -> int

1

Definition at line 992 of file ParaMEDMEM.py.

00992 
00993     def getNbOfElems(self):
00994         """
00995         getNbOfElems(self) -> int
00996 
00997         1
00998         """
00999         return _ParaMEDMEM.DataArray_getNbOfElems(self)

Here is the call graph for this function:

Definition at line 107 of file MEDCouplingMemArray.hxx.

{ return (int)_info_on_compo.size(); }
def ParaMEDMEM.DataArray.getNumberOfComponents (   self) [inherited]
getNumberOfComponents(self) -> int

1

Definition at line 976 of file ParaMEDMEM.py.

00976 
00977     def getNumberOfComponents(self):
00978         """
00979         getNumberOfComponents(self) -> int
00980 
00981         1
00982         """
00983         return _ParaMEDMEM.DataArray_getNumberOfComponents(self)

Here is the call graph for this function:

int DataArray::GetNumberOfItemGivenBES ( int  begin,
int  end,
int  step,
const char *  msg 
) throw (INTERP_KERNEL::Exception) [static, inherited]

Definition at line 303 of file MEDCouplingMemArray.cxx.

{
  if(end<begin)
    {
      std::ostringstream oss; oss << msg << " : end before begin !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(step<=0)
    {
      std::ostringstream oss; oss << msg << " : invalid step should be > 0 !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  return (end-1-begin)/step+1;
}

Here is the caller graph for this function:

GetNumberOfItemGivenBES(int begin, int end, int step, char msg) -> int

1

Definition at line 1017 of file ParaMEDMEM.py.

01017 
01018     def GetNumberOfItemGivenBES(*args):
01019         """
01020         GetNumberOfItemGivenBES(int begin, int end, int step, char msg) -> int
01021 
01022         1
01023         """
01024         return _ParaMEDMEM.DataArray_GetNumberOfItemGivenBES(*args)

Here is the call graph for this function:

int DataArray::GetNumberOfItemGivenBESRelative ( int  begin,
int  end,
int  step,
const char *  msg 
) throw (INTERP_KERNEL::Exception) [static, inherited]

Definition at line 318 of file MEDCouplingMemArray.cxx.

{
  if(step==0)
    throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBES : step=0 is not allowed !");
  if(end<begin && step>0)
    {
      std::ostringstream oss; oss << msg << " : end before begin whereas step is positive !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(begin<end && step<0)
    {
      std::ostringstream oss; oss << msg << " : invalid step should be > 0 !";
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
  if(begin!=end)
    return (std::max(begin,end)-1-std::min(begin,end))/std::abs(step)+1;
  else
    return 0;
}

Here is the caller graph for this function:

GetNumberOfItemGivenBESRelative(int begin, int end, int step, char msg) -> int

1

Definition at line 1027 of file ParaMEDMEM.py.

01027 
01028     def GetNumberOfItemGivenBESRelative(*args):
01029         """
01030         GetNumberOfItemGivenBESRelative(int begin, int end, int step, char msg) -> int
01031 
01032         1
01033         """
01034         return _ParaMEDMEM.DataArray_GetNumberOfItemGivenBESRelative(*args)

Here is the call graph for this function:

Definition at line 108 of file MEDCouplingMemArray.hxx.

{ return _nb_of_tuples; }
def ParaMEDMEM.DataArray.getNumberOfTuples (   self) [inherited]
getNumberOfTuples(self) -> int

1

Definition at line 984 of file ParaMEDMEM.py.

00984 
00985     def getNumberOfTuples(self):
00986         """
00987         getNumberOfTuples(self) -> int
00988 
00989         1
00990         """
00991         return _ParaMEDMEM.DataArray_getNumberOfTuples(self)

Here is the call graph for this function:

Definition at line 396 of file MEDCouplingMemArray.hxx.

{ return _mem.getPointer(); }

Here is the call graph for this function:

getPointer(self) -> int

1

Definition at line 3056 of file ParaMEDMEM.py.

03056 
03057     def getPointer(self):
03058         """
03059         getPointer(self) -> int
03060 
03061         1
03062         """
03063         return _ParaMEDMEM.DataArrayInt_getPointer(self)

Here is the call graph for this function:

def ParaMEDMEM.TimeLabel.getTimeOfThis (   self) [inherited]
getTimeOfThis(self) -> unsigned int

1

Definition at line 308 of file ParaMEDMEM.py.

00308 
00309     def getTimeOfThis(self):
00310         """
00311         getTimeOfThis(self) -> unsigned int
00312 
00313         1
00314         """
00315         return _ParaMEDMEM.TimeLabel_getTimeOfThis(self)

Here is the caller graph for this function:

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.

Definition at line 5318 of file MEDCouplingMemArray.cxx.

{
  tinyInfo.resize(2);
  if(isAllocated())
    {
      tinyInfo[0]=getNumberOfTuples();
      tinyInfo[1]=getNumberOfComponents();
    }
  else
    {
      tinyInfo[0]=-1;
      tinyInfo[1]=-1;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

getTinySerializationIntInformation(self, ivec tinyInfo)

1

Definition at line 3416 of file ParaMEDMEM.py.

03416 
03417     def getTinySerializationIntInformation(self, *args):
03418         """
03419         getTinySerializationIntInformation(self, ivec tinyInfo)
03420 
03421         1
03422         """
03423         return _ParaMEDMEM.DataArrayInt_getTinySerializationIntInformation(self, *args)

Here is the call graph for this function:

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.

Definition at line 5337 of file MEDCouplingMemArray.cxx.

{
  if(isAllocated())
    {
      int nbOfCompo=getNumberOfComponents();
      tinyInfo.resize(nbOfCompo+1);
      tinyInfo[0]=getName();
      for(int i=0;i<nbOfCompo;i++)
        tinyInfo[i+1]=getInfoOnComponent(i);
    }
  else
    {
      tinyInfo.resize(1);
      tinyInfo[0]=getName();
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

getTinySerializationStrInformation(self, svec tinyInfo)

1

Definition at line 3424 of file ParaMEDMEM.py.

03424 
03425     def getTinySerializationStrInformation(self, *args):
03426         """
03427         getTinySerializationStrInformation(self, svec tinyInfo)
03428 
03429         1
03430         """
03431         return _ParaMEDMEM.DataArrayInt_getTinySerializationStrInformation(self, *args)

Here is the call graph for this function:

MEDCOUPLING_EXPORT void ParaMEDMEM::DataArrayInt::getTuple ( int  tupleId,
int *  res 
) const [inline]

Definition at line 390 of file MEDCouplingMemArray.hxx.

{ std::copy(_mem.getConstPointerLoc(tupleId*((int)_info_on_compo.size())),_mem.getConstPointerLoc((tupleId+1)*((int)_info_on_compo.size())),res); }

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.getTuple (   self,
  args 
)
getTuple(self, int tupleId, int res)
getTuple(self, int tupleId) -> PyObject

1

Definition at line 3660 of file ParaMEDMEM.py.

03660 
03661     def getTuple(self, *args):
03662         """
03663         getTuple(self, int tupleId, int res)
03664         getTuple(self, int tupleId) -> PyObject
03665 
03666         1
03667         """
03668         return _ParaMEDMEM.DataArrayInt_getTuple(self, *args)

Here is the call graph for this function:

std::string DataArray::GetUnitFromInfo ( const std::string &  info) throw (INTERP_KERNEL::Exception) [static, inherited]

Definition at line 226 of file MEDCouplingMemArray.cxx.

{
  std::size_t p1=info.find_last_of('[');
  std::size_t p2=info.find_last_of(']');
  if(p1==std::string::npos || p2==std::string::npos)
    return std::string();
  if(p1>p2)
    return std::string();
  return info.substr(p1+1,p2-p1-1);
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.GetUnitFromInfo (   args) [inherited]
GetUnitFromInfo(string info) -> string

1

Definition at line 1047 of file ParaMEDMEM.py.

01047 
01048     def GetUnitFromInfo(*args):
01049         """
01050         GetUnitFromInfo(string info) -> string
01051 
01052         1
01053         """
01054         return _ParaMEDMEM.DataArray_GetUnitFromInfo(*args)

Here is the call graph for this function:

std::string DataArray::getUnitOnComponent ( int  i) const throw (INTERP_KERNEL::Exception) [inherited]

In the info part of i_th component this method returns the var part.

For example, if getInfoOnComponent(0) return "SIGXY (N/m^2)", getUnitOnComponent(0) will return "N/m^2"

Definition at line 199 of file MEDCouplingMemArray.cxx.

{
  if(i<(int)_info_on_compo.size() && i>=0)
    {
      return GetUnitFromInfo(_info_on_compo[i]);
    }
  else
    {
      std::ostringstream oss; oss << "DataArray::getUnitOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getUnitOnComponent (   self,
  args 
) [inherited]
getUnitOnComponent(self, int i) -> string

1

Definition at line 960 of file ParaMEDMEM.py.

00960 
00961     def getUnitOnComponent(self, *args):
00962         """
00963         getUnitOnComponent(self, int i) -> string
00964 
00965         1
00966         """
00967         return _ParaMEDMEM.DataArray_getUnitOnComponent(self, *args)

Here is the call graph for this function:

std::vector< std::string > DataArray::getUnitsOnComponent ( ) const [inherited]

Definition at line 158 of file MEDCouplingMemArray.cxx.

{
  int nbOfCompo=(int)_info_on_compo.size();
  std::vector<std::string> ret(nbOfCompo);
  for(int i=0;i<nbOfCompo;i++)
    ret[i]=getUnitOnComponent(i);
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getUnitsOnComponent (   self) [inherited]
getUnitsOnComponent(self) -> svec

1

Definition at line 936 of file ParaMEDMEM.py.

00936 
00937     def getUnitsOnComponent(self):
00938         """
00939         getUnitsOnComponent(self) -> svec
00940 
00941         1
00942         """
00943         return _ParaMEDMEM.DataArray_getUnitsOnComponent(self)

Here is the call graph for this function:

getValues(self) -> PyObject

1

Definition at line 3522 of file ParaMEDMEM.py.

03522 
03523     def getValues(self):
03524         """
03525         getValues(self) -> PyObject
03526 
03527         1
03528         """
03529         return _ParaMEDMEM.DataArrayInt_getValues(self)

getValuesAsTuple(self) -> PyObject

1

Definition at line 3530 of file ParaMEDMEM.py.

03530 
03531     def getValuesAsTuple(self):
03532         """
03533         getValuesAsTuple(self) -> PyObject
03534 
03535         1
03536         """
03537         return _ParaMEDMEM.DataArrayInt_getValuesAsTuple(self)

std::string DataArray::GetVarNameFromInfo ( const std::string &  info) throw (INTERP_KERNEL::Exception) [static, inherited]

Definition at line 212 of file MEDCouplingMemArray.cxx.

{
  std::size_t p1=info.find_last_of('[');
  std::size_t p2=info.find_last_of(']');
  if(p1==std::string::npos || p2==std::string::npos)
    return info;
  if(p1>p2)
    return info;
  if(p1==0)
    return std::string();
  std::size_t p3=info.find_last_not_of(' ',p1-1);
  return info.substr(0,p3+1);
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.GetVarNameFromInfo (   args) [inherited]
GetVarNameFromInfo(string info) -> string

1

Definition at line 1037 of file ParaMEDMEM.py.

01037 
01038     def GetVarNameFromInfo(*args):
01039         """
01040         GetVarNameFromInfo(string info) -> string
01041 
01042         1
01043         """
01044         return _ParaMEDMEM.DataArray_GetVarNameFromInfo(*args)

Here is the call graph for this function:

std::string DataArray::getVarOnComponent ( int  i) const throw (INTERP_KERNEL::Exception) [inherited]

In the info part of i_th component this method returns the var part.

For example, if getInfoOnComponent(0) return "SIGXY (N/m^2)", getVarOnComponent(0) will return "SIGXY"

Definition at line 182 of file MEDCouplingMemArray.cxx.

{
  if(i<(int)_info_on_compo.size() && i>=0)
    {
      return GetVarNameFromInfo(_info_on_compo[i]);
    }
  else
    {
      std::ostringstream oss; oss << "DataArray::getVarOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
      throw INTERP_KERNEL::Exception(oss.str().c_str());
    }
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getVarOnComponent (   self,
  args 
) [inherited]
getVarOnComponent(self, int i) -> string

1

Definition at line 952 of file ParaMEDMEM.py.

00952 
00953     def getVarOnComponent(self, *args):
00954         """
00955         getVarOnComponent(self, int i) -> string
00956 
00957         1
00958         """
00959         return _ParaMEDMEM.DataArray_getVarOnComponent(self, *args)

Here is the call graph for this function:

std::vector< std::string > DataArray::getVarsOnComponent ( ) const [inherited]

Definition at line 149 of file MEDCouplingMemArray.cxx.

{
  int nbOfCompo=(int)_info_on_compo.size();
  std::vector<std::string> ret(nbOfCompo);
  for(int i=0;i<nbOfCompo;i++)
    ret[i]=getVarOnComponent(i);
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArray.getVarsOnComponent (   self) [inherited]
getVarsOnComponent(self) -> svec

1

Definition at line 928 of file ParaMEDMEM.py.

00928 
00929     def getVarsOnComponent(self):
00930         """
00931         getVarsOnComponent(self) -> svec
00932 
00933         1
00934         """
00935         return _ParaMEDMEM.DataArray_getVarsOnComponent(self)

Here is the call graph for this function:

def ParaMEDMEM.RefCountObject.incrRef (   self) [inherited]
incrRef(self)

1

Definition at line 337 of file ParaMEDMEM.py.

00337 
00338     def incrRef(self):
00339         """
00340         incrRef(self)
00341 
00342         1
00343         """
00344         return _ParaMEDMEM.RefCountObject_incrRef(self)

int DataArrayInt::intValue ( ) const throw (INTERP_KERNEL::Exception)

This method 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 one or more conditions is not fulfilled an exception will be thrown.

Definition at line 2897 of file MEDCouplingMemArray.cxx.

{
  if(isAllocated())
    {
      if(getNbOfElems()==1)
        {
          return *getConstPointer();
        }
      else
        throw INTERP_KERNEL::Exception("DataArrayInt::intValue : DataArrayInt instance is allocated but number of elements is not equal to 1 !");
    }
  else
    throw INTERP_KERNEL::Exception("DataArrayInt::intValue : DataArrayInt instance is not allocated !");
}

Here is the call graph for this function:

Here is the caller graph for this function:

intValue(self) -> int

1

Definition at line 2617 of file ParaMEDMEM.py.

02617 
02618     def intValue(self):
02619         """
02620         intValue(self) -> int
02621 
02622         1
02623         """
02624         return _ParaMEDMEM.DataArrayInt_intValue(self)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::invertArrayN2O2O2N ( int  oldNbOfElem) const

This method invert array 'di' that is a conversion map from New to old numbering to Old to New numbering.

Definition at line 3210 of file MEDCouplingMemArray.cxx.

{
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc(oldNbOfElem,1);
  const int *new2Old=getConstPointer();
  int *pt=ret->getPointer();
  std::fill(pt,pt+oldNbOfElem,-1);
  int nbOfNewElems=getNumberOfTuples();
  for(int i=0;i<nbOfNewElems;i++)
    pt[new2Old[i]]=i;
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.invertArrayN2O2O2N (   self,
  args 
)
invertArrayN2O2O2N(self, int oldNbOfElem) -> DataArrayInt

1

Definition at line 2810 of file ParaMEDMEM.py.

02810 
02811     def invertArrayN2O2O2N(self, *args):
02812         """
02813         invertArrayN2O2O2N(self, int oldNbOfElem) -> DataArrayInt
02814 
02815         1
02816         """
02817         return _ParaMEDMEM.DataArrayInt_invertArrayN2O2O2N(self, *args)

Here is the call graph for this function:

DataArrayInt * DataArrayInt::invertArrayO2N2N2O ( int  newNbOfElem) const

This method invert array 'di' that is a conversion map from Old to New numbering to New to Old numbering.

Definition at line 3194 of file MEDCouplingMemArray.cxx.

{
  DataArrayInt *ret=DataArrayInt::New();
  ret->alloc(newNbOfElem,1);
  int nbOfOldNodes=getNumberOfTuples();
  const int *old2New=getConstPointer();
  int *pt=ret->getPointer();
  for(int i=0;i!=nbOfOldNodes;i++)
    if(old2New[i]!=-1)
      pt[old2New[i]]=i;
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.invertArrayO2N2N2O (   self,
  args 
)
invertArrayO2N2N2O(self, int newNbOfElem) -> DataArrayInt

1

Definition at line 2802 of file ParaMEDMEM.py.

02802 
02803     def invertArrayO2N2N2O(self, *args):
02804         """
02805         invertArrayO2N2N2O(self, int newNbOfElem) -> DataArrayInt
02806 
02807         1
02808         """
02809         return _ParaMEDMEM.DataArrayInt_invertArrayO2N2N2O(self, *args)

Here is the call graph for this function:

void DataArrayInt::iota ( int  init = 0) throw (INTERP_KERNEL::Exception)

Definition at line 3005 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
    throw INTERP_KERNEL::Exception("DataArrayInt::iota : works only for arrays with only one component, you can call 'rearrange' method before !");
  int *ptr=getPointer();
  int ntuples=getNumberOfTuples();
  for(int i=0;i<ntuples;i++)
    ptr[i]=init+i;
  declareAsNew();
}

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.iota (   self,
  init = 0 
)
iota(self, int init = 0)
iota(self)

1

Definition at line 2745 of file ParaMEDMEM.py.

02745 
02746     def iota(self, init = 0):
02747         """
02748         iota(self, int init = 0)
02749         iota(self)
02750 
02751         1
02752         """
02753         return _ParaMEDMEM.DataArrayInt_iota(self, init)

Here is the call graph for this function:

bool DataArrayInt::isAllocated ( ) const

Definition at line 2860 of file MEDCouplingMemArray.cxx.

{
  return getConstPointer()!=0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

isAllocated(self) -> bool

1

Definition at line 2593 of file ParaMEDMEM.py.

02593 
02594     def isAllocated(self):
02595         """
02596         isAllocated(self) -> bool
02597 
02598         1
02599         """
02600         return _ParaMEDMEM.DataArrayInt_isAllocated(self)

Here is the call graph for this function:

bool DataArrayInt::isEqual ( const DataArrayInt other) const

Definition at line 3223 of file MEDCouplingMemArray.cxx.

{
  if(!areInfoEquals(other))
    return false;
  return _mem.isEqual(other._mem,0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

def ParaMEDMEM.DataArrayInt.isEqual (   self,
  args 
)
isEqual(self, DataArrayInt other) -> bool

1

Definition at line 2681 of file ParaMEDMEM.py.

02681 
02682     def isEqual(self, *args):
02683         """
02684         isEqual(self, DataArrayInt other) -> bool
02685 
02686         1
02687         """
02688         return _ParaMEDMEM.DataArrayInt_isEqual(self, *args)

Here is the call graph for this function:

Definition at line 3230 of file MEDCouplingMemArray.cxx.

{
  return _mem.isEqual(other._mem,0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

isEqualWithoutConsideringStr(self, DataArrayInt other) -> bool

1

Definition at line 2689 of file ParaMEDMEM.py.

02689 
02690     def isEqualWithoutConsideringStr(self, *args):
02691         """
02692         isEqualWithoutConsideringStr(self, DataArrayInt other) -> bool
02693 
02694         1
02695         """
02696         return _ParaMEDMEM.DataArrayInt_isEqualWithoutConsideringStr(self, *args)

Here is the call graph for this function:

bool DataArrayInt::isEqualWithoutConsideringStrAndOrder ( const DataArrayInt other) const throw (INTERP_KERNEL::Exception)

Definition at line 3235 of file MEDCouplingMemArray.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

isEqualWithoutConsideringStrAndOrder(self, DataArrayInt other) -> bool

1

Definition at line 2697 of file ParaMEDMEM.py.

02697 
02698     def isEqualWithoutConsideringStrAndOrder(self, *args):
02699         """
02700         isEqualWithoutConsideringStrAndOrder(self, DataArrayInt other) -> bool
02701 
02702         1
02703         """
02704         return _ParaMEDMEM.DataArrayInt_isEqualWithoutConsideringStrAndOrder(self, *args)

Here is the call graph for this function:

bool DataArrayInt::isIdentity ( ) const throw (INTERP_KERNEL::Exception)

This method checks that 'this' is with numberofcomponents == 1 and that it is equal to stdext::iota() of size getNumberOfTuples.

This method is particalary usefull for DataArrayInt instances that represents a renumbering array to check the real need in renumbering.

Definition at line 3702 of file MEDCouplingMemArray.cxx.

{
  checkAllocated();
  if(getNumberOfComponents()!=1)
    return false;
  int nbOfTuples=getNumberOfTuples();
  const int *pt=getConstPointer();
  for(int i=0;i<nbOfTuples;i++,pt++)
    if(*pt!=i)
      return false;
  return true;
}

Here is the call graph for this function: