2 This mapping class is a usable example of a "sophisticated" symbolic
3 mapping class in C++. Bascially 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 the first derivative
14 Mapping fp = f.derivative();
15 // fs the 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 mappings.h to look at what functions and
21 operators are available. It will be pretty easy to add your own
24 The memory management is done in such a way that spurious copies are
25 avoided and intermediate results will be deallocated correctly. So far
26 I never traced a memory leak, but feel free to report it if you find