2 This mapping class is a usable example of a "sophisticated" symbolic
3 mapping class in C++. It allows you to do things like :
5 // X will be the "identity mapping"
6 Mapping X = Mapping::X;
9 // Now contains some complex stuff
10 f = sin(X * X - (X * 3.0) + 0.5);
13 // fp will be its first derivative
14 Mapping fp = f.derivative();
15 // fs its second derivative
16 Mapping fs = fp.derivative();
17 // Compute the second derivative at 5
18 cout << fs(5.0) << endl;
20 The best is to check the file mappings.h for the list of available
21 functions and operators. It is pretty easy to add your own.
23 The memory management is done in such a way that unnecessary copies
24 are avoided and intermediate results are deallocated correctly. So far
25 I never traced a memory leak, but feel free to report it if you find
30 Modified 2005, 2007, 2011