4 #include "MEDMEM_Exception.hxx"
5 #include "MEDMEM_define.hxx"
6 #include "MEDMEM_PointerOf.hxx"
10 A template class to generate an array of any particular type (int, long,
11 float, double) for our purpose in the MED++ library.\n\n
13 Arrays can be stored in MED_FULL_INTERLACE mode (ie : x1,y1,z1,x2,y2,z2...) or
14 in MED_NO_INTERLACE mode ( x1,x2,..xn, y1, y2 ..,yn,z1,...,zn).\n The alternate
15 representation mode is calculate ONLY when it is usefull. We assure coherency
16 for minor data modifications (element, line or column) if you use set methods.
17 But, if you get a pointer and modify the array, no automatical coherency is possible.
18 You can use calculateOther to force a recalculation and insure the coherency.\n
19 No recalculation is done, when the entire array is modified.\n
20 Theses arrays are "Med like" arrays; lower bound equals 1. (first element is element 1,
21 first coordinate is coordinate 1). \n
23 Available constructors are :\n
25 - default constructor (not very usefull)\n
26 - constructor asking for array dimensions and mode (does memory allocation for you)\n
27 - constructor asking for array dimensions, mode and values (doesn't do memory allocation
28 but copies pointers only.)\n
29 - a copy constructor which copies only pointers.\n
30 (be aware of coherency)
31 - a copy constructor which copies data (deepcopy).\n
32 - assignement operator is also available and only copies pointers (and not data).\n\n
34 Attribute "pointers" aren't standard pointers but class PointerOf objects in order to simplify
37 A simple test program (testUArray) allows to test this class.
41 template <class T> class MEDARRAY
45 /*! leading dimension of value (example : space dimension for coordinates) */
47 /*! length of values (example : number of nodes for coordinates) */
49 /*! data access mode. possible values are :\n
50 - MED_FULL_INTERLACE (default mode) \n
52 MED_EN::medModeSwitch _mode;
53 /*! Pointer to representation in mode MED_FULL_INTERLACE */
54 PointerOf <T> _valuesFull;
55 /*! Pointer to representation in mode MED_NO_INTERLACE */
56 PointerOf <T> _valuesNo;
57 /*! Pointer to representation in mode _mode */
58 PointerOf <T> _valuesDefault;
59 /*! Pointer to representation in the other mode (!=_mode) */
60 PointerOf <T> _valuesOther;
67 MEDARRAY (const int ld_values, const int length_values,
68 const MED_EN::medModeSwitch mode=MED_EN::MED_FULL_INTERLACE);
69 MEDARRAY (T* values, const int ld_values,
70 const int length_values, const MED_EN::medModeSwitch mode=MED_EN::MED_FULL_INTERLACE,bool shallowCopy=false, bool ownershipOfValues=false);
71 MEDARRAY (MEDARRAY const &m);
72 MEDARRAY (MEDARRAY const &m, bool copyOther);
73 MEDARRAY & operator = (const MEDARRAY & m);
75 MEDARRAY & shallowCopy(const MEDARRAY & m);
77 inline int getLeadingValue() const;
78 inline int getLengthValue() const;
80 const T * get (const MED_EN::medModeSwitch mode) ;
81 const T * getRow (const int i) ;
82 const T * getColumn (const int j) ;
83 const T getIJ (const int i, const int j) const;
84 // T * const get (const MED_EN::medModeSwitch mode) const;
85 // T * const getRow (const int i) const;
86 // T * const getColumn (const int j) const;
87 // T const getIJ (const int i, const int j) const;
89 inline MED_EN::medModeSwitch getMode() const;
91 void set (const MED_EN::medModeSwitch mode,const T* value);
92 void setI (const int i, const T* value);
93 void setJ (const int j, const T* value);
94 void setIJ (const int i, const int j, const T value);
96 void calculateOther();
97 bool isOtherCalculated() const {return (const T*)_valuesOther != NULL;}
98 void clearOtherMode();
101 //-------------------------------------------------//
103 // IMPLEMENTED CODE //
105 //-------------------------------------------------//
108 template <class T> inline MEDARRAY<T>::MEDARRAY():
109 _ldValues(0), _lengthValues(0), _mode(MED_EN::MED_FULL_INTERLACE),
110 _valuesFull(), _valuesNo(),
111 _valuesDefault(), _valuesOther()
115 // ------------------
117 template <class T> inline MEDARRAY<T>::~MEDARRAY()
121 // ------------------
123 /*! This constructor does allocation and does not set values : \n.
124 It allocates a "T" array of length_values*ld_values length.\n
125 You don't have to know the T values when calling this construtor
126 but you have to call "set" method to initialize them later.
127 You also can get the pointer to the memory zone (with "get" method),
129 The desallocation of T array is not your responsability. \n\n
130 Throws MEDEXCEPTION if T array length is < 1*/
132 template <class T> MEDARRAY<T>::MEDARRAY(const int ld_values,
133 const int length_values,
134 const MED_EN::medModeSwitch mode):
136 _ldValues(ld_values),
137 _lengthValues(length_values),
139 _valuesFull(), _valuesNo(),
140 _valuesDefault(),_valuesOther()
142 // BEGIN_OF("constructor MEDARRAY<T>::MEDARRAY(const int, const int, const medModeSwitch)");
144 // if ld_values < 1 or length_values < 1
145 // throws an exception
146 // Pointers are setted to NULL
148 if ((ld_values<1)|(length_values<1))
150 throw MEDEXCEPTION(LOCALIZED("MEDARRAY<T>::MEDARRAY(const int, const int, const medModeSwitch) : dimension < 1 !"));
153 if ( _mode == MED_EN::MED_FULL_INTERLACE)
155 _valuesFull.set(length_values*ld_values);
156 _valuesDefault.set((T*) _valuesFull);
160 ASSERT (_mode == MED_EN::MED_NO_INTERLACE);
161 _valuesNo.set(length_values*ld_values);
162 _valuesDefault.set((T*)_valuesNo);
165 ASSERT( (T*)_valuesDefault != NULL);
166 // SCRUTE((T*)_valuesDefault);
167 // SCRUTE((T*)_valuesOther);
168 // SCRUTE((T*)_valuesNo);
169 // SCRUTE((T*)_valuesFull);
171 // END_OF("constructor MEDARRAY<T>::MEDARRAY(const int, const int, const medModeSwitch ()");
174 // ------------------
176 /*! This constructor duplicate T*values.\n
178 Throws MEDEXCEPTION if the lenght of T is < 1*/
179 template <class T> MEDARRAY<T>::MEDARRAY( T*values,
181 const int length_values,
182 const MED_EN::medModeSwitch mode,
184 bool ownershipOfValues):
185 _ldValues(ld_values),
186 _lengthValues(length_values),
188 _valuesFull(),_valuesNo(),
189 _valuesDefault(),_valuesOther()
191 // BEGIN_OF("constructor MEDARRAY<T>::MEDARRAY(T* values, const int, const int, const medModeSwitch)");
193 // if ld_values < 1 or length_values < 1, we could not allocate
194 // throws an exception
196 if ( (ld_values<1) | (length_values<1) )
198 throw MEDEXCEPTION(LOCALIZED("MEDARRAY<T>::MEDARRAY(T* values, const int, const medModeSwitch) : dimension < 1 !"));
200 if ( _mode == MED_EN::MED_FULL_INTERLACE)
204 if(ownershipOfValues)
206 _valuesFull.setShallowAndOwnership((const T*)values);
210 _valuesFull.set((const T*)values);
215 _valuesFull.set(_ldValues*length_values,values);
217 _valuesDefault.set((T*)_valuesFull);
221 ASSERT (_mode == MED_EN::MED_NO_INTERLACE);
224 if(ownershipOfValues)
226 _valuesNo.setShallowAndOwnership((const T*)values);
230 _valuesNo.set((const T*)values);
234 _valuesNo.set(_ldValues*length_values,values);
235 _valuesDefault.set((T*)_valuesNo);
237 ASSERT( (T*)_valuesDefault != NULL);
238 // SCRUTE((T*)_valuesDefault);
239 // SCRUTE((T*)_valuesOther);
240 // SCRUTE((T*)_valuesNo);
241 // SCRUTE((T*)_valuesFull);
243 // END_OF("constructor MEDARRAY<T>::MEDARRAY(T* values, const int, const int, const medModeSwitch)");
246 // ------------------
248 /*! This constructor allocates a new medarray and does a copy of pointers\n
249 It DOES NOT copy the memory . The two objects will share the same data.\n
250 (for copying data, use constructor MEDARRAY(MEDARRAY<T> const & m,bool copyOther). */
251 template <class T> MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & m ):
252 _ldValues(m._ldValues),
253 _lengthValues(m._lengthValues),
255 _valuesFull((const T*)m._valuesFull),
256 _valuesNo((const T*)m._valuesNo),
257 _valuesDefault((const T*)m._valuesDefault),
258 _valuesOther((const T*)m._valuesOther)
260 // BEGIN_OF("constructor MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & m)");
261 ASSERT( (T*)_valuesDefault != NULL);
262 // SCRUTE((T*)_valuesDefault);
263 // SCRUTE((T*)_valuesOther);
264 // SCRUTE((T*)_valuesNo);
265 // SCRUTE((T*)_valuesFull);
266 // END_OF("constructor MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & m)");
269 /*! This constructor allocates a new array and does a copy of values
270 included in the m arrays.\n
271 If the boolean is setted to true, both representations (in full mode
272 and no interlace mode) will be copied.\n
273 Otherwise, only _valuesDefault will be copied.\n
274 Desallocation of the arrays is not your reponsability.\n\n
275 Throws MEDEXCEPTION if _valuesOther is null and copyOther equals true*/
276 template <class T> MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & p,bool copyOther ):
277 _ldValues(p._ldValues),
278 _lengthValues(p._lengthValues),
285 // BEGIN_OF("Constructeur deepCopy MEDARRAY<T>::MEDARRAY(MEDARRAY<T> const & m,bool copyOther");
287 // PG : Non, s'il n'y a rien, on test et on ne copie rien, c'est tout !
289 // if ( copyOther==true && ((const T*)p._valuesOther==NULL))
291 // throw MEDEXCEPTION("MEDARRAY MEDARRAY const &m,bool copyOther : No Other values defined and bool = true !");
294 if ( _mode == MED_EN::MED_FULL_INTERLACE)
296 _valuesFull.set(p._ldValues*p._lengthValues,(const T*)p._valuesFull);
297 _valuesDefault.set((T*)_valuesFull);
299 if ((const T*)p._valuesNo != NULL)
301 _valuesNo.set(p._ldValues*p._lengthValues,(const T*)p._valuesNo);
302 _valuesOther.set((T*)_valuesNo);
307 ASSERT (_mode == MED_EN::MED_NO_INTERLACE);
308 _valuesNo.set(p._ldValues*p._lengthValues,(const T*)p._valuesNo);
309 _valuesDefault.set((T*)_valuesNo);
311 if ((const T*)p._valuesFull != NULL)
313 _valuesFull.set(p._ldValues*p._lengthValues,(const T*)p._valuesFull);
314 _valuesOther.set((T*)_valuesFull);
319 // ------------------
321 // /*! This operator does a copy of pointers\n
322 // It DOES NOT copy of the memory.
323 // The two objects will share data.\n */
325 template <class T> MEDARRAY<T> & MEDARRAY<T>::operator = (const MEDARRAY & m)
328 // BEGIN_OF("Operator = MEDARRAY<T>");
330 _ldValues=m._ldValues;
331 _lengthValues=m._lengthValues;
336 if ((const T*) m._valuesFull !=NULL)
337 _valuesFull.set(_ldValues*_lengthValues,(const T*) m._valuesFull);
339 if ((const T*) m._valuesNo !=NULL)
340 _valuesNo.set(_ldValues*_lengthValues,(const T*) m._valuesNo);
342 if (_mode == MED_EN::MED_FULL_INTERLACE) {
343 //PN : pour enlever les warning compilateur
344 //_valuesDefault.set((const T*) _valuesFull);
345 //_valuesOther.set((const T*) _valuesNo);
346 _valuesDefault.set((T*) _valuesFull);
347 _valuesOther.set((T*) _valuesNo);
349 ASSERT (_mode == MED_EN::MED_NO_INTERLACE);
350 //PN : pour enlever les warning compilateur
351 //_valuesDefault.set((const T*) _valuesNo);
352 //_valuesOther.set((const T*) _valuesFull);
353 _valuesDefault.set((T*) _valuesNo);
354 _valuesOther.set((T*) _valuesFull);
357 // SCRUTE((T*)_valuesDefault);
358 // SCRUTE((T*)_valuesOther);
359 // SCRUTE((T*)_valuesNo);
360 // SCRUTE((T*)_valuesFull);
362 // END_OF("Operator = MEDARRAY<T>");
366 /*! Idem operator= but performs only shallow copy (just copy of pointers) of arrays contains in _valuesFull and _valuesNo \n
367 WARNING the MEDARRAY returned HAS THE OWNERSHIP OF THE ARRAY !!!! */
369 template <class T> MEDARRAY<T> & MEDARRAY<T>::shallowCopy(const MEDARRAY & m)
371 _ldValues=m._ldValues;
372 _lengthValues=m._lengthValues;
374 if ((const T*) m._valuesFull !=NULL)
375 _valuesFull.setShallowAndOwnership((const T*) m._valuesFull);
376 if ((const T*) m._valuesNo !=NULL)
377 _valuesNo.setShallowAndOwnership((const T*) m._valuesNo);
378 if (_mode == MED_EN::MED_FULL_INTERLACE) {
379 _valuesDefault.set((T*) _valuesFull);
380 _valuesOther.set((T*) _valuesNo);
382 _valuesDefault.set((T*) _valuesNo);
383 _valuesOther.set((T*) _valuesFull);
388 // ------------------
390 /*! returns _ldValues. (for example, space dimension for coordinates array)*/
391 template <class T> inline int MEDARRAY<T>::getLeadingValue() const
396 // ------------------
398 /*! returns _ldValues. (for example, number of nodes for coordinates array)*/
399 template <class T> inline int MEDARRAY<T>::getLengthValue() const
401 return _lengthValues;
404 // ------------------
406 /*! returns a pointer to _valuesDefault or _valuesOther, depending on
407 mode value : if mode is the same as _mode, _valuesDefault is returned.
408 else, if _valuesOther is calculated (if necessary) and then returned.
409 The pointer can be used to set values */
410 template <class T> const T* MEDARRAY<T>::get(const MED_EN::medModeSwitch mode)
412 // BEGIN_OF("MEDARRAY<T>::get(const medModeSwitch mode)");
413 if ((T*)_valuesDefault == NULL)
415 throw MEDEXCEPTION("MEDARRAY::get(mode) : No values defined !");
419 //PN : pour enlever les warning compilateurs
420 //return (const T*)_valuesDefault;
421 return (T*) _valuesDefault;
425 if ((T*)_valuesOther == NULL)
429 //PN : pour enlever les warning compilateurs
430 //return (const T*)_valuesDefault;
431 return (T*) _valuesOther;
435 // ------------------
437 /*! returns a pointer to ith element of the array.
438 (ith line in a MED_FULL_INTERLACE representation )\n
439 Be aware : if _mode is MED_NO_INTERLACE, the entire
440 array will be recalculate in MED_FULL_INTERLACE representation.\n*/
442 template <class T> const T* MEDARRAY<T>::getRow(const int i)
444 if ((T*)_valuesDefault == NULL)
446 throw MEDEXCEPTION("MEDARRAY::getRow(i) : No values defined !");
450 throw MEDEXCEPTION("MEDARRAY::getRow(i) : argument i must be >= 1");
454 throw MEDEXCEPTION("MEDARRAY::getRow(i) : argument i must be <= _lengthValues");
457 if ((T*)_valuesFull == NULL)
461 ASSERT((T*)_valuesFull != NULL);
463 // PN pour enlever les warning compilateurs
464 //const T* ptr = (const T*)_valuesFull + (i-1)*_ldValues;
465 const T* ptr = (T*) _valuesFull + (i-1)*_ldValues;
469 // ------------------
471 /*! this method is similar to getRow method.\n
472 It returns a pointer to jth line of the array in a MED_NO-INTERLACE representation
473 (for example, 2nd coordinates).\n
474 Be aware : if _mode is MED_FULL_INTERLACE, the entire
475 array will be recalculate in MED_NO_INTERLACE representation.\n*/
477 template <class T> const T* MEDARRAY<T>::getColumn(const int j)
479 if ((T*)_valuesDefault == NULL)
481 throw MEDEXCEPTION("MEDARRAY::getColumn(j) : No values defined !");
485 throw MEDEXCEPTION("MEDARRAY::getColumn(j) : argument j must be >= 1");
489 throw MEDEXCEPTION("MEDARRAY::getColumn(j) : argument j must be <= _ldValues");
492 if ((T*)_valuesNo == NULL)
494 ASSERT(((T*) _valuesDefault)==((T*) _valuesFull));
497 //PN pour enlever les warning compilateur
498 //const T* ptr = (const T*)_valuesNo + (j-1)*_lengthValues;
499 const T* ptr = ( T*)_valuesNo + (j-1)*_lengthValues;
504 // ------------------
506 /*! returns Jth value of Ith element .\n
507 don't forget first element is element 1 (and not element 0). */
508 template <class T> const T MEDARRAY<T>::getIJ(const int i,const int j) const
513 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : argument i must be >= 1");
517 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : argument i must be <= _lengthValues");
521 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : argument j must be >= 1");
525 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : argument j must be <= _ldValues");
528 if ( (const T*)_valuesDefault == NULL)
530 throw MEDEXCEPTION("MEDARRAY::getIJ(i,j) : No value in array !");
533 if (_mode == MED_EN::MED_FULL_INTERLACE)
535 return _valuesDefault[(i-1)*_ldValues+j-1];
539 return _valuesDefault[(j-1)*_lengthValues+i-1];
544 // ------------------
546 /*! returns the default mode (_mode)\n
547 (internal use : needed by write method) */
548 template <class T> inline MED_EN::medModeSwitch MEDARRAY<T>::getMode() const
553 // ------------------
555 /*! sets T pointer of _valuesDefault (cf class PointerOf) on value.\n
556 no copy of value is done. \n
557 the other representation mode is not recalculate.
558 the corresponding pointers are setted to null */
559 // template <class T> void MEDARRAY<T>::set(const medModeSwitch mode, const T* value)
562 // BEGIN_OF("MEDARRAY<T>::set(mode,value)");
565 // if ( _mode == MED_FULL_INTERLACE)
567 // _valuesFull.set(value);
568 // _valuesDefault.set((T*)_valuesFull);
573 // ASSERT (_mode == MED_NO_INTERLACE);
574 // _valuesNo.set(value);
575 // _valuesDefault.set((T*)_valuesNo);
576 // _valuesFull.set(0);
578 // _valuesOther.set(0);
579 // END_OF("MEDARRAY<T>::set(mode,i,value)");
582 // set with duplication because we don't know were value come and
583 // MEDARRAY must have properties on it !!!!
584 template <class T> void MEDARRAY<T>::set(const MED_EN::medModeSwitch mode, const T* value)
586 // BEGIN_OF("MEDARRAY<T>::set(mode,value)");
589 if ( _mode == MED_EN::MED_FULL_INTERLACE)
591 _valuesFull.set(_ldValues*_lengthValues,value);
592 _valuesDefault.set((T*)_valuesFull);
597 ASSERT (_mode == MED_EN::MED_NO_INTERLACE);
598 _valuesNo.set(_ldValues*_lengthValues,value);
599 _valuesDefault.set((T*)_valuesNo);
604 // END_OF("MEDARRAY<T>::set(mode,i,value)");
607 /*! This function clears the other mode of representation if it exists
608 * It is usefull for people who needs for optimisation reasons to work directly
609 * on the inside array without using set-functions
611 template <class T> void MEDARRAY<T>::clearOtherMode()
613 if(isOtherCalculated())
615 if ( _mode == MED_EN::MED_FULL_INTERLACE)
624 // ------------------
626 /*! Sets ith element to T* values\n
627 if they both exist, both _valuesFull and _valuesNo arrays will be updated.\n
628 Throws exception if i < 1 or i > _lengthValues */
629 template <class T> void MEDARRAY<T>::setI(const int i, const T* value)
631 // BEGIN_OF("MEDARRAY<T>::setI(i,value)");
633 if ((T*)_valuesDefault == NULL)
635 throw MEDEXCEPTION("MEDARRAY::setI(i,value) : No values defined !");
639 throw MEDEXCEPTION("MEDARRAY::setI(i,value) : argument i must be > 0");
641 if ( i > _lengthValues)
643 throw MEDEXCEPTION("MEDARRAY::setI(i,value) : argument i must be <= _lenghtValues");
646 if ((T*)_valuesFull != NULL)
648 for (int k = 0;k<_ldValues;k++)
650 _valuesFull[k+_ldValues*(i-1)] = value[k];
654 if ((T*)_valuesNo != NULL)
656 for (int k = 0;k<_ldValues;k++)
658 _valuesNo[k*_lengthValues +(i-1)] = value[k];
662 // END_OF("MEDARRAY::setI(i,value)");
664 // ------------------
666 /*! Sets ith element to T* values\n
667 if they both exist, both _valuesFull and _valuesNo arrays will be updated.\n
668 Throws exception if i < 1 or i > _lengthValues */
669 template <class T> void MEDARRAY<T>::setJ(const int j, const T* value)
671 // BEGIN_OF("MEDARRAY::setJ(j,value)");
672 if (( T*)_valuesDefault == NULL)
674 throw MEDEXCEPTION("MEDARRAY::setJ(j) : No values defined !");
678 throw MEDEXCEPTION("MEDARRAY::setJ(j) : argument j must be >= 1");
682 throw MEDEXCEPTION("MEDARRAY::setJ(j) : argument j must be <= _ldValues");
684 if ((T*)_valuesFull != NULL)
686 for (int k = 0;k<_lengthValues;k++)
688 _valuesFull[k*_ldValues+(j-1)] = value[k];
692 if ((T*)_valuesNo != NULL)
694 for (int k = 0;k<_lengthValues;k++)
696 _valuesNo[k+_lengthValues*(j-1)] = value[k];
699 // END_OF("MEDARRAY::setJ(j,value)");
702 // ------------------
704 /*! Sets value of Jth coordinate of Ith element to T value.\n
705 Maintains coherency.\n
706 Throws exception if we don't have
707 1<=i<=_lengthValues and 1<=j<=_ldValues */
708 template <class T> void MEDARRAY<T>::setIJ(const int i, const int j, const T value)
710 // 1<=i<=_lengthValues and 1<=j<=_ldValues
713 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : argument i must be >= 1");
715 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : argument i must be <= _lengthValues");
718 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : argument j must be >= 1");
720 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : argument j must be <= _ldValues");
722 if ((T*)_valuesDefault == NULL)
724 throw MEDEXCEPTION("MEDARRAY::setIJ(i,j,value) : No value in array !");
727 if ((T*)_valuesFull != NULL)
729 _valuesFull[j-1+_ldValues*(i-1)] = value;
731 if ((T*)_valuesNo != NULL)
733 _valuesNo[(j-1)*_lengthValues+i-1] = value;
737 /*! Calculates the other mode of representation : MED_FULL_INTERLACE
738 if __mode = MED_NO_INTERLACE and vice versa.\n
739 Throws exception if no value are setted */
740 template <class T> void MEDARRAY<T>::calculateOther()
742 // BEGIN_OF("MEDARRAY<T>::calculateOther()");
743 if ((T*)_valuesDefault == NULL)
745 throw MEDEXCEPTION("MEDARRAY::calculateOther() : No values defined !");
748 if ((T*)_valuesOther == NULL)
750 _valuesOther.set(_ldValues*_lengthValues);
752 if (_mode == MED_EN::MED_NO_INTERLACE)
754 _valuesFull.set((T*)_valuesOther);
758 ASSERT( _mode==MED_EN::MED_FULL_INTERLACE);
759 _valuesNo.set((T*)_valuesOther);
762 for (int i=0; i<_lengthValues;i++)
764 for (int j=0; j<_ldValues; j++)
766 if (_mode == MED_EN::MED_NO_INTERLACE)
768 _valuesFull[i*_ldValues+j] = _valuesNo[j*_lengthValues+i];
772 _valuesNo[j*_lengthValues+i]=_valuesFull[i*_ldValues+j];
776 // END_OF("MEDARRAY<T>::calculateOther()");
779 } //End of namespace MEDMEM
781 # endif /* # ifndef __MEDARRAY_H__ */