1 // MED MEDMEM : MED files in memory
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : MEDMEM_Array.hxx
27 #ifndef __MEDARRAY_H__
28 #define __MEDARRAY_H__
30 #include "MEDMEM_Exception.hxx"
31 #include "MEDMEM_define.hxx"
32 #include "MEDMEM_PointerOf.hxx"
33 #include "utilities.h"
35 using namespace MED_EN;
38 A template class to generate an array of any particular type (int, long,
39 float, double) for our purpose in the MED++ library./n/n
41 Arrays can be stored in MED_FULL_INTERLACE mode (ie : x1,y1,z1,x2,y2,z2...) or
42 in MED_NO_INTERLACE mode ( x1,x2,..xn, y1, y2 ..,yn,z1,...,zn)./n The alternate
43 representation mode is calculate ONLY when it is usefull. We assure coherency
44 for minor data modifications (element, line or column) if you use set methods.
45 But, if you get a pointer and modify the array, no automatical coherency is possible.
46 You can use calculateOther to force a recalculation and insure the coherency./n
47 No recalculation is done, when the entire array is modified./n
48 Theses arrays are "Med like" arrays; lower bound equals 1. (first element is element 1,
49 first coordinate is coordinate 1). /n
51 Available constructors are :/n
53 - default constructor (not very usefull)/n
54 - constructor asking for array dimensions and mode (does memory allocation for you)/n
55 - constructor asking for array dimensions, mode and values (doesn't do memory allocation
56 but copies pointers only.)/n
57 - a copy constructor which copies only pointers./n
58 (be aware of coherency)
59 - a copy constructor which copies data (deepcopy)./n
60 - assignement operator is also available and only copies pointers (and not data)./n/n
62 Attribute "pointers" aren't standard pointers but class PointerOf objects in order to simplify
65 A simple test program (testUArray) allows to test this class.
68 template <class T> class MEDARRAY
72 /*! leading dimension of value (example : space dimension for coordinates) */
74 /*! length of values (example : number of nodes for coordinates) */
75 med_int _lengthValues;
76 /*! data access mode. possible values are :\n
77 - MED_FULL_INTERLACE (default mode) \n
80 /*! Pointer to representation in mode MED_FULL_INTERLACE */
81 PointerOf <T> _valuesFull;
82 /*! Pointer to representation in mode MED_NO_INTERLACE */
83 PointerOf <T> _valuesNo;
84 /*! Pointer to representation in mode _mode */
85 PointerOf <T> _valuesDefault;
86 /*! Pointer to representation in the other mode (!=_mode) */
87 PointerOf <T> _valuesOther;
94 MEDARRAY (const med_int ld_values, const med_int length_values,
95 const medModeSwitch mode=MED_FULL_INTERLACE);
96 MEDARRAY (T* values, const med_int ld_values,
97 const med_int length_values, const medModeSwitch mode=MED_FULL_INTERLACE);
98 MEDARRAY (MEDARRAY const &m);
99 MEDARRAY (MEDARRAY const &m, bool copyOther);
100 MEDARRAY & operator = (const MEDARRAY & m);
102 inline med_int getLeadingValue() const;
103 inline med_int getLengthValue() const;
105 const T * get (const medModeSwitch mode) ;
106 const T * getRow (const med_int i) ;
107 const T * getColumn (const med_int j) ;
108 const T getIJ (const med_int i, const med_int j) const;
109 // T * const get (const medModeSwitch mode) const;
110 // T * const getRow (const med_int i) const;
111 // T * const getColumn (const med_int j) const;
112 // T const getIJ (const med_int i, const med_int j) const;
114 inline medModeSwitch getMode() const;
116 void set (const medModeSwitch mode,const T* value);
117 void setI (const med_int i, const T* value);
118 void setJ (const med_int j, const T* value);
119 void setIJ (const med_int i, const med_int j, const T value);
121 void calculateOther();
124 //-------------------------------------------------//
126 // IMPLEMENTED CODE //
128 //-------------------------------------------------//
131 template <class T> inline MEDARRAY<T>::MEDARRAY():
132 _ldValues(0), _lengthValues(0), _mode(MED_FULL_INTERLACE),
133 _valuesFull(), _valuesNo(),
134 _valuesDefault(), _valuesOther()
138 // ------------------
140 template <class T> inline MEDARRAY<T>::~MEDARRAY()
144 // ------------------
146 /*! This constructor does allocation and does not set values : \n.
147 It allocates a "T" array of length_values*ld_values length.\n
148 You don't have to know the T values when calling this construtor
149 but you have to call "set" method to initialize them later.
150 You also can get the pointer to the memory zone (with "get" method),
152 The desallocation of T array is not your responsability. \n\n
153 Throws MEDEXCEPTION if T array length is < 1*/
155 template <class T> MEDARRAY<T>::MEDARRAY(const med_int ld_values,
156 const med_int length_values,
157 const medModeSwitch mode):
159 _ldValues(ld_values),
160 _lengthValues(length_values),
162 _valuesFull(), _valuesNo(),
163 _valuesDefault(),_valuesOther()
165 BEGIN_OF("constructor MEDARRAY<T>::MEDARRAY(const med_int, const med_int, const medModeSwitch)");
167 // if ld_values < 1 or length_values < 1
168 // throws an exception
169 // Pointers are setted to NULL
171 if ((ld_values<1)|(length_values<1))
173 throw MEDEXCEPTION(LOCALIZED("MEDARRAY<T>::MEDARRAY(const med_int, const med_int, const medModeSwitch) : dimension < 1 !"));
176 if ( _mode == MED_FULL_INTERLACE)
178 _valuesFull.set(length_values*ld_values);
179 _valuesDefault.set((T*) _valuesFull);
183 ASSERT (_mode == MED_NO_INTERLACE);
184 _valuesNo.set(length_values*ld_values);
185 _valuesDefault.set((T*)_valuesNo);
188 ASSERT( (T*)_valuesDefault != NULL);
189 SCRUTE((T*)_valuesDefault);
190 SCRUTE((T*)_valuesOther);
191 SCRUTE((T*)_valuesNo);
192 SCRUTE((T*)_valuesFull);
194 END_OF("constructor MEDARRAY<T>::MEDARRAY(const med_int, const med_int, const medModeSwitch ()");
197 // ------------------
199 /*! This constructor duplicate T*values.\n
201 Throws MEDEXCEPTION if the lenght of T is < 1*/
202 template <class T> MEDARRAY<T>::MEDARRAY( T*values,
203 const med_int ld_values,
204 const med_int length_values,
205 const medModeSwitch mode):
206 _ldValues(ld_values),
207 _lengthValues(length_values),
209 _valuesFull(),_valuesNo(),
210 _valuesDefault(),_valuesOther()
212 BEGIN_OF("constructor MEDARRAY<T>::MEDARRAY(T* values, const med_int, const med_int, const medModeSwitch)");
214 // if ld_values < 1 or length_values < 1, we could not allocate
215 // throws an exception
217 if ( (ld_values<1) | (length_values<1) )
219 throw MEDEXCEPTION(LOCALIZED("MEDARRAY<T>::MEDARRAY(T* values, const med_int, const medModeSwitch) : dimension < 1 !"));
221 if ( _mode == MED_FULL_INTERLACE)
223 _valuesFull.set(_ldValues*length_values,values);
224 _valuesDefault.set((T*)_valuesFull);
228 ASSERT (_mode == MED_NO_INTERLACE);
229 _valuesNo.set(_ldValues*length_values,values);
230 _valuesDefault.set((T*)_valuesNo);
233 ASSERT( (T*)_valuesDefault != NULL);
234 SCRUTE((T*)_valuesDefault);
235 SCRUTE((T*)_valuesOther);
236 SCRUTE((T*)_valuesNo);
237 SCRUTE((T*)_valuesFull);
239 END_OF("constructor MEDARRAY<T>::MEDARRAY(T* values, const med_int, const med_int, const medModeSwitch)");
242 // ------------------
244 /*! This constructor allocates a new medarray and does a copy of pointers/n
245 It DOES NOT copy the memory . The two objects will share the same data./n
246 (for copying data, use constructor MEDARRAY(MEDARRAY<T> const & m,bool copyOther). */
247 template <class T> MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & m ):
248 _ldValues(m._ldValues),
249 _lengthValues(m._lengthValues),
251 _valuesFull((const T*)m._valuesFull),
252 _valuesNo((const T*)m._valuesNo),
253 _valuesDefault((const T*)m._valuesDefault),
254 _valuesOther((const T*)m._valuesOther)
256 BEGIN_OF("constructor MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & m)");
257 ASSERT( (T*)_valuesDefault != NULL);
258 SCRUTE((T*)_valuesDefault);
259 SCRUTE((T*)_valuesOther);
260 SCRUTE((T*)_valuesNo);
261 SCRUTE((T*)_valuesFull);
262 END_OF("constructor MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & m)");
265 /*! This constructor allocates a new array and does a copy of values
266 included in the m arrays./n
267 If the boolean is setted to true, both representations (in full mode
268 and no interlace mode) will be copied./n
269 Otherwise, only _valuesDefault will be copied./n
270 Desallocation of the arrays is not your reponsability./n/n
271 Throws MEDEXCEPTION if _valuesOther is null and copyOther equals true*/
272 template <class T> MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & p,bool copyOther ):
273 _ldValues(p._ldValues),
274 _lengthValues(p._lengthValues),
281 BEGIN_OF("Constructeur deepCopy MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & m,bool copyOther");
283 // PG : Non, s'il n'y a rien, on test et on ne copie rien, c'est tout !
285 // if ( copyOther==true && ((const T*)p._valuesOther==NULL))
287 // throw MEDEXCEPTION("MEDARRAY MEDARRAY const &m,bool copyOther : No Other values defined and bool = true !");
290 if ( _mode == MED_FULL_INTERLACE)
292 _valuesFull.set(p._ldValues*p._lengthValues,(const T*)p._valuesFull);
293 _valuesDefault.set((T*)_valuesFull);
295 if ((const T*)p._valuesNo != NULL)
297 _valuesNo.set(p._ldValues*p._lengthValues,(const T*)p._valuesNo);
298 _valuesOther.set((T*)_valuesNo);
303 ASSERT (_mode == MED_NO_INTERLACE);
304 _valuesNo.set(p._ldValues*p._lengthValues,(const T*)p._valuesNo);
305 _valuesDefault.set((T*)_valuesNo);
307 if ((const T*)p._valuesFull != NULL)
309 _valuesFull.set(p._ldValues*p._lengthValues,(const T*)p._valuesFull);
310 _valuesOther.set((T*)_valuesFull);
315 // ------------------
317 // /*! This operator does a copy of pointers/n
318 // It DOES NOT copy of the memory.
319 // The two objects will share data./n */
321 template <class T> MEDARRAY<T> & MEDARRAY<T>::MEDARRAY::operator = (const MEDARRAY & m)
324 BEGIN_OF("Operator = MEDARRAY<T>");
326 _ldValues=m._ldValues;
327 _lengthValues=m._lengthValues;
332 if ((const T*) m._valuesFull !=NULL)
333 _valuesFull.set(_ldValues*_lengthValues,(const T*) m._valuesFull);
335 if ((const T*) m._valuesNo !=NULL)
336 _valuesNo.set(_ldValues*_lengthValues,(const T*) m._valuesNo);
338 if (_mode == MED_FULL_INTERLACE) {
339 //PN : pour enlever les warning compilateur
340 //_valuesDefault.set((const T*) _valuesFull);
341 //_valuesOther.set((const T*) _valuesNo);
342 _valuesDefault.set((T*) _valuesFull);
343 _valuesOther.set((T*) _valuesNo);
345 ASSERT (_mode == MED_NO_INTERLACE);
346 //PN : pour enlever les warning compilateur
347 //_valuesDefault.set((const T*) _valuesNo);
348 //_valuesOther.set((const T*) _valuesFull);
349 _valuesDefault.set((T*) _valuesNo);
350 _valuesOther.set((T*) _valuesFull);
353 SCRUTE((T*)_valuesDefault);
354 SCRUTE((T*)_valuesOther);
355 SCRUTE((T*)_valuesNo);
356 SCRUTE((T*)_valuesFull);
358 END_OF("Operator = MEDARRAY<T>");
362 // ------------------
364 /*! returns _ldValues. (for example, space dimension for coordinates array)*/
365 template <class T> inline med_int MEDARRAY<T>::getLeadingValue() const
370 // ------------------
372 /*! returns _ldValues. (for example, number of nodes for coordinates array)*/
373 template <class T> inline med_int MEDARRAY<T>::getLengthValue() const
375 return _lengthValues;
378 // ------------------
380 /*! returns a pointer to _valuesDefault or _valuesOther, depending on
381 mode value : if mode is the same as _mode, _valuesDefault is returned.
382 else, if _valuesOther is calculated (if necessary) and then returned.
383 The pointer can be used to set values */
384 template <class T> const T* MEDARRAY<T>::get(const medModeSwitch mode)
386 BEGIN_OF("MEDARRAY<T>::get(const medModeSwitch mode)");
387 if ((T*)_valuesDefault == NULL)
389 throw MEDEXCEPTION("MEDARRAY::get(mode) : No values defined !");
393 //PN : pour enlever les warning compilateurs
394 //return (const T*)_valuesDefault;
395 return (T*) _valuesDefault;
399 if ((T*)_valuesOther == NULL)
403 //PN : pour enlever les warning compilateurs
404 //return (const T*)_valuesDefault;
405 return (T*) _valuesOther;
407 END_OF("MEDARRAY<T>::get(const medModeSwitch mode)");
410 // ------------------
412 /*! returns a pointer to ith element of the array.
413 (ith line in a MED_FULL_INTERLACE representation )/n
414 Be aware : if _mode is MED_NO_INTERLACE, the entire
415 array will be recalculate in MED_FULL_INTERLACE representation./n*/
417 template <class T> const T* MEDARRAY<T>::getRow(const med_int i)
420 BEGIN_OF("MEDARRAY<T>::getRow(const med_int i)");
422 if ((T*)_valuesDefault == NULL)
424 throw MEDEXCEPTION("MEDARRAY::getRow(i) : No values defined !");
428 throw MEDEXCEPTION("MEDARRAY::getRow(i) : argument i must be >= 1");
432 throw MEDEXCEPTION("MEDARRAY::getRow(i) : argument i must be <= _lengthValues");
435 if ((T*)_valuesFull == NULL)
437 ASSERT(((T*) _valuesDefault)==((T*) _valuesNo));
440 ASSERT((T*)_valuesFull != NULL);
442 // PN pour enlever les warning compilateurs
443 //const T* ptr = (const T*)_valuesFull + (i-1)*_ldValues;
444 const T* ptr = (T*) _valuesFull + (i-1)*_ldValues;
446 END_OF("MEDARRAY<T>::getRow(const med_int i )");
449 // ------------------
451 /*! this method is similar to getRow method./n
452 It returns a pointer to jth line of the array in a MED_NO-INTERLACE representation
453 (for example, 2nd coordinates)./n
454 Be aware : if _mode is MED_FULL_INTERLACE, the entire
455 array will be recalculate in MED_NO_INTERLACE representation./n*/
457 template <class T> const T* MEDARRAY<T>::getColumn(const med_int j)
459 BEGIN_OF("MEDARRAY<T>::getColumn(const med_int j)");
460 if ((T*)_valuesDefault == NULL)
462 throw MEDEXCEPTION("MEDARRAY::getColumn(j) : No values defined !");
466 throw MEDEXCEPTION("MEDARRAY::getColumn(j) : argument j must be >= 1");
470 throw MEDEXCEPTION("MEDARRAY::getColumn(j) : argument j must be <= _ldValues");
473 if ((T*)_valuesNo == NULL)
475 ASSERT(((T*) _valuesDefault)==((T*) _valuesFull));
478 //PN pour enlever les warning compilateur
479 //const T* ptr = (const T*)_valuesNo + (j-1)*_lengthValues;
480 const T* ptr = ( T*)_valuesNo + (j-1)*_lengthValues;
485 // ------------------
487 /*! returns Jth value of Ith element .\n
488 don't forget first element is element 1 (and not element 0). */
489 template <class T> const T MEDARRAY<T>::getIJ(const med_int i,const med_int j) const
491 BEGIN_OF("MEDARRAY<T>::getIJ(const med_int i, const med_int j)");
494 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : argument i must be >= 1");
498 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : argument i must be <= _lengthValues");
502 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : argument j must be >= 1");
506 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : argument j must be <= _ldValues");
509 if ( (const T*)_valuesDefault == NULL)
511 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : No value in array !");
514 if (_mode == MED_FULL_INTERLACE)
516 return _valuesDefault[(i-1)*_ldValues+j-1];
520 return _valuesDefault[(j-1)*_lengthValues+i-1];
522 END_OF("MEDARRAY<T>::getIJ(const med_int i, const med_int j)");
525 // ------------------
527 /*! returns the default mode (_mode)/n
528 (internal use : needed by write method) */
529 template <class T> inline medModeSwitch MEDARRAY<T>::getMode() const
531 BEGIN_OF("MEDARRAY<T>::getMode()");
532 END_OF("MEDARRAY<T>::getMode()");
536 // ------------------
538 /*! sets T pointer of _valuesDefault (cf class PointerOf) on value.\n
539 no copy of value is done. \n
540 the other representation mode is not recalculate.
541 the corresponding pointers are setted to null */
542 // template <class T> void MEDARRAY<T>::set(const medModeSwitch mode, const T* value)
545 // BEGIN_OF("MEDARRAY<T>::set(mode,value)");
548 // if ( _mode == MED_FULL_INTERLACE)
550 // _valuesFull.set(value);
551 // _valuesDefault.set((T*)_valuesFull);
556 // ASSERT (_mode == MED_NO_INTERLACE);
557 // _valuesNo.set(value);
558 // _valuesDefault.set((T*)_valuesNo);
559 // _valuesFull.set(0);
561 // _valuesOther.set(0);
562 // END_OF("MEDARRAY<T>::set(mode,i,value)");
565 // set with duplication because we don't know were value come and
566 // MEDARRAY must have properties on it !!!!
567 template <class T> void MEDARRAY<T>::set(const medModeSwitch mode, const T* value)
569 BEGIN_OF("MEDARRAY<T>::set(mode,value)");
572 if ( _mode == MED_FULL_INTERLACE)
574 _valuesFull.set(_ldValues*_lengthValues,value);
575 _valuesDefault.set((T*)_valuesFull);
580 ASSERT (_mode == MED_NO_INTERLACE);
581 _valuesNo.set(_ldValues*_lengthValues,value);
582 _valuesDefault.set((T*)_valuesNo);
587 END_OF("MEDARRAY<T>::set(mode,i,value)");
592 // ------------------
594 /*! Sets ith element to T* values\n
595 if they both exist, both _valuesFull and _valuesNo arrays will be updated./n
596 Throws exception if i < 1 or i > _lengthValues */
597 template <class T> void MEDARRAY<T>::setI(const med_int i, const T* value)
599 BEGIN_OF("MEDARRAY<T>::setI(i,value)");
601 if ((T*)_valuesDefault == NULL)
603 throw MEDEXCEPTION("MEDARRAY::setI(i,value) : No values defined !");
607 throw MEDEXCEPTION("MEDARRAY::setI(i,value) : argument i must be > 0");
609 if ( i > _lengthValues)
611 throw MEDEXCEPTION("MEDARRAY::setI(i,value) : argument i must be <= _lenghtValues");
614 if ((T*)_valuesFull != NULL)
616 for (int k = 0;k<_ldValues;k++)
618 _valuesFull[k+_ldValues*(i-1)] = value[k];
622 if ((T*)_valuesNo != NULL)
624 for (int k = 0;k<_ldValues;k++)
626 _valuesNo[k*_lengthValues +(i-1)] = value[k];
630 END_OF("MEDARRAY::setI(i,value)");
632 // ------------------
634 /*! Sets ith element to T* values\n
635 if they both exist, both _valuesFull and _valuesNo arrays will be updated./n
636 Throws exception if i < 1 or i > _lengthValues */
637 template <class T> void MEDARRAY<T>::setJ(const med_int j, const T* value)
639 BEGIN_OF("MEDARRAY::setJ(j,value)");
640 if (( T*)_valuesDefault == NULL)
642 throw MEDEXCEPTION("MEDARRAY::setJ(j) : No values defined !");
646 throw MEDEXCEPTION("MEDARRAY::setJ(j) : argument j must be >= 1");
650 throw MEDEXCEPTION("MEDARRAY::setJ(j) : argument j must be <= _ldValues");
652 if ((T*)_valuesFull != NULL)
654 for (int k = 0;k<_lengthValues;k++)
656 _valuesFull[k*_ldValues+(j-1)] = value[k];
660 if ((T*)_valuesNo != NULL)
662 for (int k = 0;k<_lengthValues;k++)
664 _valuesNo[k+_lengthValues*(j-1)] = value[k];
667 END_OF("MEDARRAY::setJ(j,value)");
670 // ------------------
672 /*! Sets value of Jth coordinate of Ith element to T value./n
673 Maintains coherency./n
674 Throws exception if we don't have
675 1<=i<=_lengthValues and 1<=j<=_ldValues */
676 template <class T> void MEDARRAY<T>::setIJ(const med_int i, const med_int j, const T value)
678 // 1<=i<=_lengthValues and 1<=j<=_ldValues
681 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : argument i must be >= 1");
683 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : argument i must be <= _lengthValues");
686 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : argument j must be >= 1");
688 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : argument j must be <= _ldValues");
690 if ((T*)_valuesDefault == NULL)
692 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : No value in array !");
695 if ((T*)_valuesFull != NULL)
697 _valuesFull[j-1+_ldValues*(i-1)] = value;
699 if ((T*)_valuesNo != NULL)
701 _valuesNo[(j-1)*_lengthValues+i-1] = value;
705 /*! Calculates the other mode of representation : MED_FULL_INTERLACE
706 if __mode = MED_NO_INTERLACE and vice versa./n
707 Throws exception if no value are setted */
708 template <class T> void MEDARRAY<T>::calculateOther()
710 BEGIN_OF("MEDARRAY<T>::calculateOther()");
711 if ((T*)_valuesDefault == NULL)
713 throw MEDEXCEPTION("MEDARRAY::calculateOther() : No values defined !");
716 if ((T*)_valuesOther == NULL)
718 _valuesOther.set(_ldValues*_lengthValues);
720 if (_mode == MED_NO_INTERLACE)
722 _valuesFull.set((T*)_valuesOther);
726 ASSERT( _mode==MED_FULL_INTERLACE);
727 _valuesNo.set((T*)_valuesOther);
730 for (int i=0; i<_lengthValues;i++)
732 for (int j=0; j<_ldValues; j++)
734 if (_mode == MED_NO_INTERLACE)
736 _valuesFull[i*_ldValues+j] = _valuesNo[j*_lengthValues+i];
740 _valuesNo[j*_lengthValues+i]=_valuesFull[i*_ldValues+j];
744 END_OF("MEDARRAY<T>::calculateOther()");
747 # endif /* # ifndef __MEDARRAY_H__ */