void DataArrayDouble::setSelectedComponents(const DataArrayDouble *a, const std::vector<int>& compoIds) throw(INTERP_KERNEL::Exception)
{
+ if(!a)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::setSelectedComponents : input DataArrayDouble is NULL !");
copyPartOfStringInfoFrom2(compoIds,*a);
std::size_t partOfCompoSz=compoIds.size();
int nbOfCompo=getNumberOfComponents();
*/
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)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::setPartOfValues1 : input DataArrayDouble is NULL !");
const char msg[]="DataArrayDouble::setPartOfValues1";
checkAllocated();
a->checkAllocated();
*/
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)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::setPartOfValues2 : input DataArrayDouble is NULL !");
const char msg[]="DataArrayDouble::setPartOfValues2";
checkAllocated();
a->checkAllocated();
*/
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)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::setPartOfValues3 : input DataArrayDouble is NULL !");
const char msg[]="DataArrayDouble::setPartOfValues3";
checkAllocated();
a->checkAllocated();
*/
void DataArrayDouble::setPartOfValuesAdv(const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception)
{
+ if(!a)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::setPartOfValuesAdv : input DataArrayDouble is NULL !");
checkAllocated();
a->checkAllocated();
tuplesSelec->checkAllocated();
*/
void DataArrayDouble::setContigPartOfSelectedValues(int tupleIdStart, const DataArrayDouble *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception)
{
+ if(!a || !tuplesSelec)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::setContigPartOfSelectedValues : input DataArray is NULL !");
checkAllocated();
a->checkAllocated();
tuplesSelec->checkAllocated();
*/
void DataArrayDouble::setContigPartOfSelectedValues2(int tupleIdStart, const DataArrayDouble *a, int bg, int end2, int step) throw(INTERP_KERNEL::Exception)
{
+ if(!a)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::setContigPartOfSelectedValues2 : input DataArrayDouble is NULL !");
checkAllocated();
a->checkAllocated();
int nbOfComp=getNumberOfComponents();
return Aggregate(tmp);
}
-DataArrayDouble *DataArrayDouble::Aggregate(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Aggregate(const std::vector<const DataArrayDouble *>& arr) throw(INTERP_KERNEL::Exception)
{
+ std::vector<const DataArrayDouble *> a;
+ for(std::vector<const DataArrayDouble *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+ if(*it4)
+ a.push_back(*it4);
if(a.empty())
- throw INTERP_KERNEL::Exception("DataArrayDouble::Aggregate : input list must be NON EMPTY !");
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Aggregate : input list must contain at least one NON EMPTY DataArrayDouble !");
std::vector<const DataArrayDouble *>::const_iterator it=a.begin();
int nbOfComp=(*it)->getNumberOfComponents();
int nbt=(*it++)->getNumberOfTuples();
return Meld(arr);
}
-DataArrayDouble *DataArrayDouble::Meld(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Meld(const std::vector<const DataArrayDouble *>& arr) throw(INTERP_KERNEL::Exception)
{
+ std::vector<const DataArrayDouble *> a;
+ for(std::vector<const DataArrayDouble *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+ if(*it4)
+ a.push_back(*it4);
if(a.empty())
- throw INTERP_KERNEL::Exception("DataArrayDouble::Meld : array must be NON empty !");
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Meld : input list must contain at least one NON EMPTY DataArrayDouble !");
std::vector<const DataArrayDouble *>::const_iterator it;
for(it=a.begin();it!=a.end();it++)
(*it)->checkAllocated();
DataArrayDouble *DataArrayDouble::Dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Dot : input DataArrayDouble instance is NULL !");
a1->checkAllocated();
a2->checkAllocated();
int nbOfComp=a1->getNumberOfComponents();
DataArrayDouble *DataArrayDouble::CrossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::CrossProduct : input DataArrayDouble instance is NULL !");
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
throw INTERP_KERNEL::Exception("Nb of components mismatch for array crossProduct !");
DataArrayDouble *DataArrayDouble::Max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Max : input DataArrayDouble instance is NULL !");
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
throw INTERP_KERNEL::Exception("Nb of components mismatch for array Max !");
DataArrayDouble *DataArrayDouble::Min(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Min : input DataArrayDouble instance is NULL !");
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
throw INTERP_KERNEL::Exception("Nb of components mismatch for array min !");
DataArrayDouble *DataArrayDouble::Add(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Add : input DataArrayDouble instance is NULL !");
int nbOfTuple=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
int nbOfComp=a1->getNumberOfComponents();
void DataArrayDouble::addEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::addEqual : input DataArrayDouble instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayDouble::addEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();
DataArrayDouble *DataArrayDouble::Substract(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Substract : input DataArrayDouble instance is NULL !");
int nbOfTuple=a2->getNumberOfTuples();
int nbOfComp=a2->getNumberOfComponents();
a1->checkNbOfTuplesAndComp(nbOfTuple,nbOfComp,"Nb of components mismatch for array Substract !");
void DataArrayDouble::substractEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::substractEqual : input DataArrayDouble instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayDouble::substractEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();
DataArrayDouble *DataArrayDouble::Multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Multiply : input DataArrayDouble instance is NULL !");
int nbOfTuple=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
int nbOfComp=a1->getNumberOfComponents();
void DataArrayDouble::multiplyEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::multiplyEqual : input DataArrayDouble instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayDouble::multiplyEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();
DataArrayDouble *DataArrayDouble::Divide(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Divide : input DataArrayDouble instance is NULL !");
int nbOfTuple=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
int nbOfComp=a1->getNumberOfComponents();
void DataArrayDouble::divideEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayDouble::divideEqual : input DataArrayDouble instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayDouble::divideEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();
*/
DataArrayInt *DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2(int nbOfOldTuples, const DataArrayInt *arr, const DataArrayInt *arrI, int &newNbOfTuples) throw(INTERP_KERNEL::Exception)
{
+ if(!arr || !arrI)
+ throw INTERP_KERNEL::Exception("DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2 : presence of NULL ref of DataArrayInt in input !");
DataArrayInt *ret=DataArrayInt::New();
ret->alloc(nbOfOldTuples,1);
int *pt=ret->getPointer();
*/
void DataArrayInt::meldWith(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayInt::meldWith : DataArrayInt pointer in input is NULL !");
checkAllocated();
other->checkAllocated();
int nbOfTuples=getNumberOfTuples();
*/
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)
+ throw INTERP_KERNEL::Exception("DataArrayInt::setPartOfValues1 : DataArrayInt pointer in input is NULL !");
const char msg[]="DataArrayInt::setPartOfValues1";
checkAllocated();
a->checkAllocated();
*/
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)
+ throw INTERP_KERNEL::Exception("DataArrayInt::setPartOfValues2 : DataArrayInt pointer in input is NULL !");
const char msg[]="DataArrayInt::setPartOfValues2";
checkAllocated();
a->checkAllocated();
*/
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)
+ throw INTERP_KERNEL::Exception("DataArrayInt::setPartOfValues3 : DataArrayInt pointer in input is NULL !");
const char msg[]="DataArrayInt::setPartOfValues3";
checkAllocated();
a->checkAllocated();
*/
void DataArrayInt::setPartOfValuesAdv(const DataArrayInt *a, const DataArrayInt *tuplesSelec) throw(INTERP_KERNEL::Exception)
{
+ if(!a)
+ throw INTERP_KERNEL::Exception("DataArrayInt::setPartOfValuesAdv : DataArrayInt pointer in input is NULL !");
checkAllocated();
a->checkAllocated();
tuplesSelec->checkAllocated();
DataArrayInt *DataArrayInt::Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : input DataArrayInt instance is NULL !");
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
throw INTERP_KERNEL::Exception("Nb of components mismatch for array Aggregation !");
return ret;
}
-DataArrayInt *DataArrayInt::Aggregate(const std::vector<const DataArrayInt *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayInt *DataArrayInt::Aggregate(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception)
{
+ std::vector<const DataArrayInt *> a;
+ for(std::vector<const DataArrayInt *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+ if(*it4)
+ a.push_back(*it4);
if(a.empty())
throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : input list must be NON EMPTY !");
std::vector<const DataArrayInt *>::const_iterator it=a.begin();
return Meld(arr);
}
-DataArrayInt *DataArrayInt::Meld(const std::vector<const DataArrayInt *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayInt *DataArrayInt::Meld(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception)
{
+ std::vector<const DataArrayInt *> a;
+ for(std::vector<const DataArrayInt *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+ if(*it4)
+ a.push_back(*it4);
if(a.empty())
throw INTERP_KERNEL::Exception("DataArrayInt::Meld : array must be NON empty !");
std::vector<const DataArrayInt *>::const_iterator it;
*/
DataArrayInt *DataArrayInt::MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups)
{
+ std::vector<const DataArrayInt *> groups2;
+ for(std::vector<const DataArrayInt *>::const_iterator it4=groups.begin();it4!=groups.end();it4++)
+ if(*it4)
+ groups2.push_back(*it4);
DataArrayInt *ret=DataArrayInt::New();
ret->alloc(newNb,1);
int *retPtr=ret->getPointer();
std::fill(retPtr,retPtr+newNb,0);
int fid=1;
- for(std::vector<const DataArrayInt *>::const_iterator iter=groups.begin();iter!=groups.end();iter++)
+ for(std::vector<const DataArrayInt *>::const_iterator iter=groups2.begin();iter!=groups2.end();iter++)
{
const int *ptr=(*iter)->getConstPointer();
int nbOfElem=(*iter)->getNbOfElems();
}
}
fidsOfGroups.clear();
- fidsOfGroups.resize(groups.size());
+ fidsOfGroups.resize(groups2.size());
int grId=0;
- for(std::vector<const DataArrayInt *>::const_iterator iter=groups.begin();iter!=groups.end();iter++,grId++)
+ for(std::vector<const DataArrayInt *>::const_iterator iter=groups2.begin();iter!=groups2.end();iter++,grId++)
{
std::set<int> tmp;
const int *ptr=(*iter)->getConstPointer();
return ret;
}
-DataArrayInt *DataArrayInt::BuildUnion(const std::vector<const DataArrayInt *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayInt *DataArrayInt::BuildUnion(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception)
{
+ std::vector<const DataArrayInt *> a;
+ for(std::vector<const DataArrayInt *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+ if(*it4)
+ a.push_back(*it4);
int valm=std::numeric_limits<int>::max();
for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
{
return ret;
}
-DataArrayInt *DataArrayInt::BuildIntersection(const std::vector<const DataArrayInt *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayInt *DataArrayInt::BuildIntersection(const std::vector<const DataArrayInt *>& arr) throw(INTERP_KERNEL::Exception)
{
+ std::vector<const DataArrayInt *> a;
+ for(std::vector<const DataArrayInt *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+ if(*it4)
+ a.push_back(*it4);
int valm=std::numeric_limits<int>::max();
for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
{
DataArrayInt *DataArrayInt::buildSubstraction(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : DataArrayInt pointer in input is NULL !");
checkAllocated();
other->checkAllocated();
if(getNumberOfComponents()!=1)
*/
DataArrayInt *DataArrayInt::buildExplicitArrByRanges(const DataArrayInt *offsets) const throw(INTERP_KERNEL::Exception)
{
+ if(!offsets)
+ throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : DataArrayInt pointer in input is NULL !");
checkAllocated();
if(getNumberOfComponents()!=1)
throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : only single component allowed !");
DataArrayInt *DataArrayInt::Add(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayInt::Add : input DataArrayInt instance is NULL !");
int nbOfTuple=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
int nbOfComp=a1->getNumberOfComponents();
void DataArrayInt::addEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayInt::addEqual : input DataArrayInt instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayInt::addEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();
DataArrayInt *DataArrayInt::Substract(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayInt::Substract : input DataArrayInt instance is NULL !");
int nbOfTuple=a2->getNumberOfTuples();
int nbOfComp=a2->getNumberOfComponents();
a1->checkNbOfTuplesAndComp(nbOfTuple,nbOfComp,"Nb of components mismatch for array Substract !");
void DataArrayInt::substractEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayInt::substractEqual : input DataArrayInt instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayInt::substractEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();
DataArrayInt *DataArrayInt::Multiply(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayInt::Multiply : input DataArrayInt instance is NULL !");
int nbOfTuple=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
int nbOfComp=a1->getNumberOfComponents();
void DataArrayInt::multiplyEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayInt::multiplyEqual : input DataArrayInt instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayInt::multiplyEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();
DataArrayInt *DataArrayInt::Divide(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayInt::Divide : input DataArrayInt instance is NULL !");
int nbOfTuple=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
int nbOfComp=a1->getNumberOfComponents();
void DataArrayInt::divideEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayInt::divideEqual : input DataArrayInt instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayInt::divideEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();
DataArrayInt *DataArrayInt::Modulus(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
+ if(!a1 || !a2)
+ throw INTERP_KERNEL::Exception("DataArrayInt::Modulus : input DataArrayInt instance is NULL !");
int nbOfTuple=a2->getNumberOfTuples();
int nbOfComp=a2->getNumberOfComponents();
a1->checkNbOfTuplesAndComp(nbOfTuple,nbOfComp,"Nb of components mismatch for array Modulus");
void DataArrayInt::modulusEqual(const DataArrayInt *other) throw(INTERP_KERNEL::Exception)
{
+ if(!other)
+ throw INTERP_KERNEL::Exception("DataArrayInt::modulusEqual : input DataArrayInt instance is NULL !");
const char *msg="Nb of tuples mismatch for DataArrayInt::modulusEqual !";
int nbOfTuple=getNumberOfTuples();
int nbOfTuple2=other->getNumberOfTuples();