]> www.ginac.de Git - ginac.git/blobdiff - doc/tutorial/ginac.texi
Added example for mystring class [Sheplyakov].
[ginac.git] / doc / tutorial / ginac.texi
index 51341f4dd2f2f16075b676378d9f091ebec35cfd..b2038db5bd68e2cd06d359eb6466665e38498ed4 100644 (file)
@@ -15,6 +15,7 @@
 
 @include version.texi
 
+@dircategory Mathematics
 @direntry
 * ginac: (ginac).                   C++ library for symbolic computation.
 @end direntry
@@ -3401,8 +3402,20 @@ $v^0 e_0 + v^1 e_1 + ... + v^n e_n$
 with @samp{e.k}
 directly supplied in the second form of the procedure. In the first form
 the Clifford unit @samp{e.k} is generated by the call of
-@code{clifford_unit(mu, metr, rl)}. The previous code may be rewritten
-with the help of @code{lst_to_clifford()} as follows
+@code{clifford_unit(mu, metr, rl)}. 
+@cindex pseudo-vector
+If the number of components supplied
+by @code{v} exceeds the dimensionality of the Clifford unit @code{e} by
+1 then function @code{lst_to_clifford()} uses the following
+pseudo-vector representation: 
+@tex
+$v^0 {\bf 1} + v^1 e_0 + v^2 e_1 + ... + v^{n+1} e_n$
+@end tex
+@ifnottex
+@samp{v~0 ONE + v~1 e.0 + v~2 e.1 + ... + v~[n+1] e.n}
+@end ifnottex
+
+The previous code may be rewritten with the help of @code{lst_to_clifford()} as follows
 
 @example
 @{
@@ -3432,17 +3445,25 @@ $v = (v^0, v^1, ..., v^n)$
 @ifnottex
 @samp{v = (v~0, v~1, ..., v~n)} 
 @end ifnottex
-such that 
+such that the expression is either vector 
 @tex
 $e = v^0 c_0 + v^1 c_1 + ... + v^n c_n$
 @end tex
 @ifnottex
 @samp{e = v~0 c.0 + v~1 c.1 + ... + v~n c.n}
 @end ifnottex
-with respect to the given Clifford units @code{c} and with none of the
-@samp{v~k} containing Clifford units @code{c} (of course, this
+or pseudo-vector 
+@tex
+$v^0 {\bf 1} + v^1 e_0 + v^2 e_1 + ... + v^{n+1} e_n$
+@end tex
+@ifnottex
+@samp{v~0 ONE + v~1 e.0 + v~2 e.1 + ... + v~[n+1] e.n}
+@end ifnottex
+with respect to the given Clifford units @code{c}. Here none of the
+@samp{v~k} should contain Clifford units @code{c} (of course, this
 may be impossible). This function can use an @code{algebraic} method
-(default) or a symbolic one. With the @code{algebraic} method the @samp{v~k} are calculated as
+(default) or a symbolic one. With the @code{algebraic} method the
+@samp{v~k} are calculated as 
 @tex
 $(e c_k + c_k e)/c_k^2$. If $c_k^2$
 @end tex
@@ -7802,7 +7823,8 @@ Now we will start implementing a new class @code{mystring} that allows
 placing character strings in algebraic expressions (this is not very useful,
 but it's just an example). This class will be a direct subclass of
 @code{basic}. You can use this sample implementation as a starting point
-for your own classes.
+for your own classes @footnote{The self-contained source for this example is
+included in GiNaC, see the @file{doc/examples/mystring.cpp} file.}.
 
 The code snippets given here assume that you have included some header files
 as follows: