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

Public Member Functions

void abs ()
 
MemArray< double > & accessToMemArray ()
 
const MemArray< double > & accessToMemArray () const
 
void accumulate (double *res) const
 
double accumulate (int compId) const
 
DataArrayDoubleaccumulatePerChunck (const int *bgOfIndex, const int *endOfIndex) const
 
void addEqual (const DataArrayDouble *other)
 
void aggregate (const DataArrayDouble *other)
 
DataArrayDoubleapplyFunc (int nbOfComp, FunctionToEvaluate func) const
 
DataArrayDoubleapplyFunc (int nbOfComp, const std::string &func, bool isSafe=true) const
 
DataArrayDoubleapplyFunc (const std::string &func, bool isSafe=true) const
 
DataArrayDoubleapplyFuncCompo (int nbOfComp, const std::string &func, bool isSafe=true) const
 
void applyFuncFast32 (const std::string &func)
 
void applyFuncFast64 (const std::string &func)
 
DataArrayDoubleapplyFuncNamedCompo (int nbOfComp, const std::vector< std::string > &varsOrder, const std::string &func, bool isSafe=true) const
 
void applyFuncOnThis (const std::string &func, bool isSafe=true)
 
void applyInv (double numerator)
 
void applyLin (double a, double b, int compoId)
 
void applyLin (double a, double b)
 
void applyPow (double val)
 
void applyRPow (double val)
 
bool areIncludedInMe (const DataArrayDouble *other, double prec, DataArrayInt *&tupleIds) const
 
DataArrayDoublebuildEuclidianDistanceDenseMatrix () const
 
DataArrayDoublebuildEuclidianDistanceDenseMatrixWith (const DataArrayDouble *other) const
 
DataArrayDoublebuildNewEmptyInstance () const
 
DataArrayDoublecartesianize (MEDCouplingAxisType atOfThis) const
 
void checkMonotonic (bool increasing, double eps) const
 
void checkNoNullValues () const
 
DataArrayDoublecomputeAbs () const
 
DataArrayDoublecomputeBBoxPerTuple (double epsilon=0.0) const
 
DataArrayIntcomputeNbOfInteractionsWith (const DataArrayDouble *otherBBoxFrmt, double eps) const
 
void computeTupleIdsNearTuples (const DataArrayDouble *other, double eps, DataArrayInt *&c, DataArrayInt *&cI) const
 
DataArrayIntconvertToIntArr () const
 
int count (double value, double eps) const
 
DataArrayDoubledeepCopy () const
 
DataArrayDoubledeterminant () const
 
DataArrayDoubledeviator () const
 
double distanceToTuple (const double *tupleBg, const double *tupleEnd, int &tupleId) const
 
void divideEqual (const DataArrayDouble *other)
 
double doubleValue () const
 
DataArrayDoubledoublyContractedProduct () const
 
DataArrayDoubleduplicateEachTupleNTimes (int nbTimes) const
 
DataArrayDoubleeigenValues () const
 
DataArrayDoubleeigenVectors () const
 
void fillWithZero ()
 
DataArrayIntfindClosestTupleId (const DataArrayDouble *other) const
 
template<int SPACEDIM>
void FindClosestTupleIdAlg (const BBTreePts< SPACEDIM, int > &myTree, double dist, const double *pos, int nbOfTuples, const double *thisPt, int thisNbOfTuples, int *res)
 
void findCommonTuples (double prec, int limitTupleId, DataArrayInt *&comm, DataArrayInt *&commIndex) const
 
template<int SPACEDIM>
void findCommonTuplesAlg (const double *bbox, int nbNodes, int limitNodeId, double prec, DataArrayInt *c, DataArrayInt *cI) const
 
DataArrayIntfindIdsInRange (double vmin, double vmax) const
 
DataArrayIntfindIdsNotInRange (double vmin, double vmax) const
 
template<int SPACEDIM>
void FindTupleIdsNearTuplesAlg (const BBTreePts< SPACEDIM, int > &myTree, const double *pos, int nbOfTuples, double eps, DataArrayInt *c, DataArrayInt *cI)
 
void finishUnserialization (const std::vector< int > &tinyInfoI, const std::vector< std::string > &tinyInfoS)
 
DataArrayDoublefromCartToCyl () const
 
DataArrayDoublefromCartToCylGiven (const DataArrayDouble *coords, const double center[3], const double vect[3]) const
 
DataArrayDoublefromCartToPolar () const
 
DataArrayDoublefromCartToSpher () const
 
DataArrayDoublefromCylToCart () const
 
DataArrayDoublefromNoInterlace () const
 
DataArrayDoublefromPolarToCart () const
 
DataArrayDoublefromSpherToCart () const
 
double getAverageValue () const
 
DataArrayDoublegetDifferentValues (double prec, int limitTupleId=-1) const
 
double getMaxValue2 (DataArrayInt *&tupleIds) const
 
void getMinMaxPerComponent (double *bounds) const
 
double getMinValue2 (DataArrayInt *&tupleIds) const
 
void getTinySerializationIntInformation (std::vector< int > &tinyInfo) const
 
void getTinySerializationStrInformation (std::vector< std::string > &tinyInfo) const
 
void getTuple (int tupleId, double *res) const
 
template<class InputIterator >
void insertAtTheEnd (InputIterator first, InputIterator last)
 
DataArrayDoubleinverse () const
 
void iota (double init=0.)
 
bool isEqual (const DataArrayDouble &other, double prec) const
 
bool isEqualIfNotWhy (const DataArrayDouble &other, double prec, std::string &reason) const
 
bool isEqualWithoutConsideringStr (const DataArrayDouble &other, double prec) const
 
bool isMonotonic (bool increasing, double eps) const
 
bool isUniform (double val, double eps) const
 
DataArrayDoubleIteratoriterator ()
 
DataArrayDoublekeepSelectedComponents (const std::vector< int > &compoIds) const
 
DataArrayDoublemagnitude () const
 
DataArrayDoublemaxPerTuple () const
 
DataArrayDoublemaxPerTupleWithCompoId (DataArrayInt *&compoIdOfMaxPerTuple) const
 
void meldWith (const DataArrayDouble *other)
 
double minimalDistanceTo (const DataArrayDouble *other, int &thisTupleId, int &otherTupleId) const
 
void multiplyEqual (const DataArrayDouble *other)
 
DataArrayDoublenegate () const
 
double norm2 () const
 
double normMax () const
 
double normMin () const
 
DataArrayDoubleperformCopyOrIncrRef (bool deepCopy) const
 
void powEqual (const DataArrayDouble *other)
 
void recenterForMaxPrecision (double eps)
 
std::string repr () const
 
void reprCppStream (const std::string &varName, std::ostream &stream) const
 
std::string reprNotTooLong () const
 
void reprNotTooLongStream (std::ostream &stream) const
 
void reprNotTooLongWithoutNameStream (std::ostream &stream) const
 
void reprQuickOverview (std::ostream &stream) const
 
void reprQuickOverviewData (std::ostream &stream, std::size_t maxNbOfByteInRepr) const
 
void reprStream (std::ostream &stream) const
 
void reprWithoutNameStream (std::ostream &stream) const
 
std::string reprZip () const
 
void reprZipStream (std::ostream &stream) const
 
void reprZipWithoutNameStream (std::ostream &stream) const
 
bool resizeForUnserialization (const std::vector< int > &tinyInfoI)
 
DataArrayDoubleselectByTupleId (const int *new2OldBg, const int *new2OldEnd) const
 
DataArrayDoubleselectByTupleId (const DataArrayInt &di) const
 
DataArrayDoubleselectByTupleIdSafe (const int *new2OldBg, const int *new2OldEnd) const
 
DataArrayDoubleselectByTupleIdSafeSlice (int bg, int end2, int step) const
 
DataArrayDoubleselectByTupleRanges (const std::vector< std::pair< int, int > > &ranges) const
 
void setSelectedComponents (const DataArrayDouble *a, const std::vector< int > &compoIds)
 
void sortPerTuple (bool asc)
 
void substractEqual (const DataArrayDouble *other)
 
DataArrayDoublesumPerTuple () const
 
MCAuto< DataArrayDoublesymmetry3DPlane (const double point[3], const double normalVector[3]) const
 
DataArrayDoubletoNoInterlace () const
 
std::vector< bool > toVectorOfBool (double eps) const
 
DataArrayDoubletrace () const
 
void updateTime () const
 
void writeOnPlace (std::size_t id, double element0, const double *others, int sizeOfOthers)
 
void writeVTK (std::ostream &ofs, int indent, const std::string &nameInFile, DataArrayByte *byteArr) const
 
- Public Member Functions inherited from MEDCoupling::DataArrayTemplate< double >
void alloc (std::size_t nbOfTuple, std::size_t nbOfCompo=1)
 
void allocIfNecessary (int nbOfTuple, int nbOfCompo)
 
double back () const
 
const double * begin () const
 
Traits< double >::ArrayType * changeNbOfComponents (int newNbOfComp, doubledftValue) const
 
void checkAllocated () const
 
void circularPermutation (int nbOfShift=1)
 
void circularPermutationPerTuple (int nbOfShift=1)
 
void deepCopyFrom (const DataArrayTemplate< double > &other)
 
void desallocate ()
 
bool empty () const
 
const double * end () const
 
std::vector< MCAuto< typename
Traits< double >::ArrayTypeCh > > 
explodeComponents () const
 
void fillWithValue (doubleval)
 
double front () const
 
const double * getConstPointer () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
double getIJ (int tupleId, int compoId) const
 
double getIJSafe (int tupleId, int compoId) const
 
double getMaxValue (int &tupleId) const
 
double getMaxValueInArray () const
 
double getMinValue (int &tupleId) const
 
double getMinValueInArray () const
 
std::size_t getNbOfElemAllocated () const
 
std::size_t getNbOfElems () const
 
int getNumberOfTuples () const
 
double * getPointer ()
 
void * getVoidStarPointer ()
 
bool isAllocated () const
 
void pack () const
 
double popBackSilent ()
 
void pushBackSilent (doubleval)
 
void pushBackValsSilent (const double *valsBg, const double *valsEnd)
 
void reAlloc (std::size_t newNbOfTuple)
 
void rearrange (int newNbOfCompo)
 
Traits< double >::ArrayType * renumber (const int *old2New) const
 
Traits< double >::ArrayType * renumberAndReduce (const int *old2New, int newNbOfTuple) const
 
void renumberInPlace (const int *old2New)
 
void renumberInPlaceR (const int *new2Old)
 
Traits< double >::ArrayType * renumberR (const int *new2Old) const
 
void reserve (std::size_t nbOfElems)
 
void reverse ()
 
void reversePerTuple ()
 
MCAuto< typename Traits
< double >::ArrayTypeCh > 
selectPartDef (const PartDefinition *pd) const
 
void setContigPartOfSelectedValues (int tupleIdStart, const DataArray *aBase, const DataArrayInt *tuplesSelec)
 
void setContigPartOfSelectedValuesSlice (int tupleIdStart, const DataArray *aBase, int bg, int end2, int step)
 
void setIJ (int tupleId, int compoId, doublenewVal)
 
void setIJSilent (int tupleId, int compoId, doublenewVal)
 
void setPartOfValues1 (const typename Traits< double >::ArrayType *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true)
 
void setPartOfValues2 (const typename Traits< double >::ArrayType *a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp, bool strictCompoCompare=true)
 
void setPartOfValues3 (const typename Traits< double >::ArrayType *a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true)
 
void setPartOfValues4 (const typename Traits< double >::ArrayType *a, int bgTuples, int endTuples, int stepTuples, const int *bgComp, const int *endComp, bool strictCompoCompare=true)
 
void setPartOfValuesAdv (const typename Traits< double >::ArrayType *a, const DataArrayInt *tuplesSelec)
 
void setPartOfValuesSimple1 (doublea, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp)
 
void setPartOfValuesSimple2 (doublea, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp)
 
void setPartOfValuesSimple3 (doublea, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp)
 
void setPartOfValuesSimple4 (doublea, int bgTuples, int endTuples, int stepTuples, const int *bgComp, const int *endComp)
 
void sort (bool asc=true)
 
Traits< double >::ArrayType * subArray (int tupleIdBg, int tupleIdEnd=-1) const
 
void transpose ()
 
void useArray (const double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo)
 
void useExternalArrayWithRWAccess (const double *array, int nbOfTuple, int nbOfCompo)
 
- Public Member Functions inherited from MEDCoupling::DataArray
bool areInfoEquals (const DataArray &other) const
 
bool areInfoEqualsIfNotWhy (const DataArray &other, std::string &reason) const
 
void checkNbOfComps (int nbOfCompo, const std::string &msg) const
 
void checkNbOfElems (std::size_t nbOfElems, const std::string &msg) const
 
void checkNbOfTuples (int nbOfTuples, const std::string &msg) const
 
void checkNbOfTuplesAndComp (const DataArray &other, const std::string &msg) const
 
void checkNbOfTuplesAndComp (int nbOfTuples, int nbOfCompo, const std::string &msg) const
 
void copyPartOfStringInfoFrom (const DataArray &other, const std::vector< int > &compoIds)
 
void copyPartOfStringInfoFrom2 (const std::vector< int > &compoIds, const DataArray &other)
 
void copyStringInfoFrom (const DataArray &other)
 
std::string cppRepr (const std::string &varName) const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
std::string getInfoOnComponent (int i) const
 
const std::vector< std::string > & getInfoOnComponents () const
 
std::vector< std::string > & getInfoOnComponents ()
 
std::string getName () const
 
std::size_t getNumberOfComponents () const
 
std::string getUnitOnComponent (int i) const
 
std::vector< std::string > getUnitsOnComponent () const
 
std::string getVarOnComponent (int i) const
 
std::vector< std::string > getVarsOnComponent () const
 
void setInfoAndChangeNbOfCompo (const std::vector< std::string > &info)
 
void setInfoOnComponent (int i, const std::string &info)
 
void setInfoOnComponents (const std::vector< std::string > &info)
 
void setName (const std::string &name)
 
void setPartOfValuesBase3 (const DataArray *aBase, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true)
 
- Public Member Functions inherited from MEDCoupling::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 

Static Public Member Functions

static DataArrayDoubleAdd (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleAggregate (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleAggregate (const std::vector< const DataArrayDouble * > &arr)
 
static DataArrayDoubleCrossProduct (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleDivide (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleDot (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
template<int SPACEDIM>
static void FindClosestTupleIdAlg (const BBTreePts< SPACEDIM, int > &myTree, double dist, const double *pos, int nbOfTuples, const double *thisPt, int thisNbOfTuples, int *res)
 
template<int SPACEDIM>
static void FindTupleIdsNearTuplesAlg (const BBTreePts< SPACEDIM, int > &myTree, const double *pos, int nbOfTuples, double eps, DataArrayInt *c, DataArrayInt *cI)
 
static void GiveBaseForPlane (const double normalVector[3], double baseOfPlane[9])
 
static DataArrayDoubleMax (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleMeld (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleMeld (const std::vector< const DataArrayDouble * > &arr)
 
static DataArrayDoubleMin (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleMultiply (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static DataArrayDoubleNew ()
 
static DataArrayDoublePow (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static void Rotate2DAlg (const double *center, double angle, int nbNodes, const double *coordsIn, double *coordsOut)
 
static void Rotate3DAlg (const double *center, const double *vect, double angle, int nbNodes, const double *coordsIn, double *coordsOut)
 
static void SetArrayIn (DataArrayDouble *newArray, DataArrayDouble *&arrayToSet)
 
static DataArrayDoubleSubstract (const DataArrayDouble *a1, const DataArrayDouble *a2)
 
static void Symmetry3DPlane (const double point[3], const double normalVector[3], int nbNodes, const double *coordsIn, double *coordsOut)
 
- Static Public Member Functions inherited from MEDCoupling::DataArrayTemplate< double >
static MCAuto< typename Traits
< double >::ArrayTypeCh > 
NewFromStdVector (const typename std::vector< double > &v)
 
- Static Public Member Functions inherited from MEDCoupling::DataArray
static DataArrayAggregate (const std::vector< const DataArray * > &arrs)
 
static std::string BuildInfoFromVarAndUnit (const std::string &var, const std::string &unit)
 
static std::string GetAxisTypeRepr (MEDCouplingAxisType at)
 
static int GetNumberOfItemGivenBES (int begin, int end, int step, const std::string &msg)
 
static int GetNumberOfItemGivenBESRelative (int begin, int end, int step, const std::string &msg)
 
static int GetPosOfItemGivenBESRelativeNoThrow (int value, int begin, int end, int step)
 
static void GetSlice (int start, int stop, int step, int sliceId, int nbOfSlices, int &startSlice, int &stopSlice)
 
static std::string GetUnitFromInfo (const std::string &info)
 
static std::string GetVarNameFromInfo (const std::string &info)
 

Additional Inherited Members

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

Member Function Documentation

DataArrayDouble * DataArrayDouble::New ( )
static

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

Referenced by accumulatePerChunck(), Add(), Aggregate(), applyFunc(), applyFuncNamedCompo(), MEDCoupling::MEDCouplingUMesh::Build1DMeshFromCoords(), MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost(), MEDCoupling::DataArrayDoubleTuple::buildDADouble(), MEDCoupling::MEDCouplingUMesh::buildDirectionVectorField(), buildEuclidianDistanceDenseMatrix(), buildEuclidianDistanceDenseMatrixWith(), buildNewEmptyInstance(), MEDCoupling::MEDCouplingStructuredMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingCurveLinearMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingUMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingUMesh::buildPartOrthogonalField(), MEDCoupling::MEDCouplingGaussLocalization::buildRefCell(), MEDCoupling::MEDCouplingUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1SGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCoupling1DGTUMesh::buildSetInstanceFromThis(), MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane(), MEDCoupling::MEDCouplingUMesh::colinearize2D(), computeAbs(), computeBBoxPerTuple(), MEDCoupling::MEDCouplingCMesh::computeCellCenterOfMass(), MEDCoupling::MEDCouplingCurveLinearMesh::computeCellCenterOfMass(), MEDCoupling::MEDCouplingIMesh::computeCellCenterOfMass(), MEDCoupling::MEDCouplingUMesh::computeCellCenterOfMass(), MEDCoupling::MEDCoupling1SGTUMesh::computeDiameterField(), MEDCoupling::MEDCouplingUMesh::computeDiameterField(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::computeInverseMatrix(), MEDCoupling::MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell(), MEDCoupling::MEDCouplingUMesh::computePlaneEquationOf3DFaces(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::computeVectorOfCoefficients(), MEDCoupling::MEDCouplingIMesh::convertToCartesian(), MEDCoupling::DataArrayInt::convertToDblArr(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::createCellFieldOnPatch(), CrossProduct(), determinant(), deviator(), MEDCoupling::MEDCouplingUMesh::distanceToPoint(), MEDCoupling::MEDCouplingUMesh::distanceToPoints(), Divide(), Dot(), doublyContractedProduct(), duplicateEachTupleNTimes(), eigenValues(), eigenVectors(), MEDCoupling::MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(), fromCartToCyl(), fromCartToCylGiven(), fromCartToPolar(), fromCartToSpher(), fromCylToCart(), fromNoInterlace(), fromPolarToCart(), fromSpherToCart(), MEDCoupling::MEDCouplingUMesh::getAspectRatioField(), MEDCoupling::MEDCoupling1SGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCoupling1DGTUMesh::getBoundingBoxForBBTree(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(), MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast(), MEDCoupling::MEDCouplingCMesh::getCoordinatesAndOwner(), MEDCoupling::MEDCouplingIMesh::getCoordinatesAndOwner(), MEDCoupling::MEDCouplingMappedExtrudedMesh::getCoordinatesAndOwner(), MEDCoupling::MEDCouplingUMesh::getEdgeRatioField(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValues(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getLocalizationOfDiscValues(), MEDCoupling::MEDCouplingCMesh::getMeasureField(), MEDCoupling::MEDCouplingIMesh::getMeasureField(), MEDCoupling::MEDCouplingMappedExtrudedMesh::getMeasureField(), MEDCoupling::MEDCouplingUMesh::getMeasureField(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getMeasureField(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getMeasureField(), MEDCoupling::MEDCouplingUMesh::getMeasureFieldOnNode(), MEDCoupling::MEDCouplingPointSet::getNodeIdsNearPoints(), MEDCoupling::MEDCouplingUMesh::getPartBarycenterAndOwner(), MEDCoupling::MEDCouplingUMesh::getPartMeasureField(), MEDCoupling::MEDCouplingUMesh::getSkewField(), MEDCoupling::MEDCouplingFieldDiscretizationP0::getValueOnMulti(), MEDCoupling::MEDCouplingFieldDiscretizationP1::getValueOnMulti(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::getValueOnMulti(), MEDCoupling::MEDCouplingUMesh::getWarpField(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshWith1DLine(), inverse(), MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell(), magnitude(), Max(), maxPerTuple(), maxPerTupleWithCompoId(), Meld(), Min(), Multiply(), negate(), MEDCoupling::MEDCouplingFieldDouble::nodeToCellDiscretization(), MEDCoupling::ParaFIELD::ParaFIELD(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::performDrift(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::PerformDriftOfVec(), MEDCoupling::MEDCouplingFieldDiscretizationKriging::PerformDriftRect(), Pow(), MEDCoupling::MEDCouplingPointSet::renumberNodesCenter(), MEDCoupling::MEDCouplingMappedExtrudedMesh::resizeForUnserialization(), MEDCoupling::MEDCouplingTimeDiscretization::resizeForUnserialization(), MEDCoupling::MEDCouplingTwoTimeSteps::resizeForUnserialization(), MEDCoupling::MEDCouplingRemapper::reverseTransfer(), MEDCoupling::MEDCouplingCurveLinearMesh::serialize(), MEDCoupling::MEDCouplingCMesh::serialize(), MEDCoupling::MEDCouplingIMesh::serialize(), MEDCoupling::MEDCouplingMappedExtrudedMesh::serialize(), MEDCoupling::MEDCoupling1SGTUMesh::serialize(), MEDCoupling::MEDCoupling1DGTUMesh::serialize(), MEDCoupling::MEDCouplingTimeDiscretization::setOrCreateUniformValueOnAllComponents(), MEDCoupling::MEDCouplingTimeDiscretization::setUniformValue(), MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell(), Substract(), sumPerTuple(), symmetry3DPlane(), MEDCoupling::MEDCouplingUMesh::tetrahedrize(), toNoInterlace(), trace(), MEDCoupling::MEDCouplingCurveLinearMesh::unserialization(), MEDCoupling::MEDCouplingCMesh::unserialization(), MEDCoupling::MEDCouplingMappedExtrudedMesh::unserialization(), MEDCoupling::MEDCoupling1SGTUMesh::unserialization(), MEDCoupling::MEDCoupling1DGTUMesh::unserialization(), and MEDCoupling::MEDCouplingAMRAttribute::writeVTHB().

double DataArrayDouble::doubleValue ( ) const

Returns the only one value in this, if and only if number of elements (nb of tuples * nb of components) is equal to 1, and that this is allocated.

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

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

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

Implements MEDCoupling::DataArray.

References New().

DataArrayDouble * DataArrayDouble::performCopyOrIncrRef ( bool  dCpy) const

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

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

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

Referenced by MEDCoupling::MEDCouplingTimeDiscretization::buildNewTimeReprFromThis(), MEDCoupling::MEDCouplingPointSet::MEDCouplingPointSet(), and MEDCoupling::MEDCouplingTwoTimeSteps::MEDCouplingTwoTimeSteps().

void DataArrayDouble::fillWithZero ( )

Assign zero to all values in this array. To know more on filling arrays see Filling DataArray with values.

Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< double >::fillWithValue().

Referenced by MEDCoupling::MEDCouplingPointSet::renumberNodesCenter().

void DataArrayDouble::iota ( double  init = 0.)

Set all values in this array so that the i-th element equals to init + i (i starts from zero). To know more on filling arrays see Filling DataArray with values.

Parameters
[in]init- value to assign to the first element of array.
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifthis is not allocated.

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

Referenced by MEDCoupling::MEDCouplingIMesh::convertToCartesian().

bool DataArrayDouble::isUniform ( double  val,
double  eps 
) const

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

Parameters
[in]val- value to check equality of array values to.
[in]eps- precision to check the equality.
Returns
bool - true if all values are in range (val - eps; val + eps), false else.
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifthis is not allocated.

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

void DataArrayDouble::checkMonotonic ( bool  increasing,
double  eps 
) const

Checks that this array is consistently increasing or decreasing in value, with at least absolute difference value of |eps| at each step. If not an exception is thrown.

Parameters
[in]increasing- if true, the array values should be increasing.
[in]eps- minimal absolute difference between the neighbor values at which the values are considered different.
Exceptions
Ifsequence of values is not strictly monotonic in agreement with increasing arg.
Ifthis->getNumberOfComponents() != 1.
Ifthis is not allocated.

References isMonotonic().

Referenced by MEDCoupling::MEDCouplingCMesh::checkConsistency().

bool DataArrayDouble::isMonotonic ( bool  increasing,
double  eps 
) const

Checks that this array is consistently increasing or decreasing in value, with at least absolute difference value of |eps| at each step.

Parameters
[in]increasing- if true, array values should be increasing.
[in]eps- minimal absolute difference between the neighbor values at which the values are considered different.
Returns
bool - true if values change in accordance with increasing arg.
Exceptions
Ifthis->getNumberOfComponents() != 1.
Ifthis is not allocated.

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

Referenced by checkMonotonic().

std::string DataArrayDouble::repr ( ) const

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

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

References reprStream().

std::string DataArrayDouble::reprZip ( ) const

References reprZipStream().

std::string DataArrayDouble::reprNotTooLong ( ) const

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

See Also
repr

References reprNotTooLongStream().

void DataArrayDouble::reprStream ( std::ostream &  stream) const
virtual
void DataArrayDouble::reprZipStream ( std::ostream &  stream) const
virtual
void DataArrayDouble::reprNotTooLongStream ( std::ostream &  stream) const
void DataArrayDouble::reprQuickOverview ( std::ostream &  stream) const
virtual
bool DataArrayDouble::isEqual ( const DataArrayDouble other,
double  prec 
) const

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

Parameters
[in]other- an instance of DataArrayDouble to compare with this one.
[in]prec- precision value to compare numeric data of the arrays.
Returns
bool - true if the two arrays are equal, false else.

References isEqualIfNotWhy().

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

bool DataArrayDouble::isEqualIfNotWhy ( const DataArrayDouble other,
double  prec,
std::string &  reason 
) const

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

Parameters
[in]otherthe instance to be compared with this
[in]precthe precision to compare numeric data of the arrays.
[out]reasonIn case of inequality returns the reason.
See Also
DataArrayDouble::isEqual

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

Referenced by MEDCoupling::MEDCouplingPointSet::areCoordsEqualIfNotWhy(), isEqual(), and MEDCoupling::MEDCouplingTwoTimeSteps::isEqualIfNotWhy().

bool DataArrayDouble::isEqualWithoutConsideringStr ( const DataArrayDouble other,
double  prec 
) const

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

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

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

Referenced by MEDCoupling::MEDCouplingPointSet::areCoordsEqualWithoutConsideringStr(), MEDCoupling::MEDCouplingTwoTimeSteps::isEqualWithoutConsideringStr(), and MEDCoupling::MEDCouplingPointSet::tryToShareSameCoords().

DataArrayDouble * DataArrayDouble::fromNoInterlace ( ) const

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

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

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

DataArrayDouble * DataArrayDouble::toNoInterlace ( ) const

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

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

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

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationKriging::performDrift().

DataArrayDouble* MEDCoupling::DataArrayDouble::selectByTupleId ( const int *  new2OldBg,
const int *  new2OldEnd 
) const
virtual
DataArrayDouble* MEDCoupling::DataArrayDouble::selectByTupleId ( const DataArrayInt di) const
DataArrayDouble* MEDCoupling::DataArrayDouble::keepSelectedComponents ( const std::vector< int > &  compoIds) const
virtual
DataArrayDouble* MEDCoupling::DataArrayDouble::selectByTupleRanges ( const std::vector< std::pair< int, int > > &  ranges) const
virtual
void DataArrayDouble::meldWith ( const DataArrayDouble other)
bool DataArrayDouble::areIncludedInMe ( const DataArrayDouble other,
double  prec,
DataArrayInt *&  tupleIds 
) const

This method checks that all tuples in other are in this. If true, the output param tupleIds contains the tuples ids of this that correspond to tupes in this. For each i in [ 0 , other->getNumberOfTuples() ) tuple #i in other is equal ( regarding input precision prec ) to tuple tupleIds[i] in this.

Parameters
[in]other- the array having the same number of components than this.
[out]tupleIds- the tuple ids containing the same number of tuples than other has.
See Also
DataArrayDouble::findCommonTuples

References Aggregate(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< double >::checkAllocated(), MEDCoupling::DataArrayTemplate< T >::checkAllocated(), MEDCoupling::DataArrayInt::ConvertIndexArrayToO2N(), findCommonTuples(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< double >::getNumberOfTuples(), and MEDCoupling::DataArrayInt::selectByTupleIdSafeSlice().

Referenced by MEDCoupling::MEDFileUMesh::linearToQuadratic(), and MEDCoupling::WriteField().

void DataArrayDouble::findCommonTuples ( double  prec,
int  limitTupleId,
DataArrayInt *&  comm,
DataArrayInt *&  commIndex 
) const

Searches for tuples coincident within prec tolerance. Each tuple is considered as coordinates of a point in getNumberOfComponents()-dimensional space. The distance separating two points is computed with the infinite norm.

Indices of coincident tuples are stored in output arrays. A pair of arrays (comm, commIndex) is called "Surjective Format 2".

This method is typically used by MEDCouplingPointSet::findCommonNodes() and MEDCouplingUMesh::mergeNodes().

Parameters
[in]prec- minimal absolute distance between two tuples (infinite norm) at which they are considered not coincident.
[in]limitTupleId- limit tuple id. If all tuples within a group of coincident tuples have id strictly lower than limitTupleId then they are not returned.
[out]comm- the array holding ids (== indices) of coincident tuples. comm->getNumberOfComponents() == 1. comm->getNumberOfTuples() == commIndex->back().
[out]commIndex- the array dividing all indices stored in comm into groups of (indices of) coincident tuples. Its every value is a tuple index where a next group of tuples begins. For example the second group of tuples in comm is described by following range of indices: [ commIndex[1], commIndex[2] ). commIndex->getNumberOfTuples()-1 gives the number of groups of coincident tuples.
Exceptions
Ifthis is not allocated.
Ifthe number of components is not in [1,2,3,4].

Here is a C++ example.

Here is a Python example.

See Also
DataArrayInt::ConvertIndexArrayToO2N(), DataArrayDouble::areIncludedInMe

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

Referenced by areIncludedInMe(), MEDCoupling::MEDCouplingPointSet::findCommonNodes(), getDifferentValues(), MEDCoupling::MEDCouplingUMesh::MergeNodesOnUMeshesSharingSameCoords(), and MEDCoupling::MEDCouplingUMesh::SimplifyPolyhedronCell().

double DataArrayDouble::minimalDistanceTo ( const DataArrayDouble other,
int &  thisTupleId,
int &  otherTupleId 
) const

This methods returns the minimal distance between the two set of points this and other. So this and other have to have the same number of components. If not an INTERP_KERNEL::Exception will be thrown. This method works only if number of components of this (equal to those of other) is in 1, 2 or 3.

Parameters
[out]thisTupleIdthe tuple id in this corresponding to the returned minimal distance
[out]otherTupleIdthe tuple id in other corresponding to the returned minimal distance
Returns
the minimal distance between the two set of points this and other.
See Also
DataArrayDouble::findClosestTupleId

References MEDCoupling::DataArrayTemplate< double >::begin(), MEDCoupling::DataArrayTemplate< T >::begin(), findClosestTupleId(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

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

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

DataArrayDouble * DataArrayDouble::getDifferentValues ( double  prec,
int  limitTupleId = -1 
) const

Returns a copy of this array by excluding coincident tuples. Each tuple is considered as coordinates of a point in getNumberOfComponents()-dimensional space. The distance between tuples is computed using norm2. If several tuples are not far each from other than prec, only one of them remains in the result array. The order of tuples in the result array is same as in this one except that coincident tuples are excluded.

Parameters
[in]prec- minimal absolute distance between two tuples at which they are considered not coincident.
[in]limitTupleId- limit tuple id. If all tuples within a group of coincident tuples have id strictly lower than limitTupleId then they are not excluded.
Returns
DataArrayDouble * - the new instance of DataArrayDouble that the caller is to delete using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifthe number of components is not in [1,2,3,4].

Here is a Python example.

References MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< double >::checkAllocated(), MEDCoupling::DataArrayInt::ConvertIndexArrayToO2N(), findCommonTuples(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArrayTemplate< double >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< double >::renumberAndReduce().

Referenced by MEDCoupling::MEDCoupling1SGTUMesh::structurizeMe().

DataArrayInt * DataArrayDouble::findClosestTupleId ( const DataArrayDouble other) const

This methods returns for each tuple in other which tuple in this is the closest. So this and other have to have the same number of components. If not an INTERP_KERNEL::Exception will be thrown. This method works only if number of components of this (equal to those of other) is in 1, 2 or 3.

Returns
a newly allocated (new object to be dealt by the caller) DataArrayInt having other->getNumberOfTuples() tuples and one components.
See Also
DataArrayDouble::minimalDistanceTo

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

Referenced by minimalDistanceTo().

DataArrayInt * DataArrayDouble::computeNbOfInteractionsWith ( const DataArrayDouble otherBBoxFrmt,
double  eps 
) const

This method expects that this and otherBBoxFrmt arrays are bounding box arrays ( as the output of MEDCouplingPointSet::getBoundingBoxForBBTree method ). This method will return a DataArrayInt array having the same number of tuples than this. This returned array tells for each cell in this how many bounding boxes in otherBBoxFrmt. So, this method expects that this and otherBBoxFrmt have the same number of components.

Parameters
[in]otherBBoxFrmt- It is an array .
[in]eps- the absolute precision of the detection. when eps < 0 the bboxes are enlarged so more interactions are detected. Inversely when > 0 the bboxes are stretched.
See Also
MEDCouplingPointSet::getBoundingBoxForBBTree
Exceptions
Ifthis and otherBBoxFrmt have not the same number of components.
Ifthis and otherBBoxFrmt number of components is not even (BBox format).

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

void DataArrayDouble::setSelectedComponents ( const DataArrayDouble a,
const std::vector< int > &  compoIds 
)

Copy all components in a specified order from another DataArrayDouble. Both numerical and textual data is copied. The number of tuples in this and the other array can be different.

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

Here is a Python example.

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

void DataArrayDouble::SetArrayIn ( DataArrayDouble newArray,
DataArrayDouble *&  arrayToSet 
)
static
DataArrayDoubleIterator * DataArrayDouble::iterator ( )
template<class InputIterator >
void MEDCoupling::DataArrayDouble::insertAtTheEnd ( InputIterator  first,
InputIterator  last 
)
void MEDCoupling::DataArrayDouble::writeOnPlace ( std::size_t  id,
double  element0,
const double *  others,
int  sizeOfOthers 
)
void DataArrayDouble::checkNoNullValues ( ) const

Checks if 0.0 value is present in this array. If it is the case, an exception is thrown.

Exceptions
Ifzero is found in this array.

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

void DataArrayDouble::getMinMaxPerComponent ( double *  bounds) const

Computes minimal and maximal value in each component. An output array is filled with 2 * this->getNumberOfComponents() values, so the caller is to allocate enough memory before calling this method.

Parameters
[out]bounds- array of size at least 2 *this->getNumberOfComponents(). It is filled as follows:
bounds[0] = min_of_component_0
bounds[1] = max_of_component_0
bounds[2] = min_of_component_1
bounds[3] = max_of_component_1
...

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

Referenced by findClosestTupleId(), MEDCoupling::MEDCouplingPointSet::getBoundingBox(), and recenterForMaxPrecision().

DataArrayDouble * DataArrayDouble::computeBBoxPerTuple ( double  epsilon = 0.0) const

This method retrieves a newly allocated DataArrayDouble instance having same number of tuples than this and twice number of components than this to store both the min and max per component of each tuples.

Parameters
[in]epsilonthe width of the bbox (identical in each direction) - 0.0 by default
Returns
a newly created DataArrayDouble instance having this->getNumberOfTuples() tuples and 2 * this->getNumberOfComponent() components
Exceptions
Ifthis is not allocated yet.

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

void DataArrayDouble::computeTupleIdsNearTuples ( const DataArrayDouble other,
double  eps,
DataArrayInt *&  c,
DataArrayInt *&  cI 
) const

For each tuples t in other, this method retrieves tuples in this that are equal to t. Two tuples are considered equal if the euclidian distance between the two tuples is lower than eps.

Parameters
[in]othera DataArrayDouble having same number of components than this.
[in]epsabsolute precision representing distance (using infinite norm) between 2 tuples behind which 2 tuples are considered equal.
[out]cwill contain the set of tuple ids in this that are equal to to the tuple ids in other contiguously. cI allows to extract information in c.
[out]cIis an indirection array that allows to extract the data contained in c.
Exceptions
Incase of:
  • this is not allocated
  • other is not allocated or null
  • this and other do not have the same number of components
  • if number of components of this is not in [1,2,3]
See Also
MEDCouplingPointSet::getNodeIdsNearPoints, DataArrayDouble::getDifferentValues

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

Referenced by MEDCoupling::MEDCouplingPointSet::getNodeIdsNearPoints().

void DataArrayDouble::recenterForMaxPrecision ( double  eps)

This method recenter tuples in this in order to be centered at the origin to benefit about the advantages of maximal precision to be around the box around origin of 'radius' 1.

Parameters
[in]epsabsolute epsilon. under that value of delta between max and min no scale is performed.

References applyLin(), MEDCoupling::DataArrayTemplate< double >::checkAllocated(), getMinMaxPerComponent(), and MEDCoupling::DataArray::getNumberOfComponents().

Referenced by MEDCoupling::MEDCouplingPointSet::recenterForMaxPrecision(), and MEDCoupling::MEDCouplingUMesh::simplifyPolyhedra().

double DataArrayDouble::getMaxValue2 ( DataArrayInt *&  tupleIds) const

Returns the maximal value and all its locations within this one-dimensional array.

Parameters
[out]tupleIds- a new instance of DataArrayInt containg indices of tuples holding the maximal value. The caller is to delete it using decrRef() as it is no more needed.
Returns
double - the maximal value among all values of this array.
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifthis->getNumberOfTuples() < 1

References findIdsInRange(), and MEDCoupling::DataArrayTemplate< double >::getMaxValue().

double DataArrayDouble::getMinValue2 ( DataArrayInt *&  tupleIds) const

Returns the minimal value and all its locations within this one-dimensional array.

Parameters
[out]tupleIds- a new instance of DataArrayInt containg indices of tuples holding the minimal value. The caller is to delete it using decrRef() as it is no more needed.
Returns
double - the minimal value among all values of this array.
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifthis->getNumberOfTuples() < 1

References findIdsInRange(), and MEDCoupling::DataArrayTemplate< double >::getMinValue().

int DataArrayDouble::count ( double  value,
double  eps 
) const

This method returns the number of values in this that are equals ( within an absolute precision of eps ) to input parameter value. This method only works for single component array.

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

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

double DataArrayDouble::getAverageValue ( ) const

Returns the average value of this one-dimensional array.

Returns
double - the average value over all values of this array.
Exceptions
Ifthis->getNumberOfComponents() != 1
Ifthis->getNumberOfTuples() < 1

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

double DataArrayDouble::norm2 ( ) const

Returns the Euclidean norm of the vector defined by this array.

Returns
double - the value of the Euclidean norm, i.e. the square root of the inner product of vector.
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< double >::checkAllocated(), MEDCoupling::DataArrayTemplate< double >::getConstPointer(), and MEDCoupling::DataArrayTemplate< double >::getNbOfElems().

double DataArrayDouble::normMax ( ) const

Returns the maximum norm of the vector defined by this array. This method works even if the number of components is diferent from one. If the number of elements in this is 0, -1. is returned.

Returns
double - the value of the maximum norm, i.e. the maximal absolute value among values of this array (whatever its number of components).
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< double >::checkAllocated(), MEDCoupling::DataArrayTemplate< double >::getConstPointer(), and MEDCoupling::DataArrayTemplate< double >::getNbOfElems().

double DataArrayDouble::normMin ( ) const

Returns the minimum norm (absolute value) of the vector defined by this array. This method works even if the number of components is diferent from one. If the number of elements in this is 0, std::numeric_limits<double>::max() is returned.

Returns
double - the value of the minimum norm, i.e. the minimal absolute value among values of this array (whatever its number of components).
Exceptions
Ifthis is not allocated.

References MEDCoupling::DataArrayTemplate< double >::checkAllocated(), MEDCoupling::DataArrayTemplate< double >::getConstPointer(), and MEDCoupling::DataArrayTemplate< double >::getNbOfElems().

void DataArrayDouble::accumulate ( double *  res) const

Accumulates values of each component of this array.

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

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

Referenced by MEDCoupling::MEDCouplingFieldDouble::getWeightedAverageValue().

double DataArrayDouble::accumulate ( int  compId) const

Accumulate values of the given component of this array.

Parameters
[in]compId- the index of the component of interest.
Returns
double - a sum value of compId-th component.
Exceptions
Ifthis is not allocated.
Ifthe condition ( 0 <= compId < this->getNumberOfComponents() ) is not respected.

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

DataArrayDouble * DataArrayDouble::accumulatePerChunck ( const int *  bgOfIndex,
const int *  endOfIndex 
) const

This method accumulate using addition tuples in this using input index array [ bgOfIndex, endOfIndex ). The returned array will have same number of components than this and number of tuples equal to std::distance(bgOfIndex,endOfIndex) minus one.

The input index array is expected to be ascendingly sorted in which the all referenced ids should be in [0, this->getNumberOfTuples). This method is quite useful for users that need to put a field on cells to field on nodes on the same mesh without a need of conservation.

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

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

Referenced by MEDCoupling::MEDCouplingFieldDouble::cellToNodeDiscretization().

double DataArrayDouble::distanceToTuple ( const double *  tupleBg,
const double *  tupleEnd,
int &  tupleId 
) const

This method returns the min distance from an external tuple defined by [ tupleBg , tupleEnd ) to this and the first tuple in this that matches the returned distance. If there is no tuples in this an exception will be thrown.

this is expected to be allocated and expected to have a number of components equal to the distance from tupleBg to tupleEnd. If not an exception will be thrown.

Parameters
[in]tupleBgstart pointer (included) of input external tuple
[in]tupleEndend pointer (not included) of input external tuple
[out]tupleIdthe tuple id in this that matches the min of distance between this and input external tuple
Returns
the min distance.
See Also
MEDCouplingUMesh::distanceToPoint

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

DataArrayDouble * DataArrayDouble::fromPolarToCart ( ) const

Converts each 2D point defined by the tuple of this array from the Polar to the Cartesian coordinate system. The two components of the tuple of this array are considered to contain (1) radius and (2) angle of the point in the Polar CS.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple contains X and Y coordinates of the point in the Cartesian CS. The caller is to delete this array using decrRef() as it is no more needed. The array does not contain any textual info on components.
Exceptions
Ifthis->getNumberOfComponents() != 2.
See Also
fromCartToPolar

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

Referenced by cartesianize().

DataArrayDouble * DataArrayDouble::fromCylToCart ( ) const

Converts each 3D point defined by the tuple of this array from the Cylindrical to the Cartesian coordinate system. The three components of the tuple of this array are considered to contain (1) radius, (2) azimuth and (3) altitude of the point in the Cylindrical CS.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple contains X, Y and Z coordinates of the point in the Cartesian CS. The info on the third component is copied from this array. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 3.
See Also
fromCartToCyl

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

Referenced by cartesianize().

DataArrayDouble * DataArrayDouble::fromSpherToCart ( ) const

Converts each 3D point defined by the tuple of this array from the Spherical to the Cartesian coordinate system. The three components of the tuple of this array are considered to contain (1) radius, (2) polar angle and (3) azimuthal angle of the point in the Cylindrical CS.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple contains X, Y and Z coordinates of the point in the Cartesian CS. The info on the third component is copied from this array. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 3.
See Also
fromCartToSpher

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

Referenced by cartesianize().

DataArrayDouble * DataArrayDouble::cartesianize ( MEDCouplingAxisType  atOfThis) const

This method returns a new array containing the same number of tuples than this. To do this, this method needs at parameter to specify the convention of this. All the tuples of the returned array will be in cartesian sense. So if at equals to AX_CART the returned array is basically a deep copy of this. If at equals to AX_CYL the returned array will be the result of operation cylindric to cartesian of this...

Parameters
[in]atOfThis- The axis type of this.
Returns
DataArrayDouble * - the new instance of DataArrayDouble (that must be dealed by caller) containing the result of the cartesianizification of this.

References MEDCoupling::AX_CART, MEDCoupling::AX_CYL, MEDCoupling::AX_SPHER, MEDCoupling::DataArrayTemplate< double >::checkAllocated(), MEDCoupling::DataArray::copyStringInfoFrom(), deepCopy(), fromCylToCart(), fromPolarToCart(), fromSpherToCart(), MEDCoupling::DataArray::getNumberOfComponents(), and MEDCoupling::MCAuto< T >::retn().

DataArrayDouble * DataArrayDouble::fromCartToPolar ( ) const
DataArrayDouble * DataArrayDouble::fromCartToCyl ( ) const
DataArrayDouble * DataArrayDouble::doublyContractedProduct ( ) const

Computes the doubly contracted product of every tensor defined by the tuple of this array contating 6 components.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple is calculated from the tuple (t) of this array as follows: $ t[0]^2+t[1]^2+t[2]^2+2*t[3]^2+2*t[4]^2+2*t[5]^2$. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 6.

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

DataArrayDouble * DataArrayDouble::determinant ( ) const

Computes the determinant of every square matrix defined by the tuple of this array, which contains either 4, 6 or 9 components. The case of 6 components corresponds to that of the upper triangular matrix.

Returns
DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple is the determinant of matrix of the corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() is not in [4,6,9].

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

DataArrayDouble * DataArrayDouble::eigenValues ( ) const

Computes 3 eigenvalues of every upper triangular matrix defined by the tuple of this array, which contains 6 components.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing 3 components, whose each tuple contains the eigenvalues of the matrix of corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 6.

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

DataArrayDouble * DataArrayDouble::eigenVectors ( ) const

Computes 3 eigenvectors of every upper triangular matrix defined by the tuple of this array, which contains 6 components.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing 9 components, whose each tuple contains 3 eigenvectors of the matrix of corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 6.

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

DataArrayDouble * DataArrayDouble::inverse ( ) const

Computes the inverse matrix of every matrix defined by the tuple of this array, which contains either 4, 6 or 9 components. The case of 6 components corresponds to that of the upper triangular matrix.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of components as this one, whose each tuple is the inverse matrix of the matrix of corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() is not in [4,6,9].

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

DataArrayDouble * DataArrayDouble::trace ( ) const

Computes the trace of every matrix defined by the tuple of this array, which contains either 4, 6 or 9 components. The case of 6 components corresponds to that of the upper triangular matrix.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing 1 component, whose each tuple is the trace of the matrix of corresponding tuple of this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() is not in [4,6,9].

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

DataArrayDouble * DataArrayDouble::deviator ( ) const

Computes the stress deviator tensor of every stress tensor defined by the tuple of this array, which contains 6 components.

Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of components and tuples as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 6.

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

DataArrayDouble * DataArrayDouble::magnitude ( ) const

Computes the magnitude of every vector defined by the tuple of this array.

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

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

DataArrayDouble * DataArrayDouble::sumPerTuple ( ) const

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

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

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

DataArrayDouble * DataArrayDouble::maxPerTuple ( ) const

Computes the maximal value within every tuple of this array.

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

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

DataArrayDouble * DataArrayDouble::maxPerTupleWithCompoId ( DataArrayInt *&  compoIdOfMaxPerTuple) const

Computes the maximal value within every tuple of this array and it returns the first component id for each tuple that corresponds to the maximal value within the tuple.

Parameters
[out]compoIdOfMaxPerTuple- the new new instance of DataArrayInt containing the same number of tuples and only one component.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array and one component. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
See Also
DataArrayDouble::maxPerTuple

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

DataArrayDouble * DataArrayDouble::buildEuclidianDistanceDenseMatrix ( ) const

This method returns a newly allocated DataArrayDouble instance having one component and this->getNumberOfTuples() * this->getNumberOfTuples() tuples.
This returned array contains the euclidian distance for each tuple in this.
So the returned array can be seen as a dense symmetrical matrix whose diagonal elements are equal to 0.
The returned array has only one component (and not this->getNumberOfTuples() components to avoid the useless memory consumption due to components info in returned DataArrayDouble)

Warning
use this method with care because it can leads to big amount of consumed memory !
Returns
A newly allocated (huge) MEDCoupling::DataArrayDouble instance that the caller should deal with.
Exceptions
Ifthis is not allocated.
See Also
DataArrayDouble::buildEuclidianDistanceDenseMatrixWith

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

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationKriging::computeMatrix().

DataArrayDouble * DataArrayDouble::buildEuclidianDistanceDenseMatrixWith ( const DataArrayDouble other) const

This method returns a newly allocated DataArrayDouble instance having one component and this->getNumberOfTuples() * other->getNumberOfTuples() tuples.
This returned array contains the euclidian distance for each tuple in other with each tuple in this.
So the returned array can be seen as a dense rectangular matrix with other->getNumberOfTuples() rows and this->getNumberOfTuples() columns.
Output rectangular matrix is sorted along rows.
The returned array has only one component (and not this->getNumberOfTuples() components to avoid the useless memory consumption due to components info in returned DataArrayDouble)

Warning
use this method with care because it can leads to big amount of consumed memory !
Parameters
[in]otherDataArrayDouble instance having same number of components than this.
Returns
A newly allocated (huge) MEDCoupling::DataArrayDouble instance that the caller should deal with.
Exceptions
Ifthis is not allocated, or if other is null or if other is not allocated, or if number of components of other and this differs.
See Also
DataArrayDouble::buildEuclidianDistanceDenseMatrix

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

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts().

void DataArrayDouble::sortPerTuple ( bool  asc)

Sorts value within every tuple of this array.

Parameters
[in]asc- if true, the values are sorted in ascending order, else, in descending order.
Exceptions
Ifthis is not allocated.

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

void DataArrayDouble::abs ( )

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

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

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

DataArrayDouble * DataArrayDouble::computeAbs ( ) const

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

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

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

void DataArrayDouble::applyLin ( double  a,
double  b,
int  compoId 
)

Apply a linear function to a given component of this array, so that an array element (x) becomes $ a * x + b $.

Parameters
[in]a- the first coefficient of the function.
[in]b- the second coefficient of the function.
[in]compoId- the index of component to modify.
Exceptions
Ifthis is not allocated, or compoId is not in [0,this->getNumberOfComponents() ).

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

Referenced by MEDCoupling::MEDCouplingIMesh::convertToCartesian(), and recenterForMaxPrecision().

void DataArrayDouble::applyLin ( double  a,
double  b 
)

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

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

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

void DataArrayDouble::applyInv ( double  numerator)

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

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

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

void DataArrayDouble::applyPow ( double  val)

Modify all elements of this array, so that an element x becomes val ^ x . Contrary to DataArrayInt::applyPow all values in this have to be >= 0 if val is not integer.

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

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

void DataArrayDouble::applyRPow ( double  val)

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

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

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

DataArrayDouble * DataArrayDouble::negate ( ) const

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

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

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

DataArrayDouble * DataArrayDouble::applyFunc ( int  nbOfComp,
FunctionToEvaluate  func 
) const

Returns a new DataArrayDouble created from this one by applying FunctionToEvaluate to every tuple of this array. Textual data is not copied. For more info see Application of a function on DataArrayDouble instances.

Parameters
[in]nbOfComp- number of components in the result array.
[in]func- the FunctionToEvaluate declared as bool (*func)(const double *pos, double *res), where pos points to the first component of a tuple of this array and res points to the first component of a tuple of the result array. Note that length (number of components) of pos can differ from that of res.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Iffunc returns false.

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

Referenced by MEDCoupling::MEDCouplingTimeDiscretization::fillFromAnalytic().

DataArrayDouble * DataArrayDouble::applyFunc ( int  nbOfComp,
const std::string &  func,
bool  isSafe = true 
) const

Returns a new DataArrayDouble created from this one by applying a function to every tuple of this array. Textual data is not copied. For more info see applyFunc method with only two parameters.

Parameters
[in]nbOfComp- number of components in the result array.
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array and nbOfComp components. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Ifcomputing func fails.

References applyFuncNamedCompo().

DataArrayDouble * DataArrayDouble::applyFunc ( const std::string &  func,
bool  isSafe = true 
) const

Returns a new DataArrayDouble created from this one by applying a function to every tuple of this array. Textual data is not copied. This method works by tuples (whatever its size). If this is a one component array, call applyFuncOnThis instead that performs the same work faster.

For more info see applyFunc method with only one parameter.

Parameters
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples and components as this array. The caller is to delete this result array using decrRef() as it is no more needed.
See Also
applyFuncOnThis
Exceptions
Ifthis is not allocated.
Ifcomputing func fails.

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

void DataArrayDouble::applyFuncOnThis ( const std::string &  func,
bool  isSafe = true 
)

This method is a non const method that modify the array in this. This method only works on one component array. It means that function func must contain at most one variable. This method is a specialization of applyFunc method with one parameter on one component array.

Parameters
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
See Also
applyFunc

References MEDCoupling::DataArrayTemplate< double >::begin(), MEDCoupling::DataArrayTemplate< double >::checkAllocated(), MEDCoupling::DataArrayTemplate< double >::fillWithValue(), MEDCoupling::DataArray::getInfoOnComponents(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< double >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< double >::getPointer(), MEDCoupling::DataArrayTemplate< double >::rearrange(), and MEDCoupling::DataArray::setInfoOnComponents().

DataArrayDouble * DataArrayDouble::applyFuncCompo ( int  nbOfComp,
const std::string &  func,
bool  isSafe = true 
) const

Returns a new DataArrayDouble created from this one by applying a function to every tuple of this array. Textual data is not copied. For more info see applyFuncCompo method.

Parameters
[in]nbOfComp- number of components in the result array.
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Iffunc contains vars that are not in this->getInfoOnComponent().
Ifcomputing func fails.

References applyFuncNamedCompo(), and MEDCoupling::DataArray::getVarsOnComponent().

Referenced by MEDCoupling::MEDCouplingTimeDiscretization::fillFromAnalyticCompo().

DataArrayDouble * DataArrayDouble::applyFuncNamedCompo ( int  nbOfComp,
const std::vector< std::string > &  varsOrder,
const std::string &  func,
bool  isSafe = true 
) const

Returns a new DataArrayDouble created from this one by applying a function to every tuple of this array. Textual data is not copied. For more info see applyFuncNamedCompo method.

Parameters
[in]nbOfComp- number of components in the result array.
[in]varsOrder- sequence of vars defining their order.
[in]func- the expression defining how to transform a tuple of this array. Supported expressions are described here.
[in]isSafe- By default true. If true invalid operation (division by 0. acos of value > 1. ...) leads to a throw of an exception. If false the computation is carried on without any notification. When false the evaluation is a little faster.
Returns
DataArrayDouble * - the new instance of DataArrayDouble containing the same number of tuples as this array. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis is not allocated.
Iffunc contains vars not in varsOrder.
Ifcomputing func fails.

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

Referenced by applyFunc(), applyFuncCompo(), and MEDCoupling::MEDCouplingTimeDiscretization::fillFromAnalyticNamedCompo().

MCAuto< DataArrayDouble > DataArrayDouble::symmetry3DPlane ( const double  point[3],
const double  normalVector[3] 
) const
DataArrayInt * DataArrayDouble::findIdsInRange ( double  vmin,
double  vmax 
) const

Returns a new DataArrayInt contating indices of tuples of this one-dimensional array whose values are within a given range. Textual data is not copied.

Parameters
[in]vmin- a lowest acceptable value (included).
[in]vmax- a greatest acceptable value (included).
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 1.
See Also
DataArrayDouble::findIdsNotInRange

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

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

Referenced by MEDCoupling::MEDCouplingUMesh::conformize3D(), getMaxValue2(), and getMinValue2().

DataArrayInt * DataArrayDouble::findIdsNotInRange ( double  vmin,
double  vmax 
) const

Returns a new DataArrayInt contating indices of tuples of this one-dimensional array whose values are not within a given range. Textual data is not copied.

Parameters
[in]vmin- a lowest not acceptable value (excluded).
[in]vmax- a greatest not acceptable value (excluded).
Returns
DataArrayInt * - the new instance of DataArrayInt. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifthis->getNumberOfComponents() != 1.
See Also
DataArrayDouble::findIdsInRange

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

DataArrayDouble * DataArrayDouble::Aggregate ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble by concatenating two given arrays, so that (1) the number of tuples in the result array is a sum of the number of tuples of given arrays and (2) the number of component in the result array is same as that of each of given arrays. Info on components is copied from the first of the given arrays. Number of components in the given arrays must be the same.

Parameters
[in]a1- an array to include in the result array.
[in]a2- another array to include in the result array.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifboth a1 and a2 are NULL.
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents().

Referenced by MEDCoupling::DataArray::Aggregate(), MEDCoupling::MEDCouplingNoTimeLabel::aggregate(), MEDCoupling::MEDCouplingWithTimeStep::aggregate(), MEDCoupling::MEDFileUMesh::Aggregate(), MEDCoupling::MEDCouplingConstOnTimeInterval::aggregate(), MEDCoupling::MEDCouplingLinearTime::aggregate(), areIncludedInMe(), MEDCoupling::MEDCouplingUMesh::colinearize2D(), MEDCoupling::MEDCouplingPointSet::duplicateNodesInCoords(), MEDCoupling::MEDCouplingUMesh::Intersect2DMeshes(), MEDCoupling::MEDCouplingPointSet::MergeNodesArray(), MEDCoupling::MEDCouplingUMesh::PutUMeshesOnSameAggregatedCoords(), and MEDCoupling::MEDCouplingUMesh::tetrahedrize().

DataArrayDouble * DataArrayDouble::Aggregate ( const std::vector< const DataArrayDouble * > &  arr)
static

Returns a new DataArrayDouble by concatenating all given arrays, so that (1) the number of tuples in the result array is a sum of the number of tuples of given arrays and (2) the number of component in the result array is same as that of each of given arrays. Info on components is copied from the first of the given arrays. Number of components in the given arrays must be the same. If the number of non null of elements in arr is equal to one the returned object is a copy of it not the object itself.

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

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

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

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

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

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::meld(), MEDCoupling::MEDCouplingWithTimeStep::meld(), MEDCoupling::MEDCouplingConstOnTimeInterval::meld(), and MEDCoupling::MEDCouplingLinearTime::meld().

DataArrayDouble * DataArrayDouble::Meld ( const std::vector< const DataArrayDouble * > &  arr)
static

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

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

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

DataArrayDouble * DataArrayDouble::Dot ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble containing a dot product of two given arrays, so that the i-th tuple of the result array is a sum of products of j-th components of i-th tuples of given arrays ( $ a_i = \sum_{j=1}^n a1_j * a2_j $). Info on components and name is copied from the first of the given arrays. Number of tuples and components in the given arrays must be the same.

Parameters
[in]a1- a given array.
[in]a2- another given array.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifany given array is not allocated.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents()

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

Referenced by MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane(), MEDCoupling::MEDCouplingNoTimeLabel::dot(), MEDCoupling::MEDCouplingWithTimeStep::dot(), MEDCoupling::MEDCouplingConstOnTimeInterval::dot(), and MEDCoupling::MEDCouplingLinearTime::dot().

DataArrayDouble * DataArrayDouble::CrossProduct ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble containing a cross product of two given arrays, so that the i-th tuple of the result array contains 3 components of a vector which is a cross product of two vectors defined by the i-th tuples of given arrays. Info on components is copied from the first of the given arrays. Number of tuples in the given arrays must be the same. Number of components in the given arrays must be 3.

Parameters
[in]a1- a given array.
[in]a2- another given array.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != 3
Ifa2->getNumberOfComponents() != 3

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

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::crossProduct(), MEDCoupling::MEDCouplingWithTimeStep::crossProduct(), MEDCoupling::MEDCouplingConstOnTimeInterval::crossProduct(), and MEDCoupling::MEDCouplingLinearTime::crossProduct().

DataArrayDouble * DataArrayDouble::Max ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble containing maximal values of two given arrays. Info on components is copied from the first of the given arrays. Number of tuples and components in the given arrays must be the same.

Parameters
[in]a1- an array to compare values with another one.
[in]a2- another array to compare values with the first one.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents()

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

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::max(), MEDCoupling::MEDCouplingWithTimeStep::max(), MEDCoupling::MEDCouplingConstOnTimeInterval::max(), and MEDCoupling::MEDCouplingLinearTime::max().

DataArrayDouble * DataArrayDouble::Min ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

Returns a new DataArrayDouble containing minimal values of two given arrays. Info on components is copied from the first of the given arrays. Number of tuples and components in the given arrays must be the same.

Parameters
[in]a1- an array to compare values with another one.
[in]a2- another array to compare values with the first one.
Returns
DataArrayDouble * - the new instance of DataArrayDouble. The caller is to delete this result array using decrRef() as it is no more needed.
Exceptions
Ifeither a1 or a2 is NULL.
Ifa1->getNumberOfTuples() != a2->getNumberOfTuples()
Ifa1->getNumberOfComponents() != a2->getNumberOfComponents()

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

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::min(), MEDCoupling::MEDCouplingWithTimeStep::min(), MEDCoupling::MEDCouplingConstOnTimeInterval::min(), and MEDCoupling::MEDCouplingLinearTime::min().

DataArrayDouble * DataArrayDouble::Add ( const DataArrayDouble a1,
const DataArrayDouble a2 
)
static

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

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

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

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

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

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::add(), MEDCoupling::MEDCouplingWithTimeStep::add(), MEDCoupling::MEDCouplingConstOnTimeInterval::add(), and MEDCoupling::MEDCouplingLinearTime::add().

void DataArrayDouble::addEqual ( const DataArrayDouble other)

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

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

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

Referenced by MEDCoupling::MEDCouplingLinearTime::addEqual().

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

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

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

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

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

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

Referenced by MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane(), MEDCoupling::MEDCouplingNoTimeLabel::substract(), MEDCoupling::MEDCouplingWithTimeStep::substract(), MEDCoupling::MEDCouplingConstOnTimeInterval::substract(), and MEDCoupling::MEDCouplingLinearTime::substract().

void DataArrayDouble::substractEqual ( const DataArrayDouble other)

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

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

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

Referenced by MEDCoupling::MEDCouplingLinearTime::substractEqual().

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

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

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

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

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

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

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::multiply(), MEDCoupling::MEDCouplingWithTimeStep::multiply(), MEDCoupling::MEDCouplingConstOnTimeInterval::multiply(), and MEDCoupling::MEDCouplingLinearTime::multiply().

void DataArrayDouble::multiplyEqual ( const DataArrayDouble other)

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

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

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

Referenced by MEDCoupling::MEDCouplingFieldDouble::getWeightedAverageValue(), and MEDCoupling::MEDCouplingLinearTime::multiplyEqual().

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

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

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

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

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

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

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::divide(), MEDCoupling::MEDCouplingWithTimeStep::divide(), MEDCoupling::MEDCouplingConstOnTimeInterval::divide(), and MEDCoupling::MEDCouplingLinearTime::divide().

void DataArrayDouble::divideEqual ( const DataArrayDouble other)

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

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

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

Referenced by MEDCoupling::MEDCouplingFieldDouble::cellToNodeDiscretization(), and MEDCoupling::MEDCouplingLinearTime::divideEqual().

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

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

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

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

Referenced by MEDCoupling::MEDCouplingNoTimeLabel::pow(), MEDCoupling::MEDCouplingWithTimeStep::pow(), MEDCoupling::MEDCouplingConstOnTimeInterval::pow(), and MEDCoupling::MEDCouplingLinearTime::pow().

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

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

Implements MEDCoupling::TimeLabel.

MemArray<double>& MEDCoupling::DataArrayDouble::accessToMemArray ( )
const MemArray<double>& MEDCoupling::DataArrayDouble::accessToMemArray ( ) const
std::vector< bool > DataArrayDouble::toVectorOfBool ( double  eps) const

This method is NOT wrapped into python because it can be useful only for performance reasons in C++ context. All values in this must be 0. or 1. within eps error. 0 means false, 1 means true. If an another value than 0 or 1 appear (within eps precision) an INTERP_KERNEL::Exception will be thrown.

Exceptions
ifthis is not allocated.
ifthis has not exactly one component.

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

Referenced by MEDCoupling::MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion().

void DataArrayDouble::Rotate2DAlg ( const double *  center,
double  angle,
int  nbNodes,
const double *  coordsIn,
double *  coordsOut 
)
static

Low static method that operates 3D rotation of nbNodes 3D nodes whose coordinates are arranged in coords around the center point center and with angle angle.

Referenced by MEDCoupling::MEDCouplingCurveLinearMesh::rotate(), and MEDCoupling::MEDCouplingPointSet::rotate2D().

void DataArrayDouble::Rotate3DAlg ( const double *  center,
const double *  vect,
double  angle,
int  nbNodes,
const double *  coordsIn,
double *  coordsOut 
)
static

Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in coordsIn around an axe ( center, vect) and with angle angle.

Referenced by MEDCoupling::MEDCouplingUMesh::getCellIdsCrossingPlane(), MEDCoupling::MEDCouplingCurveLinearMesh::rotate(), and MEDCoupling::MEDCouplingPointSet::rotate3D().

void DataArrayDouble::Symmetry3DPlane ( const double  point[3],
const double  normalVector[3],
int  nbNodes,
const double *  coordsIn,
double *  coordsOut 
)
static

Referenced by symmetry3DPlane().

void DataArrayDouble::GiveBaseForPlane ( const double  normalVector[3],
double  baseOfPlane[9] 
)
static
void DataArrayDouble::getTinySerializationIntInformation ( std::vector< int > &  tinyInfo) const
void DataArrayDouble::getTinySerializationStrInformation ( std::vector< std::string > &  tinyInfo) const
bool DataArrayDouble::resizeForUnserialization ( const std::vector< int > &  tinyInfoI)
void DataArrayDouble::finishUnserialization ( const std::vector< int > &  tinyInfoI,
const std::vector< std::string > &  tinyInfoS 
)
template<int SPACEDIM>
void DataArrayDouble::findCommonTuplesAlg ( const double *  bbox,
int  nbNodes,
int  limitNodeId,
double  prec,
DataArrayInt c,
DataArrayInt cI 
) const
template<int SPACEDIM>
static void MEDCoupling::DataArrayDouble::FindClosestTupleIdAlg ( const BBTreePts< SPACEDIM, int > &  myTree,
double  dist,
const double *  pos,
int  nbOfTuples,
const double *  thisPt,
int  thisNbOfTuples,
int *  res 
)
static
template<int SPACEDIM>
static void MEDCoupling::DataArrayDouble::FindTupleIdsNearTuplesAlg ( const BBTreePts< SPACEDIM, int > &  myTree,
const double *  pos,
int  nbOfTuples,
double  eps,
DataArrayInt c,
DataArrayInt cI 
)
static
template<int SPACEDIM>
void MEDCoupling::DataArrayDouble::FindTupleIdsNearTuplesAlg ( const BBTreePts< SPACEDIM, int > &  myTree,
const double *  pos,
int  nbOfTuples,
double  eps,
DataArrayInt c,
DataArrayInt cI 
)
template<int SPACEDIM>
void MEDCoupling::DataArrayDouble::FindClosestTupleIdAlg ( const BBTreePts< SPACEDIM, int > &  myTree,
double  dist,
const double *  pos,
int  nbOfTuples,
const double *  thisPt,
int  thisNbOfTuples,
int *  res 
)