This mapping class is a usable example of a "sophisticated" symbolic
-mapping class in C++. Bascially it allows you to do things like :
+mapping class in C++. It allows you to do things like :
// X will be the "identity mapping"
Mapping X = Mapping::X;
Mapping f;
// Now contains some complex stuff
f = sin(X * X - (X * 3.0) + 0.5);
- // Display it
+ // Display its square
cout << f*f << endl;
- // fp will be the first derivative
+ // fp will be its first derivative
Mapping fp = f.derivative();
- // fs the second derivative
+ // fs its second derivative
Mapping fs = fp.derivative();
// Compute the second derivative at 5
cout << fs(5.0) << endl;
-The best is to check the mappings.h to look at what functions and
-operators are available. It will be pretty easy to add your own
-operators.
+The best is to check the file mappings.h for the list of available
+functions and operators. It is pretty easy to add your own.
-The memory management is done in such a way that spurious copies are
-avoided and intermediate results will be deallocated correctly. So far
+The memory management is done in such a way that unnecessary copies
+are avoided and intermediate results are deallocated correctly. So far
I never traced a memory leak, but feel free to report it if you find
one.