return sz1+sz2+sz3;
}
-//================================================================================
/*!
* Sets the attribute \a _name of \a this array.
* See \ref MEDCouplingArrayBasicsName "DataArrays infos" for more information.
* \param [in] name - new array name
*/
-//================================================================================
-
void DataArray::setName(const char *name)
{
_name=name;
}
-//================================================================================
/*!
* Copies textual data from an \a other DataArray. The copied data are
* - the name attribute,
* \param [in] other - another instance of DataArray to copy the textual data from.
* \throw If number of components of \a this array differs from that of the \a other.
*/
-//================================================================================
-
void DataArray::copyStringInfoFrom(const DataArray& other) throw(INTERP_KERNEL::Exception)
{
if(_info_on_compo.size()!=other._info_on_compo.size())
return true;
}
-//================================================================================
/*!
* Compares textual information of \a this DataArray with that of an \a other one.
* The compared data are
* \param [in] other - another instance of DataArray to compare the textual data of.
* \return bool - \a true if the textual information is same, \a false else.
*/
-//================================================================================
-
bool DataArray::areInfoEquals(const DataArray& other) const
{
std::string tmp;
return ret.str();
}
-//================================================================================
/*!
* Sets information on all components. To know more on format of this information
* see \ref MEDCouplingArrayBasicsCompoName "DataArrays infos".
* \param [in] info - a vector of strings.
* \throw If size of \a info differs from the number of components of \a this.
*/
-//================================================================================
-
void DataArray::setInfoOnComponents(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception)
{
if(getNumberOfComponents()!=(int)info.size())
return ret;
}
-//================================================================================
/*!
* Returns information on a component specified by an index.
* To know more on format of this information
* \return std::string - a string containing the information on \a i-th component.
* \throw If \a i is not a valid component index.
*/
-//================================================================================
-
std::string DataArray::getInfoOnComponent(int i) const throw(INTERP_KERNEL::Exception)
{
if(i<(int)_info_on_compo.size() && i>=0)
}
}
-//================================================================================
/*!
* Returns the var part of the full information of the \a i-th component.
* For example, if \c getInfoOnComponent(0) returns "SIGXY [N/m^2]", then
* \return std::string - a string containing the var information, or the full info.
* \throw If \a i is not a valid component index.
*/
-//================================================================================
-
std::string DataArray::getVarOnComponent(int i) const throw(INTERP_KERNEL::Exception)
{
if(i<(int)_info_on_compo.size() && i>=0)
}
}
-//================================================================================
/*!
* Returns the unit part of the full information of the \a i-th component.
* For example, if \c getInfoOnComponent(0) returns "SIGXY [ N/m^2]", then
* \return std::string - a string containing the unit information, if any, or "".
* \throw If \a i is not a valid component index.
*/
-//================================================================================
-
std::string DataArray::getUnitOnComponent(int i) const throw(INTERP_KERNEL::Exception)
{
if(i<(int)_info_on_compo.size() && i>=0)
}
}
-//================================================================================
/*!
* Returns the var part of the full component information.
* For example, if \a info == "SIGXY [N/m^2]", then this method returns "SIGXY".
* \param [in] info - the full component information.
* \return std::string - a string containing only var information, or the \a info.
*/
-//================================================================================
-
std::string DataArray::GetVarNameFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception)
{
std::size_t p1=info.find_last_of('[');
return info.substr(0,p3+1);
}
-//================================================================================
/*!
* Returns the unit part of the full component information.
* For example, if \a info == "SIGXY [ N/m^2]", then this method returns " N/m^2".
* \param [in] info - the full component information.
* \return std::string - a string containing only unit information, if any, or "".
*/
-//================================================================================
-
std::string DataArray::GetUnitFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception)
{
std::size_t p1=info.find_last_of('[');
return info.substr(p1+1,p2-p1-1);
}
-//================================================================================
/*!
* Sets information on a component specified by an index.
* To know more on format of this information
* \throw If \a i is not a valid component index.
* \warning Don't pass NULL as \a info!
*/
-//================================================================================
-
void DataArray::setInfoOnComponent(int i, const char *info) throw(INTERP_KERNEL::Exception)
{
if(i<(int)_info_on_compo.size() && i>=0)
return -1;
}
-//================================================================================
/*!
* Returns a new instance of DataArrayDouble. The caller is to delete this array
* using decrRef() as it is no more needed.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::New()
{
return new DataArrayDouble;
}
-//================================================================================
/*!
* Checks if raw data is allocated. Read more on the raw data
* in \ref MEDCouplingArrayBasicsTuplesAndCompo "DataArrays infos" for more information.
* \return bool - \a true if the raw data is allocated, \a false else.
*/
-//================================================================================
-
bool DataArrayDouble::isAllocated() const
{
return getConstPointer()!=0;
}
-//================================================================================
/*!
* Checks if raw data is allocated and throws an exception if it is not the case.
* \throw If the raw data is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::checkAllocated() const throw(INTERP_KERNEL::Exception)
{
if(!isAllocated())
return DataArray::getHeapMemorySize()+sz;
}
-//================================================================================
/*!
* Sets information on all components. This method can change number of components
* at certain conditions; if the conditions are not respected, an exception is thrown.
* \param [in] info - a vector of component infos.
* \throw If \a this->getNumberOfComponents() != \a info.size() && \a this->isAllocated()
*/
-//================================================================================
-
void DataArrayDouble::setInfoAndChangeNbOfCompo(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception)
{
if(getNumberOfComponents()!=(int)info.size())
_info_on_compo=info;
}
-//================================================================================
/*!
* Returns the only one value in \a this, if and only if number of elements
* (nb of tuples * nb of components) is equal to 1, and that \a this is allocated.
* \return double - the sole value stored in \a this array.
* \throw If at least one of conditions stated above is not fulfilled.
*/
-//================================================================================
-
double DataArrayDouble::doubleValue() const throw(INTERP_KERNEL::Exception)
{
if(isAllocated())
throw INTERP_KERNEL::Exception("DataArrayDouble::doubleValue : DataArrayDouble instance is not allocated !");
}
-//================================================================================
/*!
* Checks the number of tuples.
* \return bool - \a true if getNumberOfTuples() == 0, \a false else.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
bool DataArrayDouble::empty() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return getNumberOfTuples()==0;
}
-//================================================================================
/*!
* Returns a full copy of \a this. For more info on copying data arrays see
* \ref MEDCouplingArrayBasicsCopyDeep.
* \return DataArrayDouble * - a new instance of DataArrayDouble.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::deepCpy() const
{
return new DataArrayDouble(*this);
}
-//================================================================================
/*!
* Returns either a \a deep or \a shallow copy of this array. For more info see
* \ref MEDCouplingArrayBasicsCopyDeep and \ref MEDCouplingArrayBasicsCopyShallow.
* \return DataArrayDouble * - either a new instance of DataArrayDouble (if \a dCpy
* == \a true) or \a this instance (if \a dCpy == \a false).
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::performCpy(bool dCpy) const
{
if(dCpy)
}
}
-//================================================================================
/*!
* Copies all the data from another DataArrayDouble. For more info see
* \ref MEDCouplingArrayBasicsCopyDeepAssign.
* \param [in] other - another instance of DataArrayDouble to copy data from.
* \throw If the \a other is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::cpyFrom(const DataArrayDouble& other) throw(INTERP_KERNEL::Exception)
{
other.checkAllocated();
_mem.pack();
}
-//================================================================================
/*!
* Allocates the raw data in memory. If exactly same memory as needed already
* allocated, it is not re-allocated.
* \param [in] nbOfCompo - number of components of data to allocate.
* \throw If \a nbOfTuple < 0 or \a nbOfCompo < 0.
*/
-//================================================================================
-
void DataArrayDouble::allocIfNecessary(int nbOfTuple, int nbOfCompo)
{
if(isAllocated())
alloc(nbOfTuple,nbOfCompo);
}
-//================================================================================
/*!
* Allocates the raw data in memory. If the memory was already allocated, then it is
* freed and re-allocated. See an example of this method use
* \param [in] nbOfCompo - number of components of data to allocate.
* \throw If \a nbOfTuple < 0 or \a nbOfCompo < 0.
*/
-//================================================================================
-
void DataArrayDouble::alloc(int nbOfTuple, int nbOfCompo) throw(INTERP_KERNEL::Exception)
{
if(nbOfTuple<0 || nbOfCompo<0)
declareAsNew();
}
-//================================================================================
/*!
* Assign zero to all values in \a this array. To know more on filling arrays see
* \ref MEDCouplingArrayFill.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::fillWithZero() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Assign \a val to all values in \a this array. To know more on filling arrays see
* \ref MEDCouplingArrayFill.
* \param [in] val - the value to fill with.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::fillWithValue(double val) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Set all values in \a this array so that the i-th element equals to \a init + i
* (i starts from zero). To know more on filling arrays see \ref MEDCouplingArrayFill.
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::iota(double init) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Checks if all values in \a this array are equal to \a val at precision \a eps.
* \param [in] val - value to check equality of array values to.
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this is not allocated.
*/
-//================================================================================
-
bool DataArrayDouble::isUniform(double val, double eps) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return true;
}
-//================================================================================
/*!
* Sorts values of the array.
* \param [in] asc - \a true means ascending order, \a false, descending.
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
void DataArrayDouble::sort(bool asc) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
_mem.sort(asc);
}
-//================================================================================
/*!
* Reverse the array values.
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::reverse() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
_mem.reverse();
}
-//================================================================================
/*!
* Checks that \a this array is consistently **increasing** or **decreasing** in value,
* with at least absolute difference value of |\a eps| at each step.
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::checkMonotonic(bool increasing, double eps) const throw(INTERP_KERNEL::Exception)
{
if(!isMonotonic(increasing,eps))
}
}
-//================================================================================
/*!
* Checks that \a this array is consistently **increasing** or **decreasing** in value,
* with at least absolute difference value of |\a eps| at each step.
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
bool DataArrayDouble::isMonotonic(bool increasing, double eps) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Returns a textual and human readable representation of \a this instance of
* DataArrayDouble. This text is shown when a DataArrayDouble is printed in Python.
* \return std::string - text describing \a this DataArrayDouble.
*/
-//================================================================================
-
std::string DataArrayDouble::repr() const
{
std::ostringstream ret;
return _mem.isEqual(other._mem,prec,reason);
}
-//================================================================================
/*!
* Checks if \a this and another DataArrayDouble are fully equal. For more info see
* \ref MEDCouplingArrayBasicsCompare.
* \param [in] prec - precision value to compare numeric data of the arrays.
* \return bool - \a true if the two arrays are equal, \a false else.
*/
-//================================================================================
-
bool DataArrayDouble::isEqual(const DataArrayDouble& other, double prec) const
{
std::string tmp;
return isEqualIfNotWhy(other,prec,tmp);
}
-//================================================================================
/*!
* Checks if values of \a this and another DataArrayDouble are equal. For more info see
* \ref MEDCouplingArrayBasicsCompare.
* \param [in] prec - precision value to compare numeric data of the arrays.
* \return bool - \a true if the values of two arrays are equal, \a false else.
*/
-//================================================================================
-
bool DataArrayDouble::isEqualWithoutConsideringStr(const DataArrayDouble& other, double prec) const
{
std::string tmp;
return _mem.isEqual(other._mem,prec,tmp);
}
-//================================================================================
/*!
* Changes number of tuples in the array. If the new number of tuples is smaller
* than the current number the array is truncated, otherwise the array is extended.
* \param [in] nbOfTuples - new number of tuples.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Creates a new DataArrayInt and assigns all (textual and numerical) data of \a this
* array to the new one.
* \return DataArrayInt * - the new instance of DataArrayInt.
*/
-//================================================================================
-
DataArrayInt *DataArrayDouble::convertToIntArr() const
{
DataArrayInt *ret=DataArrayInt::New();
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble holding the same values as \a this array but differently
* arranged in memory. If \a this array holds 2 components of 3 values:
* \throw If \a this is not allocated.
* \warning Do not confuse this method with transpose()!
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::fromNoInterlace() const throw(INTERP_KERNEL::Exception)
{
if(_mem.isNull())
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble holding the same values as \a this array but differently
* arranged in memory. If \a this array holds 2 components of 3 values:
* \throw If \a this is not allocated.
* \warning Do not confuse this method with transpose()!
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::toNoInterlace() const throw(INTERP_KERNEL::Exception)
{
if(_mem.isNull())
return ret;
}
-//================================================================================
/*!
* Permutes values of \a this array as required by \a old2New array. The values are
* permuted so that \c new[ \a old2New[ i ]] = \c old[ i ]. Number of tuples remains
* \param [in] old2New - C array of length equal to \a this->getNumberOfTuples()
* giving a new position for i-th old value.
*/
-//================================================================================
-
void DataArrayDouble::renumberInPlace(const int *old2New)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Permutes values of \a this array as required by \a new2Old array. The values are
* permuted so that \c new[ i ] = \c old[ \a new2Old[ i ]]. Number of tuples remains
* \return DataArrayDouble * - the new instance of DataArrayDouble that the caller
* is to delete using decrRef() as it is no more needed.
*/
-//================================================================================
-
void DataArrayDouble::renumberInPlaceR(const int *new2Old)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Returns a copy of \a this array with values permuted as required by \a old2New array.
* The values are permuted so that \c new[ \a old2New[ i ]] = \c old[ i ].
* is to delete using decrRef() as it is no more needed.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::renumber(const int *old2New) const
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a copy of \a this array with values permuted as required by \a new2Old array.
* The values are permuted so that \c new[ i ] = \c old[ \a new2Old[ i ]]. Number of
* \return DataArrayDouble * - the new instance of DataArrayDouble that the caller
* is to delete using decrRef() as it is no more needed.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::renumberR(const int *new2Old) const
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a shorten and permuted copy of \a this array. The new DataArrayDouble is
* of size \a newNbOfTuple and it's values are permuted as required by \a old2New array.
* \return DataArrayDouble * - the new instance of DataArrayDouble that the caller
* is to delete using decrRef() as it is no more needed.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::renumberAndReduce(const int *old2New, int newNbOfTuple) const
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a shorten and permuted copy of \a this array. The new DataArrayDouble is
* of size \a new2OldEnd - \a new2OldBg and it's values are permuted as required by
* \return DataArrayDouble * - the new instance of DataArrayDouble that the caller
* is to delete using decrRef() as it is no more needed.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::selectByTupleId(const int *new2OldBg, const int *new2OldEnd) const
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a shorten and permuted copy of \a this array. The new DataArrayDouble is
* of size \a new2OldEnd - \a new2OldBg and it's values are permuted as required by
* is to delete using decrRef() as it is no more needed.
* \throw If \a new2OldEnd - \a new2OldBg > \a this->getNumberOfTuples().
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a shorten copy of \a this array. The new DataArrayDouble contains every
* (\a bg + \c i * \a step)-th tuple of \a this array located before the \a end2-th
* \throw If (\a end2 < \a bg) or (\a step <= 0).
* \sa DataArrayDouble::substr.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::selectByTupleId2(int bg, int end2, int step) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a shorten copy of \a this array. The new DataArrayDouble contains ranges
* of tuples specified by \a ranges parameter.
* \throw If \a end > \a this->getNumberOfTuples().
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a shorten copy of \a this array. The new DataArrayDouble contains all
* tuples starting from the \a tupleIdBg-th tuple and including all tuples located before
\throw If \a tupleIdEnd != -1 && \a tupleIdEnd < \a this->getNumberOfTuples().
* \sa DataArrayDouble::selectByTupleId2
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::substr(int tupleIdBg, int tupleIdEnd) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a shorten or extended copy of \a this array. If \a newNbOfComp is less
* than \a this->getNumberOfComponents() then the result array is shorten as each tuple
* is to delete using decrRef() as it is no more needed.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::changeNbOfComponents(int newNbOfComp, double dftValue) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Changes the number of components within \a this array so that its raw data **does
* not** change, instead splitting this data into tuples changes.
* \throw If getNbOfElems() % \a newNbOfCompo != 0.
* \warning This method erases all (name and unit) component info set before!
*/
-//================================================================================
-
void DataArrayDouble::rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Changes the number of components within \a this array to be equal to its number
* of tuples, and inversely its number of tuples to become equal to its number of
* \warning Do not confuse this method with fromNoInterlace() and toNoInterlace()!
* \sa rearrange()
*/
-//================================================================================
-
void DataArrayDouble::transpose() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
rearrange(nbOfTuples);
}
-//================================================================================
/*!
* Returns a copy of \a this array composed of selected components.
* The new DataArrayDouble has the same number of tuples but includes components
*
* \ref cpp_mcdataarraydouble_keepselectedcomponents "Here is a Python example".
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::keepSelectedComponents(const std::vector<int>& compoIds) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Appends components of another array to components of \a this one, tuple by tuple.
* So that the number of tuples of \a this array remains the same and the number of
*
* \ref py_mcdataarraydouble_meldwith "Here is a Python example".
*/
-//================================================================================
-
void DataArrayDouble::meldWith(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
copyPartOfStringInfoFrom2(compIds,*other);
}
-//================================================================================
/*!
* Searches for tuples coincident within \a prec tolerance. Each tuple is considered
* as coordinates of a point in getNumberOfComponents()-dimensional space. The
* \ref py_mcdataarraydouble_findcommontuples "Here is a Python example".
* \sa DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2().
*/
-//================================================================================
-
void DataArrayDouble::findCommonTuples(double prec, int limitTupleId, DataArrayInt *&comm, DataArrayInt *&commIndex) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a copy of \a this array by excluding coincident tuples. Each tuple is
* considered as coordinates of a point in getNumberOfComponents()-dimensional
*
* \ref cpp_mcdataarraydouble_getdifferentvalues "Here is a Python example".
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::getDifferentValues(double prec, int limitTupleId) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return renumberAndReduce(o2n->getConstPointer(),newNbOfTuples);
}
-//================================================================================
/*!
* Copy all components in a specified order from another DataArrayDouble.
* The specified components become the first ones in \a this array.
*
* \ref cpp_mcdataarraydouble_setselectedcomponents "Here is a Python example".
*/
-//================================================================================
-
void DataArrayDouble::setSelectedComponents(const DataArrayDouble *a, const std::vector<int>& compoIds) throw(INTERP_KERNEL::Exception)
{
if(!a)
nc[nbOfCompo*i+compoIds[j]]=*ac;
}
-//================================================================================
/*!
* Copy all values from another DataArrayDouble into specified tuples and components
* of \a this array. Textual data is not copied.
*
* \ref cpp_mcdataarraydouble_setpartofvalues1 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayDouble::setPartOfValues1(const DataArrayDouble *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare) throw(INTERP_KERNEL::Exception)
{
if(!a)
}
}
-//================================================================================
/*!
* Assign a given value to values at specified tuples and components of \a this array.
* The tree parameters defining set of indices of tuples and components are similar to
*
* \ref cpp_mcdataarraydouble_setpartofvaluessimple1 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayDouble::setPartOfValuesSimple1(double a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception)
{
const char msg[]="DataArrayDouble::setPartOfValuesSimple1";
pt[j*stepComp]=a;
}
-//================================================================================
/*!
* Copy all values from another DataArrayDouble (\a a) into specified tuples and
* components of \a this array. Textual data is not copied.
*
* \ref cpp_mcdataarraydouble_setpartofvalues2 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayDouble::setPartOfValues2(const DataArrayDouble *a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp, bool strictCompoCompare) throw(INTERP_KERNEL::Exception)
{
if(!a)
}
}
-//================================================================================
/*!
* Assign a given value to values at specified tuples and components of \a this array.
* The tuples and components to assign to are defined by C arrays of indices.
*
* \ref cpp_mcdataarraydouble_setpartofvaluessimple2 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayDouble::setPartOfValuesSimple2(double a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Copy all values from another DataArrayDouble (\a a) into specified tuples and
* components of \a this array. Textual data is not copied.
*
* \ref cpp_mcdataarraydouble_setpartofvalues3 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayDouble::setPartOfValues3(const DataArrayDouble *a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare) throw(INTERP_KERNEL::Exception)
{
if(!a)
}
}
-//================================================================================
/*!
* Assign a given value to values at specified tuples and components of \a this array.
* The tuples to assign to are defined by a C array of indices.
*
* \ref cpp_mcdataarraydouble_setpartofvaluessimple3 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayDouble::setPartOfValuesSimple3(double a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception)
{
const char msg[]="DataArrayDouble::setPartOfValuesSimple3";
pt[*z]=a;
}
-//================================================================================
/*!
* Copy some tuples from another DataArrayDouble into specified tuples
* of \a this array. Textual data is not copied. Both arrays must have equal number of
* \throw If any tuple index given by \a tuplesSelec is out of a valid range for
* the corresponding (\a this or \a a) array.
*/
-//================================================================================
-
void DataArrayDouble::setPartOfValuesAdv(const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception)
{
if(!a || !tuplesSelec)
}
}
-//================================================================================
/*!
* Copy some tuples from another DataArrayDouble (\a a) into contiguous tuples
* of \a this array. Textual data is not copied. Both arrays must have equal number of
* \throw If any tuple index given by \a tuplesSelec is out of a valid range for
* \a a array.
*/
-//================================================================================
-
void DataArrayDouble::setContigPartOfSelectedValues(int tupleIdStart, const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception)
{
if(!a || !tuplesSelec)
}
}
-//================================================================================
/*!
* Copy some tuples from another DataArrayDouble (\a a) into contiguous tuples
* of \a this array. Textual data is not copied. Both arrays must have equal number of
* non-empty range of increasing indices or indices are out of a valid range
* for the array \a a.
*/
-//================================================================================
-
void DataArrayDouble::setContigPartOfSelectedValues2(int tupleIdStart, const DataArrayDouble *a, int bg, int end2, int step) throw(INTERP_KERNEL::Exception)
{
if(!a)
}
}
-//================================================================================
/*!
* Returns a value located at specified tuple and component.
* This method is equivalent to DataArrayDouble::getIJ() except that validity of
* \throw If condition <em>( 0 <= tupleId < this->getNumberOfTuples() )</em> is violated.
* \throw If condition <em>( 0 <= compoId < this->getNumberOfComponents() )</em> is violated.
*/
-//================================================================================
-
double DataArrayDouble::getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return _mem[tupleId*((int)_info_on_compo.size())+compoId];
}
-//================================================================================
/*!
* Returns the last value of \a this.
* \return double - the last value of \a this array.
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If \a this->getNumberOfTuples() < 1.
*/
-//================================================================================
-
double DataArrayDouble::back() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Sets a C array to be used as raw data of \a this. The previously set info
* of components is retained and re-sized.
* \param [in] nbOfTuple - new number of tuples in \a this.
* \param [in] nbOfCompo - new number of components in \a this.
*/
-//================================================================================
-
void DataArrayDouble::useArray(const double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo)
{
_info_on_compo.resize(nbOfCompo);
declareAsNew();
}
-//================================================================================
/*!
* Checks if 0.0 value is present in \a this array. If it is the case, an exception
* is thrown.
* \throw If zero is found in \a this array.
*/
-//================================================================================
-
void DataArrayDouble::checkNoNullValues() const throw(INTERP_KERNEL::Exception)
{
const double *tmp=getConstPointer();
throw INTERP_KERNEL::Exception("A value 0.0 have been detected !");
}
-//================================================================================
/*!
* Computes minimal and maximal value in each component. An output array is filled
* with \c 2 * \a this->getNumberOfComponents() values, so the caller is to allocate
* \a bounds[3] = \c max_of_component_1 <br>
* ...
*/
-//================================================================================
-
void DataArrayDouble::getMinMaxPerComponent(double *bounds) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Returns the maximal value and its location within \a this one-dimensional array.
* \param [out] tupleId - index of the tuple holding the maximal value.
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this->getNumberOfTuples() < 1
*/
-//================================================================================
-
double DataArrayDouble::getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *loc;
}
-//================================================================================
/*!
* Returns the maximal value within \a this array that is allowed to have more than
* one component.
* \return double - the maximal value among all values of \a this array.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
double DataArrayDouble::getMaxValueInArray() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *loc;
}
-//================================================================================
/*!
* Returns the maximal value and all its locations within \a this one-dimensional array.
* \param [out] tupleIds - a new instance of DataArrayInt containg indices of
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this->getNumberOfTuples() < 1
*/
-//================================================================================
-
double DataArrayDouble::getMaxValue2(DataArrayInt*& tupleIds) const throw(INTERP_KERNEL::Exception)
{
int tmp;
return ret;
}
-//================================================================================
/*!
* Returns the minimal value and its location within \a this one-dimensional array.
* \param [out] tupleId - index of the tuple holding the minimal value.
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this->getNumberOfTuples() < 1
*/
-//================================================================================
-
double DataArrayDouble::getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *loc;
}
-//================================================================================
/*!
* Returns the minimal value within \a this array that is allowed to have more than
* one component.
* \return double - the minimal value among all values of \a this array.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
double DataArrayDouble::getMinValueInArray() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *loc;
}
-//================================================================================
/*!
* Returns the minimal value and all its locations within \a this one-dimensional array.
* \param [out] tupleIds - a new instance of DataArrayInt containg indices of
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this->getNumberOfTuples() < 1
*/
-//================================================================================
-
double DataArrayDouble::getMinValue2(DataArrayInt*& tupleIds) const throw(INTERP_KERNEL::Exception)
{
int tmp;
return ret;
}
-//================================================================================
/*!
* Returns the average value of \a this one-dimensional array.
* \return double - the average value over all values of \a this array.
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this->getNumberOfTuples() < 1
*/
-//================================================================================
-
double DataArrayDouble::getAverageValue() const throw(INTERP_KERNEL::Exception)
{
if(getNumberOfComponents()!=1)
return ret/nbOfTuples;
}
-//================================================================================
/*!
* Returns the Euclidean norm of the vector defined by \a this array.
* \return double - the value of the Euclidean norm, i.e.
* the square root of the inner product of vector.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
double DataArrayDouble::norm2() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return sqrt(ret);
}
-//================================================================================
/*!
* Returns the maximum norm of the vector defined by \a this array.
* \return double - the value of the maximum norm, i.e.
* the maximal absolute value among values of \a this array.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
double DataArrayDouble::normMax() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Accumulates values of each component of \a this array.
* \param [out] res - an array of length \a this->getNumberOfComponents(), allocated
* component.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::accumulate(double *res) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return sqrt(ret0);
}
-//================================================================================
/*!
* Accumulate values of the given component of \a this array.
* \param [in] compId - the index of the component of interest.
* \throw If \a the condition ( 0 <= \a compId < \a this->getNumberOfComponents() ) is
* not respected.
*/
-//================================================================================
-
double DataArrayDouble::accumulate(int compId) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Converts each 2D point defined by the tuple of \a this array from the Polar to the
* Cartesian coordinate system. The two components of the tuple of \a this array are
* does not contain any textual info on components.
* \throw If \a this->getNumberOfComponents() != 2.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::fromPolarToCart() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Converts each 3D point defined by the tuple of \a this array from the Cylindrical to
* the Cartesian coordinate system. The three components of the tuple of \a this array
* is to delete this array using decrRef() as it is no more needed.
* \throw If \a this->getNumberOfComponents() != 3.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::fromCylToCart() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Converts each 3D point defined by the tuple of \a this array from the Spherical to
* the Cartesian coordinate system. The three components of the tuple of \a this array
* is to delete this array using decrRef() as it is no more needed.
* \throw If \a this->getNumberOfComponents() != 3.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::fromSpherToCart() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Computes the doubly contracted product of every tensor defined by the tuple of \a this
* array contating 6 components.
* The caller is to delete this result array using decrRef() as it is no more needed.
* \throw If \a this->getNumberOfComponents() != 6.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::doublyContractedProduct() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Computes the determinant of every square matrix defined by the tuple of \a this
* array, which contains either 4, 6 or 9 components. The case of 6 components
* needed.
* \throw If \a this->getNumberOfComponents() is not in [4,6,9].
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::determinant() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Computes 3 eigenvalues of every upper triangular matrix defined by the tuple of
* \a this array, which contains 6 components.
* needed.
* \throw If \a this->getNumberOfComponents() != 6.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::eigenValues() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Computes 3 eigenvectors of every upper triangular matrix defined by the tuple of
* \a this array, which contains 6 components.
* needed.
* \throw If \a this->getNumberOfComponents() != 6.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::eigenVectors() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Computes the inverse matrix of every matrix defined by the tuple of \a this
* array, which contains either 4, 6 or 9 components. The case of 6 components
* needed.
* \throw If \a this->getNumberOfComponents() is not in [4,6,9].
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::inverse() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Computes the trace of every matrix defined by the tuple of \a this
* array, which contains either 4, 6 or 9 components. The case of 6 components
* needed.
* \throw If \a this->getNumberOfComponents() is not in [4,6,9].
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::trace() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Computes the stress deviator tensor of every stress tensor defined by the tuple of
* \a this array, which contains 6 components.
* needed.
* \throw If \a this->getNumberOfComponents() != 6.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::deviator() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Computes the magnitude of every vector defined by the tuple of
* \a this array.
* needed.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::magnitude() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Computes the maximal value within every tuple of \a this array.
* \return DataArrayDouble * - the new instance of DataArrayDouble containing the
* needed.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::maxPerTuple() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Sorts value within every tuple of \a this array.
* \param [in] asc - if \a true, the values are sorted in ascending order, else,
* in descending order.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Converts every value of \a this array to its absolute value.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::abs() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Apply a liner function to a given component of \a this array, so that
* an array element <em>(x)</em> becomes \f$ a * x + b \f$.
* \param [in] compoId - the index of component to modify.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::applyLin(double a, double b, int compoId) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Apply a liner function to all elements of \a this array, so that
* an element _x_ becomes \f$ a * x + b \f$.
* \param [in] b - the second coefficient of the function.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayDouble::applyLin(double a, double b) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Modify all elements of \a this array, so that
* an element _x_ becomes \f$ numerator / x \f$.
* array, all elements processed before detection of the zero element remain
* modified.
*/
-//================================================================================
-
void DataArrayDouble::applyInv(double numerator) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Returns a full copy of \a this array except that sign of all elements is reversed.
* \return DataArrayDouble * - the new instance of DataArrayDouble containing the
* needed.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::negate() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return newArr;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble created from \a this one by applying \a
* FunctionToEvaluate to every tuple of \a this array. Textual data is not copied.
* \throw If \a this is not allocated.
* \throw If \a func returns \a false.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::applyFunc(int nbOfComp, FunctionToEvaluate func) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return newArr;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble created from \a this one by applying a function to every
* tuple of \a this array. Textual data is not copied.
* \throw If \a this is not allocated.
* \throw If computing \a func fails.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::applyFunc(int nbOfComp, const char *func) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return newArr;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble created from \a this one by applying a function to every
* tuple of \a this array. Textual data is not copied.
* \throw If \a this is not allocated.
* \throw If computing \a func fails.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::applyFunc(const char *func) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return newArr;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble created from \a this one by applying a function to every
* tuple of \a this array. Textual data is not copied.
* \throw If \a func contains vars that are not in \a this->getInfoOnComponent().
* \throw If computing \a func fails.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::applyFunc2(int nbOfComp, const char *func) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return newArr;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble created from \a this one by applying a function to every
* tuple of \a this array. Textual data is not copied.
* \throw If \a func contains vars not in \a varsOrder.
* \throw If computing \a func fails.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::applyFunc3(int nbOfComp, const std::vector<std::string>& varsOrder, const char *func) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return new DataArrayDoubleIterator(this);
}
-//================================================================================
/*!
* Returns a new DataArrayInt contating indices of tuples of \a this one-dimensional
* array whose values are within a given range. Textual data is not copied.
*
* \ref py_mcdataarraydouble_getidsinrange "Here is a Python example".
*/
-//================================================================================
-
DataArrayInt *DataArrayDouble::getIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* 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)
* \throw If both \a a1 and \a a2 are NULL.
* \throw If \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents().
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayDouble *> tmp(2);
return Aggregate(tmp);
}
-//================================================================================
/*!
* 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)
* \throw If all arrays within \a arr are NULL.
* \throw If getNumberOfComponents() of arrays within \a arr.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Aggregate(const std::vector<const DataArrayDouble *>& arr) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayDouble *> a;
return ret;
}
-//================================================================================
/*!
* 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
* \throw If any given array is not allocated.
* \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples()
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayDouble *> arr(2);
return Meld(arr);
}
-//================================================================================
/*!
* 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
* \throw If any given array is not allocated.
* \throw If getNumberOfTuples() of arrays within \a arr is different.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Meld(const std::vector<const DataArrayDouble *>& arr) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayDouble *> a;
return ret;
}
-//================================================================================
/*!
* 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
* \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples()
* \throw If \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents()
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
return ret;
}
-//================================================================================
/*!
* 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
* \throw If \a a1->getNumberOfComponents() != 3
* \throw If \a a2->getNumberOfComponents() != 3
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::CrossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble containing maximal values of two given arrays.
* Info on components is copied from the first of the given arrays.
* \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples()
* \throw If \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents()
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble containing minimal values of two given arrays.
* Info on components is copied from the first of the given arrays.
* \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples()
* \throw If \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents()
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Min(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayDouble that is a sum of two given arrays. There are 3
* valid cases.
* \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents() and
* none of them has number of tuples or components equal to 1.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Add(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
return ret.retn();
}
-//================================================================================
/*!
* Adds values of another DataArrayDouble to values of \a this one. There are 3
* valid cases.
* \a this->getNumberOfComponents() != \a other->getNumberOfComponents() and
* \a other has number of both tuples and components not equal to 1.
*/
-//================================================================================
-
void DataArrayDouble::addEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
declareAsNew();
}
-//================================================================================
/*!
* Returns a new DataArrayDouble that is a subtraction of two given arrays. There are 3
* valid cases.
* \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents() and
* none of them has number of tuples or components equal to 1.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Substract(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
}
}
-//================================================================================
/*!
* Subtract values of another DataArrayDouble from values of \a this one. There are 3
* valid cases.
* \a this->getNumberOfComponents() != \a other->getNumberOfComponents() and
* \a other has number of both tuples and components not equal to 1.
*/
-//================================================================================
-
void DataArrayDouble::substractEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
declareAsNew();
}
-//================================================================================
/*!
* Returns a new DataArrayDouble that is a product of two given arrays. There are 3
* valid cases.
* \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents() and
* none of them has number of tuples or components equal to 1.
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
return ret.retn();
}
-//================================================================================
/*!
* Multiply values of another DataArrayDouble to values of \a this one. There are 3
* valid cases.
* \a this->getNumberOfComponents() != \a other->getNumberOfComponents() and
* \a other has number of both tuples and components not equal to 1.
*/
-//================================================================================
-
void DataArrayDouble::multiplyEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
declareAsNew();
}
-//================================================================================
/*!
* Returns a new DataArrayDouble that is a division of two given arrays. There are 3
* valid cases.
* none of them has number of tuples or components equal to 1.
* \warning No check of division by zero is performed!
*/
-//================================================================================
-
DataArrayDouble *DataArrayDouble::Divide(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
}
}
-//================================================================================
/*!
* Divide values of \a this array by values of another DataArrayDouble. There are 3
* valid cases.
* \a other has number of both tuples and components not equal to 1.
* \warning No check of division by zero is performed!
*/
-//================================================================================
-
void DataArrayDouble::divideEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
}
}
-//================================================================================
/*!
* Returns a new instance of DataArrayInt. The caller is to delete this array
* using decrRef() as it is no more needed.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::New()
{
return new DataArrayInt;
}
-//================================================================================
/*!
* Checks if raw data is allocated. Read more on the raw data
* in \ref MEDCouplingArrayBasicsTuplesAndCompo "DataArrays infos" for more information.
* \return bool - \a true if the raw data is allocated, \a false else.
*/
-//================================================================================
-
bool DataArrayInt::isAllocated() const
{
return getConstPointer()!=0;
}
-//================================================================================
/*!
* Checks if raw data is allocated and throws an exception if it is not the case.
* \throw If the raw data is not allocated.
*/
-//================================================================================
-
void DataArrayInt::checkAllocated() const throw(INTERP_KERNEL::Exception)
{
if(!isAllocated())
return DataArray::getHeapMemorySize()+sz;
}
-//================================================================================
/*!
* Sets information on all components. This method can change number of components
* at certain conditions; if the conditions are not respected, an exception is thrown.
* \param [in] info - a vector of component infos.
* \throw If \a this->getNumberOfComponents() != \a info.size() && \a this->isAllocated()
*/
-//================================================================================
-
void DataArrayInt::setInfoAndChangeNbOfCompo(const std::vector<std::string>& info) throw(INTERP_KERNEL::Exception)
{
if(getNumberOfComponents()!=(int)info.size())
_info_on_compo=info;
}
-//================================================================================
/*!
* Returns the only one value in \a this, if and only if number of elements
* (nb of tuples * nb of components) is equal to 1, and that \a this is allocated.
* \return double - the sole value stored in \a this array.
* \throw If at least one of conditions stated above is not fulfilled.
*/
-//================================================================================
-
int DataArrayInt::intValue() const throw(INTERP_KERNEL::Exception)
{
if(isAllocated())
throw INTERP_KERNEL::Exception("DataArrayInt::intValue : DataArrayInt instance is not allocated !");
}
-//================================================================================
/*!
* Returns an integer value characterizing \a this array, which is useful for a quick
* comparison of many instances of DataArrayInt.
* \return int - the hash value.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
int DataArrayInt::getHashCode() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret+ret0;
}
-//================================================================================
/*!
* Checks the number of tuples.
* \return bool - \a true if getNumberOfTuples() == 0, \a false else.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
bool DataArrayInt::empty() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return getNumberOfTuples()==0;
}
-//================================================================================
/*!
* Returns a full copy of \a this. For more info on copying data arrays see
* \ref MEDCouplingArrayBasicsCopyDeep.
* \return DataArrayInt * - a new instance of DataArrayInt.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::deepCpy() const
{
return new DataArrayInt(*this);
}
-//================================================================================
/*!
* Returns either a \a deep or \a shallow copy of this array. For more info see
* \ref MEDCouplingArrayBasicsCopyDeep and \ref MEDCouplingArrayBasicsCopyShallow.
* \return DataArrayInt * - either a new instance of DataArrayInt (if \a dCpy
* == \a true) or \a this instance (if \a dCpy == \a false).
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::performCpy(bool dCpy) const
{
if(dCpy)
}
}
-//================================================================================
/*!
* Copies all the data from another DataArrayInt. For more info see
* \ref MEDCouplingArrayBasicsCopyDeepAssign.
* \param [in] other - another instance of DataArrayInt to copy data from.
* \throw If the \a other is not allocated.
*/
-//================================================================================
-
void DataArrayInt::cpyFrom(const DataArrayInt& other) throw(INTERP_KERNEL::Exception)
{
other.checkAllocated();
_mem.pack();
}
-//================================================================================
/*!
* Allocates the raw data in memory. If exactly as same memory as needed already
* allocated, it is not re-allocated.
* \param [in] nbOfCompo - number of components of data to allocate.
* \throw If \a nbOfTuple < 0 or \a nbOfCompo < 0.
*/
-//================================================================================
-
void DataArrayInt::allocIfNecessary(int nbOfTuple, int nbOfCompo)
{
if(isAllocated())
alloc(nbOfTuple,nbOfCompo);
}
-//================================================================================
/*!
* Allocates the raw data in memory. If the memory was already allocated, then it is
* freed and re-allocated. See an example of this method use
* \param [in] nbOfCompo - number of components of data to allocate.
* \throw If \a nbOfTuple < 0 or \a nbOfCompo < 0.
*/
-//================================================================================
-
void DataArrayInt::alloc(int nbOfTuple, int nbOfCompo) throw(INTERP_KERNEL::Exception)
{
if(nbOfTuple<0 || nbOfCompo<0)
declareAsNew();
}
-//================================================================================
/*!
* Assign zero to all values in \a this array. To know more on filling arrays see
* \ref MEDCouplingArrayFill.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::fillWithZero() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Assign \a val to all values in \a this array. To know more on filling arrays see
* \ref MEDCouplingArrayFill.
* \param [in] val - the value to fill with.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::fillWithValue(int val) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Set all values in \a this array so that the i-th element equals to \a init + i
* (i starts from zero). To know more on filling arrays see \ref MEDCouplingArrayFill.
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::iota(int init) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Returns a textual and human readable representation of \a this instance of
* DataArrayInt. This text is shown when a DataArrayInt is printed in Python.
* \return std::string - text describing \a this DataArrayInt.
*/
-//================================================================================
-
std::string DataArrayInt::repr() const
{
std::ostringstream ret;
stream << varName << "->setName(\"" << getName() << "\");" << std::endl;
}
-//================================================================================
/*!
* Modifies \a this one-dimensional array so that each value \a v = \a indArrBg[ \a v ],
* i.e. a current value is used as in index to get a new value from \a indArrBg.
* \throw If any value of \a this can't be used as a valid index for
* [\a indArrBg, \a indArrEnd).
*/
-//================================================================================
-
void DataArrayInt::transformWithIndArr(const int *indArrBg, const int *indArrEnd) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Computes distribution of values of \a this one-dimensional array between given value
* ranges (casts). This method is typically useful for entity number spliting by types,
* check of this is be done. If not, the result is not warranted.
*
*/
-//================================================================================
-
void DataArrayInt::splitByValueRange(const int *arrBg, const int *arrEnd,
DataArrayInt *& castArr, DataArrayInt *& rankInsideCast, DataArrayInt *& castsPresent) const throw(INTERP_KERNEL::Exception)
{
castsPresent=ret3.retn();
}
-//================================================================================
/*!
* Creates a one-dimensional DataArrayInt (\a res) whose contents are computed from
* values of \a this (\a a) and the given (\a indArr) arrays as follows:
* \throw If any value of \a this array is not a valid index for \a indArrBg array.
* \throw If any value of \a indArrBg is not a valid index for \a this array.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::transformWithIndArrR(const int *indArrBg, const int *indArrEnd) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Creates a one-dimensional DataArrayInt of given length, whose contents are computed
* from values of \a this array, which is supposed to contain a renumbering map in
*
* \ref py_mcdataarrayint_invertarrayo2n2n2o "Here is a Python example".
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::invertArrayO2N2N2O(int newNbOfElem) const
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
return ret.retn();
}
-//================================================================================
/*!
* Creates a one-dimensional DataArrayInt of given length, whose contents are computed
* from values of \a this array, which is supposed to contain a renumbering map in
*
* \ref py_mcdataarrayint_invertarrayn2o2o2n "Here is a Python example".
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::invertArrayN2O2O2N(int oldNbOfElem) const
{
checkAllocated();
return _mem.isEqual(other._mem,0,reason);
}
-//================================================================================
/*!
* Checks if \a this and another DataArrayInt are fully equal. For more info see
* \ref MEDCouplingArrayBasicsCompare.
* \param [in] other - an instance of DataArrayInt to compare with \a this one.
* \return bool - \a true if the two arrays are equal, \a false else.
*/
-//================================================================================
-
bool DataArrayInt::isEqual(const DataArrayInt& other) const
{
std::string tmp;
return isEqualIfNotWhy(other,tmp);
}
-//================================================================================
/*!
* Checks if values of \a this and another DataArrayInt are equal. For more info see
* \ref MEDCouplingArrayBasicsCompare.
* \param [in] other - an instance of DataArrayInt to compare with \a this one.
* \return bool - \a true if the values of two arrays are equal, \a false else.
*/
-//================================================================================
-
bool DataArrayInt::isEqualWithoutConsideringStr(const DataArrayInt& other) const
{
std::string tmp;
return _mem.isEqual(other._mem,0,tmp);
}
-//================================================================================
/*!
* Checks if values of \a this and another DataArrayInt are equal. Comparison is
* performed on sorted value sequences.
* \param [in] other - an instance of DataArrayInt to compare with \a this one.
* \return bool - \a true if the sorted values of two arrays are equal, \a false else.
*/
-//================================================================================
-
bool DataArrayInt::isEqualWithoutConsideringStrAndOrder(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception)
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> a=deepCpy();
return a->isEqualWithoutConsideringStr(*b);
}
-//================================================================================
/*!
* Sorts values of the array.
* \param [in] asc - \a true means ascending order, \a false, descending.
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
void DataArrayInt::sort(bool asc) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
_mem.sort(asc);
}
-//================================================================================
/*!
* Reverse the array values.
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::reverse() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
_mem.reverse();
}
-//================================================================================
/*!
* Checks that \a this array is consistently **increasing** or **decreasing** in value.
* If not an exception is thrown.
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::checkMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception)
{
if(!isMonotonic(increasing))
}
}
-//================================================================================
/*!
* Checks that \a this array is consistently **increasing** or **decreasing** in value.
* \param [in] increasing - if \a true, array values should be increasing.
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
bool DataArrayInt::isMonotonic(bool increasing) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Creates a new one-dimensional DataArrayInt of the same size as \a this and a given
* one-dimensional arrays that must be of the same length. The result array describes
*
* \ref py_mcdataarrayint_buildpermutationarr "Here is a Python example".
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::buildPermutationArr(const DataArrayInt& other) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Sets a C array to be used as raw data of \a this. The previously set info
* of components is retained and re-sized.
* \param [in] nbOfTuple - new number of tuples in \a this.
* \param [in] nbOfCompo - new number of components in \a this.
*/
-//================================================================================
-
void DataArrayInt::useArray(const int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo)
{
_info_on_compo.resize(nbOfCompo);
declareAsNew();
}
-//================================================================================
/*!
* Returns a new DataArrayInt holding the same values as \a this array but differently
* arranged in memory. If \a this array holds 2 components of 3 values:
* \throw If \a this is not allocated.
* \warning Do not confuse this method with transpose()!
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::fromNoInterlace() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt holding the same values as \a this array but differently
* arranged in memory. If \a this array holds 2 components of 3 values:
* \throw If \a this is not allocated.
* \warning Do not confuse this method with transpose()!
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::toNoInterlace() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Permutes values of \a this array as required by \a old2New array. The values are
* permuted so that \c new[ \a old2New[ i ]] = \c old[ i ]. Number of tuples remains
* \param [in] old2New - C array of length equal to \a this->getNumberOfTuples()
* giving a new position for i-th old value.
*/
-//================================================================================
-
void DataArrayInt::renumberInPlace(const int *old2New)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Permutes values of \a this array as required by \a new2Old array. The values are
* permuted so that \c new[ i ] = \c old[ \a new2Old[ i ]]. Number of tuples remains
* \return DataArrayInt * - the new instance of DataArrayInt that the caller
* is to delete using decrRef() as it is no more needed.
*/
-//================================================================================
-
void DataArrayInt::renumberInPlaceR(const int *new2Old)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Returns a copy of \a this array with values permuted as required by \a old2New array.
* The values are permuted so that \c new[ \a old2New[ i ]] = \c old[ i ].
* is to delete using decrRef() as it is no more needed.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::renumber(const int *old2New) const
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a copy of \a this array with values permuted as required by \a new2Old array.
* The values are permuted so that \c new[ i ] = \c old[ \a new2Old[ i ]]. Number of
* \return DataArrayInt * - the new instance of DataArrayInt that the caller
* is to delete using decrRef() as it is no more needed.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::renumberR(const int *new2Old) const
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a shorten and permuted copy of \a this array. The new DataArrayInt is
* of size \a newNbOfTuple and it's values are permuted as required by \a old2New array.
* \return DataArrayInt * - the new instance of DataArrayInt that the caller
* is to delete using decrRef() as it is no more needed.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::renumberAndReduce(const int *old2New, int newNbOfTuple) const
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a shorten and permuted copy of \a this array. The new DataArrayInt is
* of size \a new2OldEnd - \a new2OldBg and it's values are permuted as required by
* \return DataArrayInt * - the new instance of DataArrayInt that the caller
* is to delete using decrRef() as it is no more needed.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::selectByTupleId(const int *new2OldBg, const int *new2OldEnd) const
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a shorten and permuted copy of \a this array. The new DataArrayInt is
* of size \a new2OldEnd - \a new2OldBg and it's values are permuted as required by
* is to delete using decrRef() as it is no more needed.
* \throw If \a new2OldEnd - \a new2OldBg > \a this->getNumberOfTuples().
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a shorten copy of \a this array. The new DataArrayInt contains every
* (\a bg + \c i * \a step)-th tuple of \a this array located before the \a end2-th
* \throw If (\a end2 < \a bg) or (\a step <= 0).
* \sa DataArrayInt::substr.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::selectByTupleId2(int bg, int end2, int step) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a shorten copy of \a this array. The new DataArrayInt contains ranges
* of tuples specified by \a ranges parameter.
* \throw If \a end > \a this->getNumberOfTuples().
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Returns a new DataArrayInt containing a renumbering map in "Old to New" mode.
* This map, if applied to \a this array, would make it sorted. For example, if
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If there are equal values in \a this array.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::checkAndPreparePermutation() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns two arrays describing a surjective mapping from \a this set of values (\a A)
* onto a set of values of size \a targetNb (\a B). The surjective function is
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If any value in \a this is more or equal to \a targetNb.
*/
-//================================================================================
-
void DataArrayInt::changeSurjectiveFormat(int targetNb, DataArrayInt *&arr, DataArrayInt *&arrI) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
-//================================================================================
/*!
* Returns a new DataArrayInt containing a renumbering map in "Old to New" mode computed
* from a zip representation of a surjective format (returned e.g. by
* array using decrRef() as it is no more needed.
* \throw If any value of \a arr breaks condition ( 0 <= \a arr[ i ] < \a nbOfOldTuples ).
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2(int nbOfOldTuples, const int *arr, const int *arrIBg, const int *arrIEnd, int &newNbOfTuples) throw(INTERP_KERNEL::Exception)
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
return ret.retn();
}
-//================================================================================
/*!
* Returns a new DataArrayInt containing a renumbering map in "New to Old" mode,
* which if applied to \a this array would make it sorted ascendingly.
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::buildPermArrPerLevel() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Checks if contents of \a this array are equal to that of an array filled with
* iota(). This method is particularly useful for DataArrayInt instances that represent
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
bool DataArrayInt::isIdentity() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return true;
}
-//================================================================================
/*!
* Checks if all values in \a this array are equal to \a val.
* \param [in] val - value to check equality of array values to.
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1
*/
-//================================================================================
-
bool DataArrayInt::isUniform(int val) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return true;
}
-//================================================================================
/*!
* Creates a new DataArrayDouble and assigns all (textual and numerical) data of \a this
* array to the new one.
* \return DataArrayDouble * - the new instance of DataArrayInt.
*/
-//================================================================================
-
DataArrayDouble *DataArrayInt::convertToDblArr() const
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a shorten copy of \a this array. The new DataArrayInt contains all
* tuples starting from the \a tupleIdBg-th tuple and including all tuples located before
\throw If \a tupleIdEnd != -1 && \a tupleIdEnd < \a this->getNumberOfTuples().
* \sa DataArrayInt::selectByTupleId2
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::substr(int tupleIdBg, int tupleIdEnd) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Changes the number of components within \a this array so that its raw data **does
* not** change, instead splitting this data into tuples changes.
* \throw If getNbOfElems() % \a newNbOfCompo != 0.
* \warning This method erases all (name and unit) component info set before!
*/
-//================================================================================
-
void DataArrayInt::rearrange(int newNbOfCompo) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Changes the number of components within \a this array to be equal to its number
* of tuples, and inversely its number of tuples to become equal to its number of
* \warning Do not confuse this method with fromNoInterlace() and toNoInterlace()!
* \sa rearrange()
*/
-//================================================================================
-
void DataArrayInt::transpose() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
rearrange(nbOfTuples);
}
-//================================================================================
/*!
* Returns a shorten or extended copy of \a this array. If \a newNbOfComp is less
* than \a this->getNumberOfComponents() then the result array is shorten as each tuple
* is to delete using decrRef() as it is no more needed.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::changeNbOfComponents(int newNbOfComp, int dftValue) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Changes number of tuples in the array. If the new number of tuples is smaller
* than the current number the array is truncated, otherwise the array is extended.
* \param [in] nbOfTuples - new number of tuples.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::reAlloc(int nbOfTuples) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
-//================================================================================
/*!
* Returns a copy of \a this array composed of selected components.
* The new DataArrayInt has the same number of tuples but includes components
*
* \ref cpp_mcdataarrayint_keepselectedcomponents "Here is a Python example".
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::keepSelectedComponents(const std::vector<int>& compoIds) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Appends components of another array to components of \a this one, tuple by tuple.
* So that the number of tuples of \a this array remains the same and the number of
*
* \ref py_mcdataarrayint_meldwith "Here is a Python example".
*/
-//================================================================================
-
void DataArrayInt::meldWith(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
copyPartOfStringInfoFrom2(compIds,*other);
}
-//================================================================================
/*!
* Copy all components in a specified order from another DataArrayInt.
* The specified components become the first ones in \a this array.
*
* \ref cpp_mcdataarrayint_setselectedcomponents "Here is a Python example".
*/
-//================================================================================
-
void DataArrayInt::setSelectedComponents(const DataArrayInt *a, const std::vector<int>& compoIds) throw(INTERP_KERNEL::Exception)
{
if(!a)
nc[nbOfCompo*i+compoIds[j]]=*ac;
}
-//================================================================================
/*!
* Copy all values from another DataArrayInt into specified tuples and components
* of \a this array. Textual data is not copied.
*
* \ref cpp_mcdataarrayint_setpartofvalues1 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayInt::setPartOfValues1(const DataArrayInt *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare) throw(INTERP_KERNEL::Exception)
{
if(!a)
}
}
-//================================================================================
/*!
* Assign a given value to values at specified tuples and components of \a this array.
* The tree parameters defining set of indices of tuples and components are similar to
*
* \ref cpp_mcdataarrayint_setpartofvaluessimple1 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayInt::setPartOfValuesSimple1(int a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception)
{
const char msg[]="DataArrayInt::setPartOfValuesSimple1";
}
-//================================================================================
/*!
* Copy all values from another DataArrayInt (\a a) into specified tuples and
* components of \a this array. Textual data is not copied.
*
* \ref cpp_mcdataarrayint_setpartofvalues2 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayInt::setPartOfValues2(const DataArrayInt *a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp, bool strictCompoCompare) throw(INTERP_KERNEL::Exception)
{
if(!a)
}
}
-//================================================================================
/*!
* Assign a given value to values at specified tuples and components of \a this array.
* The tuples and components to assign to are defined by C arrays of indices.
*
* \ref cpp_mcdataarrayint_setpartofvaluessimple2 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayInt::setPartOfValuesSimple2(int a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Copy all values from another DataArrayInt (\a a) into specified tuples and
* components of \a this array. Textual data is not copied.
*
* \ref cpp_mcdataarrayint_setpartofvalues3 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayInt::setPartOfValues3(const DataArrayInt *a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare) throw(INTERP_KERNEL::Exception)
{
if(!a)
}
}
-//================================================================================
/*!
* Assign a given value to values at specified tuples and components of \a this array.
* The tuples to assign to are defined by a C array of indices.
*
* \ref cpp_mcdataarrayint_setpartofvaluessimple3 "Here is a Python example".
*/
-//================================================================================
-
void DataArrayInt::setPartOfValuesSimple3(int a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp) throw(INTERP_KERNEL::Exception)
{
const char msg[]="DataArrayInt::setPartOfValuesSimple3";
pt[*z]=a;
}
-//================================================================================
/*!
* Copy some tuples from another DataArrayInt into specified tuples
* of \a this array. Textual data is not copied. Both arrays must have equal number of
* \throw If any tuple index given by \a tuplesSelec is out of a valid range for
* the corresponding (\a this or \a a) array.
*/
-//================================================================================
-
void DataArrayInt::setPartOfValuesAdv(const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception)
{
if(!a || !tuplesSelec)
}
}
-//================================================================================
/*!
* Copy some tuples from another DataArrayInt (\a a) into contiguous tuples
* of \a this array. Textual data is not copied. Both arrays must have equal number of
* \throw If any tuple index given by \a tuplesSelec is out of a valid range for
* \a a array.
*/
-//================================================================================
-
void DataArrayInt::setContigPartOfSelectedValues(int tupleIdStart, const DataArrayInt*a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Copy some tuples from another DataArrayInt (\a a) into contiguous tuples
* of \a this array. Textual data is not copied. Both arrays must have equal number of
* non-empty range of increasing indices or indices are out of a valid range
* for the array \a a.
*/
-//================================================================================
-
void DataArrayInt::setContigPartOfSelectedValues2(int tupleIdStart, const DataArrayInt *a, int bg, int end2, int step) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
}
-//================================================================================
/*!
* Returns a value located at specified tuple and component.
* This method is equivalent to DataArrayInt::getIJ() except that validity of
* \throw If condition <em>( 0 <= tupleId < this->getNumberOfTuples() )</em> is violated.
* \throw If condition <em>( 0 <= compoId < this->getNumberOfComponents() )</em> is violated.
*/
-//================================================================================
-
int DataArrayInt::getIJSafe(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return _mem[tupleId*((int)_info_on_compo.size())+compoId];
}
-//================================================================================
/*!
* Returns the last value of \a this.
* \return double - the last value of \a this array.
* \throw If \a this->getNumberOfComponents() != 1.
* \throw If \a this->getNumberOfTuples() < 1.
*/
-//================================================================================
-
int DataArrayInt::back() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *(getConstPointer()+nbOfTuples-1);
}
-//================================================================================
/*!
* Assign pointer to one array to a pointer to another appay. Reference counter of
* \a arrayToSet is incremented / decremented.
* \param [in] newArray - the pointer to array to assign to \a arrayToSet.
* \param [in,out] arrayToSet - the pointer to array to assign to.
*/
-//================================================================================
-
void DataArrayInt::SetArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet)
{
if(newArray!=arrayToSet)
return new DataArrayIntIterator(this);
}
-//================================================================================
/*!
* Creates a new DataArrayInt containing IDs (indices) of tuples holding value equal to a
* given one.
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::getIdsEqual(int val) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret.retn();
}
-//================================================================================
/*!
* Creates a new DataArrayInt containing IDs (indices) of tuples holding value \b not
* equal to a given one.
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::getIdsNotEqual(int val) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
-//================================================================================
/*!
* Assigns \a newValue to all elements holding \a oldValue within \a this
* one-dimensional array.
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
int DataArrayInt::changeValue(int oldValue, int newValue) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Creates a new DataArrayInt containing IDs (indices) of tuples holding value equal to
* one of given values.
* array using decrRef() as it is no more needed.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::getIdsEqualList(const int *valsBg, const int *valsEnd) const throw(INTERP_KERNEL::Exception)
{
if(getNumberOfComponents()!=1)
return ret.retn();
}
-//================================================================================
/*!
* Creates a new DataArrayInt containing IDs (indices) of tuples holding values \b not
* equal to any of given values.
* array using decrRef() as it is no more needed.
* \throw If \a this->getNumberOfComponents() != 1.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::getIdsNotEqualList(const int *valsBg, const int *valsEnd) const throw(INTERP_KERNEL::Exception)
{
if(getNumberOfComponents()!=1)
}
-//================================================================================
/*!
* Returns \a true if a given value is present within \a this one-dimensional array.
* \param [in] value - the value to find within \a this array.
* \throw If \a this->getNumberOfComponents() != 1.
* \sa locateValue()
*/
-//================================================================================
-
bool DataArrayInt::presenceOfValue(int value) const throw(INTERP_KERNEL::Exception)
{
return locateValue(value)!=-1;
return locateValue(vals)!=-1;
}
-//================================================================================
/*!
* Accumulates values of each component of \a this array.
* \param [out] res - an array of length \a this->getNumberOfComponents(), allocated
* component.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::accumulate(int *res) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt by concatenating two given arrays, so that (1) the number
* of tuples in the result array is <em> a1->getNumberOfTuples() + a2->getNumberOfTuples() -
* \throw If either \a a1 or \a a2 is NULL.
* \throw If \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents().
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2)
{
if(!a1 || !a2)
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt by concatenating all given arrays, so that (1) the number
* of tuples in the result array is a sum of the number of tuples of given arrays and (2)
* \throw If all arrays within \a arr are NULL.
* \throw If getNumberOfComponents() of arrays within \a arr.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Aggregate(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *> a;
return ret;
}
-//================================================================================
/*!
* Returns the maximal value and its location within \a this one-dimensional array.
* \param [out] tupleId - index of the tuple holding the maximal value.
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this->getNumberOfTuples() < 1
*/
-//================================================================================
-
int DataArrayInt::getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *loc;
}
-//================================================================================
/*!
* Returns the maximal value within \a this array that is allowed to have more than
* one component.
* \return int - the maximal value among all values of \a this array.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
int DataArrayInt::getMaxValueInArray() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *loc;
}
-//================================================================================
/*!
* Returns the minimal value and its location within \a this one-dimensional array.
* \param [out] tupleId - index of the tuple holding the minimal value.
* \throw If \a this->getNumberOfComponents() != 1
* \throw If \a this->getNumberOfTuples() < 1
*/
-//================================================================================
-
int DataArrayInt::getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *loc;
}
-//================================================================================
/*!
* Returns the minimal value within \a this array that is allowed to have more than
* one component.
* \return int - the minimal value among all values of \a this array.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
int DataArrayInt::getMinValueInArray() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return *loc;
}
-//================================================================================
/*!
* Converts every value of \a this array to its absolute value.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::abs() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Apply a liner function to a given component of \a this array, so that
* an array element <em>(x)</em> becomes \f$ a * x + b \f$.
* \param [in] compoId - the index of component to modify.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::applyLin(int a, int b, int compoId) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Apply a liner function to all elements of \a this array, so that
* an element _x_ becomes \f$ a * x + b \f$.
* \param [in] b - the second coefficient of the function.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
void DataArrayInt::applyLin(int a, int b) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Returns a full copy of \a this array except that sign of all elements is reversed.
* \return DataArrayInt * - the new instance of DataArrayInt containing the
* needed.
* \throw If \a this is not allocated.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::negate() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return newArr;
}
-//================================================================================
/*!
* Modify all elements of \a this array, so that
* an element _x_ becomes \f$ numerator / x \f$.
* array, all elements processed before detection of the zero element remain
* modified.
*/
-//================================================================================
-
void DataArrayInt::applyInv(int numerator) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Modify all elements of \a this array, so that
* an element _x_ becomes \f$ x / val \f$.
* \throw If \a this is not allocated.
* \throw If \a val == 0.
*/
-//================================================================================
-
void DataArrayInt::applyDivideBy(int val) throw(INTERP_KERNEL::Exception)
{
if(val==0)
declareAsNew();
}
-//================================================================================
/*!
* Modify all elements of \a this array, so that
* an element _x_ becomes <em> x % val </em>.
* \throw If \a this is not allocated.
* \throw If \a val <= 0.
*/
-//================================================================================
-
void DataArrayInt::applyModulus(int val) throw(INTERP_KERNEL::Exception)
{
if(val<=0)
return ret;
}
-//================================================================================
/*!
* Modify all elements of \a this array, so that
* an element _x_ becomes <em> val % x </em>.
* array, all elements processed before detection of the zero element remain
* modified.
*/
-//================================================================================
-
void DataArrayInt::applyRModulus(int val) throw(INTERP_KERNEL::Exception)
{
checkAllocated();
declareAsNew();
}
-//================================================================================
/*!
* Returns a new DataArrayInt by aggregating two given arrays, so that (1) the number
* of components in the result array is a sum of the number of components of given arrays
* \throw If any given array is not allocated.
* \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples()
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *> arr(2);
return Meld(arr);
}
-//================================================================================
/*!
* Returns a new DataArrayInt by aggregating all given arrays, so that (1) the number
* of components in the result array is a sum of the number of components of given arrays
* \throw If any given array is not allocated.
* \throw If getNumberOfTuples() of arrays within \a arr is different.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Meld(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *> a;
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt which is a minimal partition of elements of \a groups.
* The i-th item of the result array is an ID of a set of elements belonging to a
* delete this array using decrRef() as it is no more needed.
* \throw If any element ID in \a groups violates condition ( 0 <= ID < \a newNb ).
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *> groups2;
return ret.retn();
}
-//================================================================================
/*!
* Returns a new DataArrayInt which contains all elements of given one-dimensional
* not negative arrays. The result array does not contain any duplicates and its values
* \throw If \a arr[i]->getNumberOfComponents() != 1.
* \throw If any value of \a arr[i] is negative.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::BuildUnion(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *> a;
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt which contains elements present in each of given one-dimensional
* not negative arrays. The result array does not contain any duplicates and its values
* \throw If \a arr[i]->getNumberOfComponents() != 1.
* \throw If any value of \a arr[i] < 0.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::BuildIntersection(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *> a;
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt which contains a complement of elements of \a this
* one-dimensional array. I.e. the result array contains all elements from the range [0,
* \throw If any element \a x of \a this array violates condition ( 0 <= \a x < \a
* nbOfElement ).
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::buildComplement(int nbOfElement) const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt containing elements of \a this one-dimensional missing
* from an \a other one-dimensional array.
* \throw If \a this->getNumberOfComponents() != 1.
* \sa DataArrayInt::buildSubstractionOptimized()
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::buildSubstraction(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception)
{
if(!other)
}
-//================================================================================
/*!
* Returns a new DataArrayInt which contains all elements of \a this and a given
* one-dimensional not negative arrays. The result array does not contain any duplicates
* \throw If \a other->getNumberOfComponents() != 1.
* \throw If any value of \a this or \a other is negative.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::buildUnion(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *>arrs(2);
}
-//================================================================================
/*!
* Returns a new DataArrayInt which contains elements present in both \a this and a given
* one-dimensional not negative arrays. The result array does not contain any duplicates
* \throw If \a other->getNumberOfComponents() != 1.
* \throw If any value of \a this or \a other is negative.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::buildIntersection(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *>arrs(2);
return ret.retn();
}
-//================================================================================
/*!
* Returns a new DataArrayInt which contains size of every of groups described by \a this
* "index" array. Such "index" array is returned for example by
* - result array contains [2,3,1,0,2,6],
* where 2 = 3 - 1, 3 = 6 - 3, 1 = 7 - 6 etc.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::deltaShiftIndex() const throw(INTERP_KERNEL::Exception)
{
checkAllocated();
return ret;
}
-//================================================================================
/*!
* Modifies \a this one-dimensional array so that value of each element \a x
* of \a this array (\a a) is computed as \f$ x_i = \sum_{j=0}^{i-1} a[ j ] \f$.
* Note that the last element 19 = 11 + 8 is missing because size of \a this
* array is retained and thus there is no space to store the last element.
*/
-//================================================================================
-
void DataArrayInt::computeOffsets() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
-//================================================================================
/*!
* Modifies \a this one-dimensional array so that value of each element \a x
* of \a this array (\a a) is computed as \f$ x_i = \sum_{j=0}^{i-1} a[ j ] \f$.
* - Before \a this contains [3,5,1,2,0,8]
* - After \a this contains [0,3,8,9,11,11,19]<br>
*/
-//================================================================================
-
void DataArrayInt::computeOffsets2() throw(INTERP_KERNEL::Exception)
{
checkAllocated();
}
-//================================================================================
/*!
* Returns a new DataArrayInt whose contents is computed from that of \a this and \a
* offsets arrays as follows. \a offsets is a one-dimensional array considered as an
* \c range( \a offsets[ \a this[1] ], offsets[ \a this[1]+1 ]) +
* \c range( \a offsets[ \a this[2] ], offsets[ \a this[2]+1 ])
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::buildExplicitArrByRanges(const DataArrayInt *offsets) const throw(INTERP_KERNEL::Exception)
{
if(!offsets)
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt that is a sum of two given arrays. There are 3
* valid cases.
* \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents() and
* none of them has number of tuples or components equal to 1.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Add(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
return ret.retn();
}
-//================================================================================
/*!
* Adds values of another DataArrayInt to values of \a this one. There are 3
* valid cases.
* \a this->getNumberOfComponents() != \a other->getNumberOfComponents() and
* \a other has number of both tuples and components not equal to 1.
*/
-//================================================================================
-
void DataArrayInt::addEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
declareAsNew();
}
-//================================================================================
/*!
* Returns a new DataArrayInt that is a subtraction of two given arrays. There are 3
* valid cases.
* \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents() and
* none of them has number of tuples or components equal to 1.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Substract(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
}
}
-//================================================================================
/*!
* Subtract values of another DataArrayInt from values of \a this one. There are 3
* valid cases.
* \a this->getNumberOfComponents() != \a other->getNumberOfComponents() and
* \a other has number of both tuples and components not equal to 1.
*/
-//================================================================================
-
void DataArrayInt::substractEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
declareAsNew();
}
-//================================================================================
/*!
* Returns a new DataArrayInt that is a product of two given arrays. There are 3
* valid cases.
* \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents() and
* none of them has number of tuples or components equal to 1.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Multiply(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
}
-//================================================================================
/*!
* Multiply values of another DataArrayInt to values of \a this one. There are 3
* valid cases.
* \a this->getNumberOfComponents() != \a other->getNumberOfComponents() and
* \a other has number of both tuples and components not equal to 1.
*/
-//================================================================================
-
void DataArrayInt::multiplyEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
}
-//================================================================================
/*!
* Returns a new DataArrayInt that is a division of two given arrays. There are 3
* valid cases.
* none of them has number of tuples or components equal to 1.
* \warning No check of division by zero is performed!
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Divide(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
}
}
-//================================================================================
/*!
* Divide values of \a this array by values of another DataArrayInt. There are 3
* valid cases.
* \a other has number of both tuples and components not equal to 1.
* \warning No check of division by zero is performed!
*/
-//================================================================================
-
void DataArrayInt::divideEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
}
-//================================================================================
/*!
* Returns a new DataArrayInt that is a modulus of two given arrays. There are 3
* valid cases.
* none of them has number of tuples or components equal to 1.
* \warning No check of division by zero is performed!
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Modulus(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
if(!a1 || !a2)
}
}
-//================================================================================
/*!
* Modify \a this array so that each value becomes a modulus of division of this value by
* a value of another DataArrayInt. There are 3 valid cases.
* \a other has number of both tuples and components not equal to 1.
* \warning No check of division by zero is performed!
*/
-//================================================================================
-
void DataArrayInt::modulusEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
if(!other)
declareAsNew();
}
-//================================================================================
/*!
* Returns a C array which is a renumbering map in "Old to New" mode for the input array.
* This map, if applied to \a start array, would make it sorted. For example, if
* more needed.
* \throw If there are equal values in the input array.
*/
-//================================================================================
-
int *DataArrayInt::CheckAndPreparePermutation(const int *start, const int *end)
{
std::size_t sz=std::distance(start,end);
return ret;
}
-//================================================================================
/*!
* Returns a new DataArrayInt containing an arithmetic progression
* that is equal to the sequence returned by Python \c range(\a begin,\a end,\a step )
* \throw If \a end < \a begin && \a step > 0.
* \throw If \a end > \a begin && \a step < 0.
*/
-//================================================================================
-
DataArrayInt *DataArrayInt::Range(int begin, int end, int step) throw(INTERP_KERNEL::Exception)
{
int nbOfTuples=GetNumberOfItemGivenBESRelative(begin,end,step,"DataArrayInt::Range");