throw INTERP_KERNEL::Exception("DataArrayChar::isUniform : must be applied on DataArrayChar with only one component, you can call 'rearrange' method before !");
checkAllocated();
if(getNumberOfComponents()!=1)
throw INTERP_KERNEL::Exception("DataArrayChar::isUniform : must be applied on DataArrayChar with only one component, you can call 'rearrange' method before !");
* This method differs from DataArrayChar::findIdFirstEqualTuple in that the position is internal raw data is not considered here contrary to DataArrayChar::findIdFirstEqualTuple.
* \sa DataArrayChar::findIdFirstEqualTuple
*/
* This method differs from DataArrayChar::findIdFirstEqualTuple in that the position is internal raw data is not considered here contrary to DataArrayChar::findIdFirstEqualTuple.
- throw INTERP_KERNEL::Exception("DataArrayInt::presenceOfValue : the array must have only one component, you can call 'rearrange' method before !");
+ throw INTERP_KERNEL::Exception("DataArrayChar::findIdFirstEqual : the array must have only one component, you can call 'rearrange' method before !");
std::set<char> vals2(vals.begin(),vals.end());
const char *cptr=getConstPointer();
std::set<char> vals2(vals.begin(),vals.end());
const char *cptr=getConstPointer();
- int nbOfTuples=getNumberOfTuples();
+ mcIdType nbOfTuples=getNumberOfTuples();
for(const char *w=cptr;w!=cptr+nbOfTuples;w++)
if(vals2.find(*w)!=vals2.end())
for(const char *w=cptr;w!=cptr+nbOfTuples;w++)
if(vals2.find(*w)!=vals2.end())
- return std::distance(cptr,w);
+ return ToIdType(std::distance(cptr,w));
return -1;
}
return -1;
}
@@ -382,15+381,15 @@ int DataArrayChar::findIdFirstEqual(const std::vector<char>& vals) const
* \param [in] vmax end of range. This value is \b not included in range.
* \return a newly allocated data array that the caller should deal with.
*/
* \param [in] vmax end of range. This value is \b not included in range.
* \return a newly allocated data array that the caller should deal with.
std::copy(data,data+nbCompo,std::ostream_iterator<int>(stream," "));//it is not a bug int here not char because it is not ASCII here contrary to DataArrayAsciiChar
{
stream << "Tuple #" << i << " : ";
std::copy(data,data+nbCompo,std::ostream_iterator<int>(stream," "));//it is not a bug int here not char because it is not ASCII here contrary to DataArrayAsciiChar
* This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
* \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
*/
* This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
* \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
*/
-DataArrayByte *DataArrayByteTuple::buildDAByte(int nbOfTuples, int nbOfCompo) const
* This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
* \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
*/
* This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
* \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
*/
-DataArrayAsciiChar *DataArrayAsciiCharTuple::buildDAAsciiChar(int nbOfTuples, int nbOfCompo) const