1 // Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 * Returns the attribute \a _name of \a this array.
24 * See \ref MEDCouplingArrayBasicsName "DataArrays infos" for more information.
25 * \return std::string - array name
27 std::string DataArray::getName() const {}
30 * Returns number of components of \a this array.
31 * See \ref MEDCouplingArrayBasicsTuplesAndCompo "DataArrays infos" for more information.
32 * \return int - number of components
34 int DataArray::getNumberOfComponents() const {}
37 * Returns number of tuples of \a this array.
38 * See \ref MEDCouplingArrayBasicsName "DataArrays infos" for more information.
39 * \return int - number of tuples
41 int DataArray::getNumberOfTuples() const {}
44 * Returns number of elements of \a this array.
45 * See \ref MEDCouplingArrayBasicsName "DataArrays infos" for more information.
46 * \return int - number of elements == <em> this->getNumberOfTuples() *
47 * this->getNumberOfComponents() </em>
49 int DataArray::getNbOfElems() const {}
52 * Throws an exception if number of elements in \a this array differs from a given one.
53 * See \ref MEDCouplingArrayBasicsName "DataArrays infos" for more information.
54 * \param [in] nbOfElems - expected array size.
55 * \param [in] msg - message to return within the thrown exception.
56 * \throw if <em> this->getNbOfElems() != nbOfElems</em>.
58 void DataArray::checkNbOfElems(int nbOfElems, const char *msg) const {}
61 * Returns values of a specified tuple.
62 * \param [in] tupleId - index of the tuple of interest.
63 * \param [out] res - C array returning values of the \a tupleId-th tuple. The \a res
64 * must be allocated by the caller and be of size not less than \a
65 * this->getNumberOfComponents().
67 void DataArrayDouble::getTuple(int tupleId, double *res) const {}
70 * Returns a value of a specified element of \a this array.
71 * \param [in] tupleId - index of the tuple of interest.
72 * \param [in] compoId - index of the component of interest.
73 * \return double - the value of \a compoId-th component of \a tupleId-th tuple.
75 double DataArrayDouble::getIJ(int tupleId, int compoId) const {}
78 * Returns a pointer to the first element of the raw data of \a this array.
79 * \return double* - the pointer to the value of 0-th tuple and 0-th component.
81 double * DataArrayDouble::getPointer() {}
84 * Returns a const pointer to the first element of the raw data of \a this array.
85 * \return const double* - the pointer to the value of 0-th tuple and 0-th component.
87 const double * DataArrayDouble::getConstPointer() const {}
90 * Assigns a given value to a specified element of \a this array.
91 * \param [in] tupleId - index of the tuple to modify.
92 * \param [in] compoId - index of the component to modify.
93 * \param [in] newVal - the value to assign to the value at \a compoId-th component
94 * of \a tupleId-th tuple.
96 void DataArrayDouble::setIJ(int tupleId, int compoId, double newVal) {}
99 * Assigns a given value to a specified element of \a this array which is not marked
101 * \param [in] tupleId - index of the tuple to modify.
102 * \param [in] compoId - index of the component to modify.
103 * \param [in] newVal - the value to assign to the value at \a compoId-th component
104 * of \a tupleId-th tuple.
106 void DataArrayDouble::setIJSilent(int tupleId, int compoId, double newVal) {}
109 * Copies values from another array starting from a specified element of \a this.
110 * \param [in] id - index of element to assign the value \a element0 to.
111 * \param [in] element0 - value to assign to the \a id-th element of \a this.
112 * \param [in] others - values to assign to elements following the \a id-th
113 * element of \a this.
114 * \param [in] sizeOfOthers - number of values to copy from \a others.
116 void DataArrayDouble::writeOnPlace(int id, double element0, const double *others, int sizeOfOthers) {}
119 * Does nothing because this class does not aggregate any TimeLabel instance.
121 void DataArrayDouble::updateTime() const {}
124 * Returns values of a specified tuple.
125 * \param [in] tupleId - index of the tuple of interest.
126 * \param [out] res - C array returning values of the \a tupleId-th tuple. The \a res
127 * must be allocated by the caller and be of size not less than \a
128 * this->getNumberOfComponents().
130 * \ref py_mcdataarrayint_getTuple "Here is a Python example".
132 void DataArrayInt::getTuple(int tupleId, int *res) const {}
135 * Returns a value of a specified element of \a this array.
136 * \param [in] tupleId - index of the tuple of interest.
137 * \param [in] compoId - index of the component of interest.
138 * \return int - the value of \a compoId-th component of \a tupleId-th tuple.
140 int DataArrayInt::getIJ(int tupleId, int compoId) const {}
144 * Assigns a given value to a specified element of \a this array.
145 * \param [in] tupleId - index of the tuple to modify.
146 * \param [in] compoId - index of the component to modify.
147 * \param [in] newVal - the value to assign to the value at \a compoId-th component
148 * of \a tupleId-th tuple.
149 * \warning As this method declares \a this array as modified, it is more optimal to use
150 * setIJSilent() for modification of muliple values of array and to call
151 * declareAsNew() after the modification is done.
153 void DataArrayInt::setIJ(int tupleId, int compoId, int newVal) {}
157 * Assigns a given value to a specified element of \a this array which is \b not marked
159 * \param [in] tupleId - index of the tuple to modify.
160 * \param [in] compoId - index of the component to modify.
161 * \param [in] newVal - the value to assign to the value at \a compoId-th component
162 * of \a tupleId-th tuple.
164 void DataArrayInt::setIJSilent(int tupleId, int compoId, int newVal) {}
167 * Returns a pointer to the first element of the raw data of \a this array.
168 * \return int* - the pointer to the value of 0-th tuple and 0-th component.
170 int * DataArrayInt::getPointer() {}
173 * Returns a const pointer to the first element of the raw data of \a this array.
174 * \return const int* - the pointer to the value of 0-th tuple and 0-th component.
176 const int * DataArrayInt::getConstPointer() const {}
179 * Copies values from another array starting from a given element of \a this.
180 * \param [in] id - index of element to assign the value \a element0 to.
181 * \param [in] element0 - value to assign to the \a id-th element of \a this.
182 * \param [in] others - values to assign to elements following the \a id-th
183 * element of \a this.
184 * \param [in] sizeOfOthers - number of values to copy from \a others.
186 void DataArrayInt::writeOnPlace(int id, int element0, const int *others, int sizeOfOthers) {}
192 //================================================================================
193 /////////////////////// DataArray GROUPPING //////////////////////////////////////
194 //================================================================================
196 /*! \name Basic API */
198 DataArray::setName(const char *name);
199 DataArray::copyStringInfoFrom(const DataArray& other);
200 DataArray::areInfoEquals(const DataArray& other) const;
201 DataArray::getName() const;
202 DataArray::setInfoOnComponents(const std::vector<std::string>& info);
203 DataArray::getVarOnComponent(int i) const;
204 DataArray::getUnitOnComponent(int i) const;
205 DataArray::setInfoOnComponent(int i, const char *info);
206 DataArray::getNumberOfComponents() const;
207 DataArray::getNumberOfTuples() const;
208 DataArray::getNbOfElems() const;
209 DataArray::checkNbOfElems(int nbOfElems, const char *msg) const;
210 DataArray::GetVarNameFromInfo(const std::string& info);
211 DataArray::GetUnitFromInfo(const std::string& info);
214 /*! \name Others... */
216 DataArray::getHeapMemorySize() const;
217 DataArray::copyPartOfStringInfoFrom(const DataArray& other, const std::vector<int>& compoIds);
218 DataArray::copyPartOfStringInfoFrom2(const std::vector<int>& compoIds, const DataArray& other);
219 DataArray::areInfoEqualsIfNotWhy(const DataArray& other, std::string& reason) const;
220 DataArray::reprWithoutNameStream(std::ostream& stream) const;
221 DataArray::cppRepr(const char *varName) const;
222 DataArray::getInfoOnComponents() const;
223 DataArray::getInfoOnComponents();
224 DataArray::getVarsOnComponent() const;
225 DataArray::getUnitsOnComponent() const;
226 DataArray::getInfoOnComponent(int i) const;
227 DataArray::checkNbOfTuples(int nbOfTuples, const char *msg) const;
228 DataArray::checkNbOfComps(int nbOfCompo, const char *msg) const;
229 DataArray::checkNbOfTuplesAndComp(const DataArray& other, const char *msg) const throw(INTERP_KERNEL::Exception);
230 DataArray::checkNbOfTuplesAndComp(int nbOfTuples, int nbOfCompo, const char *msg) const throw(INTERP_KERNEL::Exception);
231 DataArray::GetNumberOfItemGivenBES(int begin, int end, int step, const char *msg);
232 DataArray::GetNumberOfItemGivenBESRelative(int begin, int end, int step, const char *msg);
233 DataArray::GetPosOfItemGivenBESRelativeNoThrow(int value, int begin, int end, int step);
234 DataArray::reprCppStream(const char *varName, std::ostream& stream) const;
235 DataArray::DataArray();
236 DataArray::CheckValueInRange(int ref, int value, const char *msg);
237 DataArray::CheckValueInRangeEx(int value, int start, int end, const char *msg);
238 DataArray::CheckClosingParInRange(int ref, int value, const char *msg);
239 std::string DataArray::_name;
240 std::vector<std::string> DataArray::_info_on_compo;
243 //================================================================================
244 /////////////////////// DataArrayDouble GROUPPING ////////////////////////////////
245 //================================================================================
247 /*! \name Basic API */
249 DataArrayDouble::isAllocated() const;
250 DataArrayDouble::setInfoAndChangeNbOfCompo(const std::vector<std::string>& info);
251 DataArrayDouble::doubleValue() const;
252 DataArrayDouble::empty() const;
253 DataArrayDouble::deepCpy() const;
254 DataArrayDouble::performCpy(bool deepCpy) const;
255 DataArrayDouble::cpyFrom(const DataArrayDouble& other);
256 DataArrayDouble::alloc(int nbOfTuple, int nbOfCompo);
257 DataArrayDouble::allocIfNecessary(int nbOfTuple, int nbOfCompo);
258 DataArrayDouble::fillWithZero();
259 DataArrayDouble::fillWithValue(double val);
260 DataArrayDouble::iota(double init=0.);
261 DataArrayDouble::isUniform(double val, double eps) const;
262 DataArrayDouble::sort(bool asc=true);
263 DataArrayDouble::reverse();
264 DataArrayDouble::checkMonotonic(bool increasing, double eps) const;
265 DataArrayDouble::isMonotonic(bool increasing, double eps) const;
266 DataArrayDouble::repr() const;
267 DataArrayDouble::isEqual(const DataArrayDouble& other, double prec) const;
268 DataArrayDouble::isEqualWithoutConsideringStr(const DataArrayDouble& other, double prec) const;
269 DataArrayDouble::reAlloc(int nbOfTuples);
270 DataArrayDouble::convertToIntArr() const;
271 DataArrayDouble::fromNoInterlace() const;
272 DataArrayDouble::toNoInterlace() const;
273 DataArrayDouble::renumberInPlace(const int* old2New);
274 DataArrayDouble::renumberInPlaceR(const int* new2Old);
275 DataArrayDouble::renumber(const int* old2New) const;
276 DataArrayDouble::renumberR(const int* new2Old) const;
277 DataArrayDouble::renumberAndReduce(const int* old2New, int newNbOfTuple) const;
278 DataArrayDouble::selectByTupleId(const int* new2OldBg, const int* new2OldEnd) const;
279 DataArrayDouble::selectByTupleIdSafe(const int* new2OldBg, const int* new2OldEnd) const;
280 DataArrayDouble::selectByTupleId2(int bg, int end2, int step) const;
281 DataArrayDouble::selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const;
282 DataArrayDouble::substr(int tupleIdBg, int tupleIdEnd=-1) const;
283 DataArrayDouble::rearrange(int newNbOfCompo);
284 DataArrayDouble::transpose();
285 DataArrayDouble::changeNbOfComponents(int newNbOfComp, double dftValue) const;
286 DataArrayDouble::keepSelectedComponents(const std::vector<int>& compoIds) const;
287 DataArrayDouble::meldWith(const DataArrayDouble* other);
288 DataArrayDouble::findCommonTuples(double prec, int limitTupleId, DataArrayInt *&comm, DataArrayInt *&commIndex) const;
289 DataArrayDouble::getDifferentValues(double prec, int limitTupleId=-1) const;
290 DataArrayDouble::setSelectedComponents(const DataArrayDouble* a, const std::vector<int>& compoIds);
291 DataArrayDouble::setPartOfValues1(const DataArrayDouble* a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
292 DataArrayDouble::setPartOfValuesSimple1(double a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp);
293 DataArrayDouble::setPartOfValues2(const DataArrayDouble* a, const int* bgTuples, const int* endTuples, const int* bgComp, const int* endComp, bool strictCompoCompare=true);
294 DataArrayDouble::setPartOfValuesSimple2(double a, const int* bgTuples, const int* endTuples, const int* bgComp, const int* endComp);
295 DataArrayDouble::setPartOfValues3(const DataArrayDouble* a, const int* bgTuples, const int* endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
296 DataArrayDouble::setPartOfValuesSimple3(double a, const int* bgTuples, const int* endTuples, int bgComp, int endComp, int stepComp);
297 DataArrayDouble::getTuple(int tupleId, double* res) const;
298 DataArrayDouble::getIJ(int tupleId, int compoId) const;
299 DataArrayDouble::back() const;
300 DataArrayDouble::getIJSafe(int tupleId, int compoId) const;
301 DataArrayDouble::setIJ(int tupleId, int compoId, double newVal);
302 DataArrayDouble::setIJSilent(int tupleId, int compoId, double newVal);
303 DataArrayDouble::writeOnPlace(int id, double element0, const double* others, int sizeOfOthers);
304 DataArrayDouble::checkNoNullValues() const;
305 DataArrayDouble::getMinMaxPerComponent(double* bounds) const;
306 DataArrayDouble::getMaxValue(int& tupleId) const;
307 DataArrayDouble::getMaxValueInArray() const;
308 DataArrayDouble::getMinValue(int& tupleId) const;
309 DataArrayDouble::getMinValueInArray() const;
310 DataArrayDouble::getMaxValue2(DataArrayInt*& tupleIds) const;
311 DataArrayDouble::getMinValue2(DataArrayInt*& tupleIds) const;
312 DataArrayDouble::getAverageValue() const;
313 DataArrayDouble::norm2() const;
314 DataArrayDouble::normMax() const;
315 DataArrayDouble::accumulate(double* res) const;
316 DataArrayDouble::accumulate(int compId) const;
317 DataArrayDouble::fromPolarToCart() const;
318 DataArrayDouble::fromCylToCart() const;
319 DataArrayDouble::fromSpherToCart() const;
320 DataArrayDouble::doublyContractedProduct() const;
321 DataArrayDouble::determinant() const;
322 DataArrayDouble::eigenValues() const;
323 DataArrayDouble::eigenVectors() const;
324 DataArrayDouble::inverse() const;
325 DataArrayDouble::trace() const;
326 DataArrayDouble::deviator() const;
327 DataArrayDouble::magnitude() const;
328 DataArrayDouble::maxPerTuple() const;
329 DataArrayDouble::sortPerTuple(bool asc);
330 DataArrayDouble::abs();
331 DataArrayDouble::applyLin(double a, double b, int compoId);
332 DataArrayDouble::applyLin(double a, double b);
333 DataArrayDouble::applyInv(double numerator);
334 DataArrayDouble::negate() const;
335 DataArrayDouble::applyFunc(int nbOfComp, const char* func) const;
336 DataArrayDouble::applyFunc(const char* func) const;
337 DataArrayDouble::applyFunc2(int nbOfComp, const char* func) const;
338 DataArrayDouble::applyFunc3(int nbOfComp, const std::vector<std::string>& varsOrder, const char* func) const;
339 DataArrayDouble::getIdsInRange(double vmin, double vmax) const;
340 DataArrayDouble::addEqual(const DataArrayDouble* other);
341 DataArrayDouble::substractEqual(const DataArrayDouble* other);
342 DataArrayDouble::multiplyEqual(const DataArrayDouble* other);
343 DataArrayDouble::divideEqual(const DataArrayDouble* other);
344 DataArrayDouble::updateTime() const;
345 DataArrayDouble::New();
346 DataArrayDouble::Aggregate(const DataArrayDouble* a1, const DataArrayDouble* a2);
347 DataArrayDouble::Aggregate(const std::vector<const DataArrayDouble *>& arr);
348 DataArrayDouble::Meld(const DataArrayDouble* a1, const DataArrayDouble* a2);
349 DataArrayDouble::Meld(const std::vector<const DataArrayDouble *>& arr);
350 DataArrayDouble::Dot(const DataArrayDouble* a1, const DataArrayDouble* a2);
351 DataArrayDouble::CrossProduct(const DataArrayDouble* a1, const DataArrayDouble* a2);
352 DataArrayDouble::Max(const DataArrayDouble* a1, const DataArrayDouble* a2);
353 DataArrayDouble::Min(const DataArrayDouble* a1, const DataArrayDouble* a2);
354 DataArrayDouble::Add(const DataArrayDouble* a1, const DataArrayDouble* a2);
355 DataArrayDouble::Substract(const DataArrayDouble* a1, const DataArrayDouble* a2);
356 DataArrayDouble::Multiply(const DataArrayDouble* a1, const DataArrayDouble* a2);
357 DataArrayDouble::Divide(const DataArrayDouble* a1, const DataArrayDouble* a2);
360 /*! \name Advanced API */
362 DataArrayDouble::checkAllocated() const;
363 DataArrayDouble::setPartOfValuesAdv(const DataArrayDouble* a, const DataArrayInt* tuplesSelec);
364 DataArrayDouble::setContigPartOfSelectedValues(int tupleIdStart, const DataArrayDouble* a, const DataArrayInt* tuplesSelec);
365 DataArrayDouble::setContigPartOfSelectedValues2(int tupleIdStart, const DataArrayDouble* a, int bg, int end2, int step);
366 DataArrayDouble::applyFunc(int nbOfComp, FunctionToEvaluate func) const;
369 /*! \name Others... */
371 DataArrayDouble::getNumberOfTuples() const;
372 DataArrayDouble::getNbOfElems() const;
373 DataArrayDouble::getHeapMemorySize() const;
374 DataArrayDouble::reserve(int nbOfElems);
375 DataArrayDouble::pushBackSilent(double val);
376 DataArrayDouble::popBackSilent();
377 DataArrayDouble::pack() const;
378 DataArrayDouble::getNbOfElemAllocated() const;
379 DataArrayDouble::reprZip() const;
380 DataArrayDouble::writeVTK(std::ostream& ofs, int indent, const char* nameInFile) const;
381 DataArrayDouble::reprStream(std::ostream& stream) const;
382 DataArrayDouble::reprZipStream(std::ostream& stream) const;
383 DataArrayDouble::reprWithoutNameStream(std::ostream& stream) const;
384 DataArrayDouble::reprZipWithoutNameStream(std::ostream& stream) const;
385 DataArrayDouble::reprCppStream(const char* varName, std::ostream& stream) const;
386 DataArrayDouble::isEqualIfNotWhy(const DataArrayDouble& other, double prec, std::string& reason) const;
387 DataArrayDouble::duplicateEachTupleNTimes(int nbTimes) const;
388 DataArrayDouble::setPartOfValues4(const DataArrayDouble* a, int bgTuples, int endTuples, int stepTuples, const int* bgComp, const int* endComp, bool strictCompoCompare=true);
389 DataArrayDouble::setPartOfValuesSimple4(double a, int bgTuples, int endTuples, int stepTuples, const int* bgComp, const int* endComp);
390 DataArrayDouble::getPointer();
391 DataArrayDouble::SetArrayIn(DataArrayDouble* newArray, DataArrayDouble* &arrayToSet);
392 DataArrayDouble::iterator();
393 DataArrayDouble::getConstPointer() const;
394 DataArrayDouble::begin() const;
395 DataArrayDouble::end() const;
396 DataArrayDouble::useArray(const double* array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo);
397 DataArrayDouble::useExternalArrayWithRWAccess(const double* array, int nbOfTuple, int nbOfCompo);
398 DataArrayDouble::insertAtTheEnd(InputIterator first, InputIterator last);
399 DataArrayDouble::computeBBoxPerTuple(double epsilon=0.0) const;
400 DataArrayDouble::computeTupleIdsNearTuples(const DataArrayDouble* other, double eps, DataArrayInt *& c, DataArrayInt *& cI) const;
401 DataArrayDouble::recenterForMaxPrecision(double eps);
402 DataArrayDouble::distanceToTuple(const double* tupleBg, const double* tupleEnd, int& tupleId) const;
403 DataArrayDouble::buildEuclidianDistanceDenseMatrix() const;
404 DataArrayDouble::buildEuclidianDistanceDenseMatrixWith(const DataArrayDouble* other) const;
405 DataArrayDouble::applyFuncFast32(const char* func);
406 DataArrayDouble::applyFuncFast64(const char* func);
407 DataArrayDouble::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
408 DataArrayDouble::getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
409 DataArrayDouble::resizeForUnserialization(const std::vector<int>& tinyInfoI);
410 DataArrayDouble::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
412 DataArrayDouble::findCommonTuplesAlg(const double* bbox, int nbNodes, int limitNodeId, double prec, DataArrayInt* c, DataArrayInt* cI) const;
414 DataArrayDouble::FindTupleIdsNearTuplesAlg(const BBTree<SPACEDIM,int>& myTree, const double* pos, int nbOfTuples, double eps, DataArrayInt* c, DataArrayInt* cI);
415 DataArrayDouble::DataArrayDouble();
416 MemArray<double> DataArrayDouble::_mem;
419 //================================================================================
420 /////////////////////// DataArrayInt GROUPPING ///////////////////////////////////
421 //================================================================================
423 /*! \name Advanced API */
425 DataArrayInt::checkAllocated() const;
426 DataArrayInt::getHashCode() const;
427 DataArrayInt::buildPermutationArr(const DataArrayInt& other) const;
428 DataArrayInt::transformWithIndArr(const int* indArrBg, const int* indArrEnd);
429 DataArrayInt::transformWithIndArrR(const int* indArrBg, const int* indArrEnd) const;
430 DataArrayInt::splitByValueRange(const int* arrBg, const int* arrEnd,DataArrayInt *& castArr, DataArrayInt *& rankInsideCast, DataArrayInt *& castsPresent) const;
431 DataArrayInt::setPartOfValuesAdv(const DataArrayInt* a, const DataArrayInt* tuplesSelec);
432 DataArrayInt::setContigPartOfSelectedValues(int tupleIdStart, const DataArrayInt*a, const DataArrayInt* tuplesSelec);
433 DataArrayInt::setContigPartOfSelectedValues2(int tupleIdStart, const DataArrayInt* a, int bg, int end2, int step);
434 DataArrayInt::SetArrayIn(DataArrayInt* newArray, DataArrayInt* &arrayToSet);
437 /*! \name Basic API */
439 DataArrayInt::isAllocated() const;
440 DataArrayInt::setInfoAndChangeNbOfCompo(const std::vector<std::string>& info);
441 DataArrayInt::intValue() const;
442 DataArrayInt::empty() const;
443 DataArrayInt::deepCpy() const;
444 DataArrayInt::performCpy(bool deepCpy) const;
445 DataArrayInt::cpyFrom(const DataArrayInt& other);
446 DataArrayInt::alloc(int nbOfTuple, int nbOfCompo);
447 DataArrayInt::allocIfNecessary(int nbOfTuple, int nbOfCompo);
448 DataArrayInt::isEqual(const DataArrayInt& other) const;
449 DataArrayInt::isEqualWithoutConsideringStr(const DataArrayInt& other) const;
450 DataArrayInt::isEqualWithoutConsideringStrAndOrder(const DataArrayInt& other) const;
451 DataArrayInt::sort(bool asc=true);
452 DataArrayInt::reverse();
453 DataArrayInt::fillWithZero();
454 DataArrayInt::fillWithValue(int val);
455 DataArrayInt::iota(int init=0);
456 DataArrayInt::repr() const;
457 DataArrayInt::invertArrayO2N2N2O(int newNbOfElem) const;
458 DataArrayInt::invertArrayN2O2O2N(int oldNbOfElem) const;
459 DataArrayInt::reAlloc(int nbOfTuples);
460 DataArrayInt::convertToDblArr() const;
461 DataArrayInt::fromNoInterlace() const;
462 DataArrayInt::toNoInterlace() const;
463 DataArrayInt::renumberInPlace(const int* old2New);
464 DataArrayInt::renumberInPlaceR(const int* new2Old);
465 DataArrayInt::renumber(const int* old2New) const;
466 DataArrayInt::renumberR(const int* new2Old) const;
467 DataArrayInt::renumberAndReduce(const int* old2NewBg, int newNbOfTuple) const;
468 DataArrayInt::selectByTupleId(const int* new2OldBg, const int* new2OldEnd) const;
469 DataArrayInt::selectByTupleIdSafe(const int* new2OldBg, const int* new2OldEnd) const;
470 DataArrayInt::selectByTupleId2(int bg, int end, int step) const;
471 DataArrayInt::selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const;
472 DataArrayInt::checkAndPreparePermutation() const;
473 DataArrayInt::changeSurjectiveFormat(int targetNb, DataArrayInt *&arr, DataArrayInt *&arrI) const;
474 DataArrayInt::buildPermArrPerLevel() const;
475 DataArrayInt::isIdentity() const;
476 DataArrayInt::isUniform(int val) const;
477 DataArrayInt::substr(int tupleIdBg, int tupleIdEnd=-1) const;
478 DataArrayInt::rearrange(int newNbOfCompo);
479 DataArrayInt::transpose();
480 DataArrayInt::changeNbOfComponents(int newNbOfComp, int dftValue) const;
481 DataArrayInt::keepSelectedComponents(const std::vector<int>& compoIds) const;
482 DataArrayInt::meldWith(const DataArrayInt* other);
483 DataArrayInt::setSelectedComponents(const DataArrayInt* a, const std::vector<int>& compoIds);
484 DataArrayInt::setPartOfValues1(const DataArrayInt* a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
485 DataArrayInt::setPartOfValuesSimple1(int a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp);
486 DataArrayInt::setPartOfValues2(const DataArrayInt* a, const int* bgTuples, const int* endTuples, const int* bgComp, const int* endComp, bool strictCompoCompare=true);
487 DataArrayInt::setPartOfValuesSimple2(int a, const int* bgTuples, const int* endTuples, const int* bgComp, const int* endComp);
488 DataArrayInt::setPartOfValues3(const DataArrayInt* a, const int* bgTuples, const int* endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
489 DataArrayInt::setPartOfValuesSimple3(int a, const int* bgTuples, const int* endTuples, int bgComp, int endComp, int stepComp);
490 DataArrayInt::getTuple(int tupleId, int* res) const;
491 DataArrayInt::getIJ(int tupleId, int compoId) const;
492 DataArrayInt::getIJSafe(int tupleId, int compoId) const;
493 DataArrayInt::back() const;
494 DataArrayInt::setIJ(int tupleId, int compoId, int newVal);
495 DataArrayInt::setIJSilent(int tupleId, int compoId, int newVal);
496 DataArrayInt::getPointer();
497 DataArrayInt::getConstPointer() const;
498 DataArrayInt::getIdsEqual(int val) const;
499 DataArrayInt::getIdsNotEqual(int val) const;
500 DataArrayInt::getIdsEqualList(const int* valsBg, const int* valsEnd) const;
501 DataArrayInt::getIdsNotEqualList(const int* valsBg, const int* valsEnd) const;
502 DataArrayInt::changeValue(int oldValue, int newValue);
503 DataArrayInt::presenceOfValue(int value) const;
504 DataArrayInt::presenceOfValue(const std::vector<int>& vals) const;
505 DataArrayInt::getMaxValue(int& tupleId) const;
506 DataArrayInt::getMaxValueInArray() const;
507 DataArrayInt::getMinValue(int& tupleId) const;
508 DataArrayInt::getMinValueInArray() const;
510 DataArrayInt::applyLin(int a, int b, int compoId);
511 DataArrayInt::applyLin(int a, int b);
512 DataArrayInt::applyInv(int numerator);
513 DataArrayInt::negate() const;
514 DataArrayInt::applyDivideBy(int val);
515 DataArrayInt::applyModulus(int val);
516 DataArrayInt::applyRModulus(int val);
517 DataArrayInt::buildComplement(int nbOfElement) const;
518 DataArrayInt::buildSubstraction(const DataArrayInt* other) const;
519 DataArrayInt::buildUnion(const DataArrayInt* other) const;
520 DataArrayInt::buildIntersection(const DataArrayInt* other) const;
521 DataArrayInt::deltaShiftIndex() const;
522 DataArrayInt::computeOffsets();
523 DataArrayInt::computeOffsets2();
524 DataArrayInt::buildExplicitArrByRanges(const DataArrayInt* offsets) const;
525 DataArrayInt::useArray(const int* array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo);
526 DataArrayInt::writeOnPlace(int id, int element0, const int* others, int sizeOfOthers);
527 DataArrayInt::addEqual(const DataArrayInt* other);
528 DataArrayInt::substractEqual(const DataArrayInt* other);
529 DataArrayInt::multiplyEqual(const DataArrayInt* other);
530 DataArrayInt::divideEqual(const DataArrayInt* other);
531 DataArrayInt::modulusEqual(const DataArrayInt* other);
532 DataArrayInt::updateTime() const;
534 DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2(int nbOfOldTuples, const int* arr, const int* arrIBg, const int* arrIEnd, int &newNbOfTuples);
535 DataArrayInt::Aggregate(const DataArrayInt* a1, const DataArrayInt* a2, int offsetA2);
536 DataArrayInt::Aggregate(const std::vector<const DataArrayInt *>& arr);
537 DataArrayInt::Meld(const DataArrayInt* a1, const DataArrayInt* a2);
538 DataArrayInt::Meld(const std::vector<const DataArrayInt *>& arr);
539 DataArrayInt::MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups);
540 DataArrayInt::BuildUnion(const std::vector<const DataArrayInt *>& arr);
541 DataArrayInt::BuildIntersection(const std::vector<const DataArrayInt *>& arr);
542 DataArrayInt::Add(const DataArrayInt* a1, const DataArrayInt* a2);
543 DataArrayInt::Substract(const DataArrayInt* a1, const DataArrayInt* a2);
544 DataArrayInt::Multiply(const DataArrayInt* a1, const DataArrayInt* a2);
545 DataArrayInt::Divide(const DataArrayInt* a1, const DataArrayInt* a2);
546 DataArrayInt::Modulus(const DataArrayInt* a1, const DataArrayInt* a2);
547 DataArrayInt::CheckAndPreparePermutation(const int* start, const int* end);
548 DataArrayInt::Range(int begin, int end, int step);
551 /*! \name Others... */
553 DataArrayInt::getNumberOfTuples() const;
554 DataArrayInt::getNbOfElems() const;
555 DataArrayInt::getHeapMemorySize() const;
556 DataArrayInt::reserve(int nbOfElems);
557 DataArrayInt::pushBackSilent(int val);
558 DataArrayInt::popBackSilent();
559 DataArrayInt::pack() const;
560 DataArrayInt::getNbOfElemAllocated() const;
561 DataArrayInt::isEqualIfNotWhy(const DataArrayInt& other, std::string& reason) const;
562 DataArrayInt::checkMonotonic(bool increasing) const;
563 DataArrayInt::isMonotonic(bool increasing) const;
564 DataArrayInt::checkStrictlyMonotonic(bool increasing) const;
565 DataArrayInt::isStrictlyMonotonic(bool increasing) const;
566 DataArrayInt::reprZip() const;
567 DataArrayInt::writeVTK(std::ostream& ofs, int indent, const char* type, const char* nameInFile) const;
568 DataArrayInt::reprStream(std::ostream& stream) const;
569 DataArrayInt::reprZipStream(std::ostream& stream) const;
570 DataArrayInt::reprWithoutNameStream(std::ostream& stream) const;
571 DataArrayInt::reprZipWithoutNameStream(std::ostream& stream) const;
572 DataArrayInt::reprCppStream(const char* varName, std::ostream& stream) const;
573 DataArrayInt::invertArrayO2N2N2OBis(int newNbOfElem) const;
574 DataArrayInt::setPartOfValues4(const DataArrayInt* a, int bgTuples, int endTuples, int stepTuples, const int* bgComp, const int* endComp, bool strictCompoCompare=true);
575 DataArrayInt::setPartOfValuesSimple4(int a, int bgTuples, int endTuples, int stepTuples, const int* bgComp, const int* endComp);
576 DataArrayInt::iterator();
577 DataArrayInt::begin() const;
578 DataArrayInt::end() const;
579 DataArrayInt::locateTuple(const std::vector<int>& tupl) const;
580 DataArrayInt::locateValue(int value) const;
581 DataArrayInt::locateValue(const std::vector<int>& vals) const;
582 DataArrayInt::search(const std::vector<int>& vals) const;
583 DataArrayInt::presenceOfTuple(const std::vector<int>& tupl) const;
584 DataArrayInt::accumulate(int* res) const;
585 DataArrayInt::accumulate(int compId) const;
586 DataArrayInt::getIdsInRange(int vmin, int vmax) const;
587 DataArrayInt::buildSubstractionOptimized(const DataArrayInt* other) const;
588 DataArrayInt::buildUnique() const;
589 DataArrayInt::findRangeIdForEachTuple(const DataArrayInt* ranges) const;
590 DataArrayInt::findIdInRangeForEachTuple(const DataArrayInt* ranges) const;
591 DataArrayInt::duplicateEachTupleNTimes(int nbTimes) const;
592 DataArrayInt::getDifferentValues() const;
593 > DataArrayInt::partitionByDifferentValues(std::vector<int>& differentIds) const;
594 DataArrayInt::useExternalArrayWithRWAccess(const int* array, int nbOfTuple, int nbOfCompo);
596 DataArrayInt::insertAtTheEnd(InputIterator first, InputIterator last);
597 DataArrayInt::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
598 DataArrayInt::getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
599 DataArrayInt::resizeForUnserialization(const std::vector<int>& tinyInfoI);
600 DataArrayInt::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
601 DataArrayInt::DataArrayInt();
602 MemArray<int> DataArrayInt::_mem;