Index: trunk/SophyaLib/Manual/sophya.tex
===================================================================
--- trunk/SophyaLib/Manual/sophya.tex	(revision 3415)
+++ trunk/SophyaLib/Manual/sophya.tex	(revision 3417)
@@ -49,5 +49,5 @@
 \vspace{1cm}
 \begin{center}
-{\bf \Large Sophya Version: 2.1 (V\_Sep2007) }
+{\bf \Large Sophya Version: 2.1 (V\_Nov2007) }
 \end{center}
 \titrebp{1}
@@ -987,9 +987,10 @@
 \end{verbatim} 
 
-\centerline{\bf Warning: }
-
+{\bf Warning: }
 There is a drawback in this behaviour: only a single 
 copy of an array is written to a file, even if the array is modified, 
-without being resized and written to a PPF stream. 
+without being resized and written (dumped) again to the same  PPF stream. 
+However, this behavior can be changed using the {\tt RenewObjId()} method,
+as illustrated below.
 \begin{verbatim}
 {
@@ -997,16 +998,19 @@
 TArray<int_4> ia(5,3);
 ia = 8;
-pos << ia;
+pos << ia;                 // (1) 
 ia = 16;
-pos << ia;
+pos << ia;                 // (2) Only a reference to the previously ia array is written
 ia = 32;
-pos << ia;
+ia.RenewObjId();    // We change the object Id
+pos << ia;                 //  (3) The complete array is dumped again 
 }
 \end{verbatim}
 
 Only a single copy of the data is effectively written to the output 
-PPF file, corresponding to the value 8 for array elements. When we 
+PPF file, corresponding to the value 8 for array elements, for the first two 
+write operations. When we 
 read the three array from the file mca.ppf, the same array elements
-are obtained three times (all elements equal to 8):
+are obtained two times (all elements equal to 8), and a different array is obtained 
+the third time 
 \begin{verbatim}
 {
@@ -1049,4 +1053,38 @@
 \end{verbatim}
 
+\subsection{Cast without conversion}
+Data conversion between arrays with different data type is handled transparently,
+through the copy constructor or the assignment (=) operator . However, in rare cases, 
+one wants to access the same memory locations, without data type conversion.
+The template functions defined in {\tt arrctcast.h} can be used to access the same 
+memory locations, by arrays with different data types. The SOPHYA/NDataBlock 
+reference sharing mechanism is effective When using these functions.
+Notice that the array size or stride may change during these cast operations. \\
+ {\tt arrctcast.h} has been introduced in version V=2.1 (Nov 2007), and has not been 
+ fully tested for non packed arrays.
+\begin{verbatim}
+// We define and initialize a  real array :
+TArray<r_4> fa(5);
+fa = RegularSequence(1.25,0.5);
+cout << " fa= " << fa;
+// We construct an integer array from fa, where the floating point values
+// are converted to integer values
+TArray<uint_2> ia(fa);
+cout << "  ia= " << ia;
+cout << "  ia (in hex)= " << hex << ia << dec;
+// We can also access the fa memory locations interpreted as short integers
+uint_2 ui2;
+// Note that sfia size is double the fa size 
+TArray<uint_2> sfia = ArrayCast(fa, ui2);
+cout << "  sfia= " << sfia;
+cout << "  sfia (in hex)= " << hex << sfia << dec;
+\end{verbatim}
+One of the most useful case of these array type cast without conversion 
+correspond to accessing the real or imaginary part of a complex array. 
+Two specific template functions {\tt SDRealPart()} and {\tt SDImagPart()}
+are also defined in  {\tt arrctcast.h}. Two other functions {\tt ArrCastR2C()}
+and {\tt ArrCastC2R() } are also defined for real to complex, and
+complex to real cast. 
+Their usage is shown in the next  paragraph on complex arrays.
 
 \subsection{Complex arrays}
@@ -1059,5 +1097,5 @@
 \item[\bul] Functions returning arrays corresponding to real and imaginary 
 parts of a complex array: {\tt real(za) , imag(za) } 
-({\bf Warning:} Note that the present implementation does not provide
+({\bf Warning:} Note that the these functions do not provide
 shared memory access to real and imaginary parts.)
 \item[\bul] Functions returning arrays corresponding to the module, 
@@ -1098,5 +1136,24 @@
 \end{verbatim}
 
-\subsection{Cast without conversion}
+\noindent {\bf Shared data access :} It is possible to access a complex array 
+elements (real and imaginary parts) through the template functions defined 
+in {\tt arrctcast.h} and discussed above. The example below shows how to use 
+these functions.
+
+\begin{verbatim}
+// We define a complex array 
+TArray< complex<r_4> > za(5);
+cout << " za= " << za;
+// And two real arrays, corresponding to the real and imaginary parts 
+TArray<r_4> rza = SDRealPart(za); 
+TArray<r_4> iza = SDImagPart(za); 
+// We initialize the real and imaginary parts of the complex array 
+rza = RegularSequence(10.,2.);
+iza = RegularSequence(5.,0.75);
+cout << " rza=..., iza=... ----> za = " << za;
+// The complex array seen as a real array (double size)
+TArray<r_4> aza = ArrCastC2R(za);
+cout << " za --> aza= " << aza;
+\end{verbatim}
 
 \subsection{Memory organisation}
