F1_1<X,P1,Y>, F2_1<X,P1,P2,Y>, F2_2<X,P1,P2,Y>, ..., F4_1<X,P1,P2,P3,P4,Y>, ..., F4_4<X,P1,P2,P3,P4,Y>
for functions that depend on parameters and for which any parameter can be made to play the role of a function argument. Given a function
Y f(X const& x, P1 const& p1, ..., P4 const& p4)
one may form functions of type
F<X,Y>, F<P1,Y>, ..., F<P4,Y>
which depend on the remaining arguments of f as parameters. This allows a complicated equation between several quantities (e.g. the interaction energy as a function of the states of the interacting subsystems) to be coded once, and nevertheless to be considered as a function of any of its arguments, not only of the the one which happens to hold the first position in the list
x, p1, ..., p4.
An example for the syntax is
F<P2,Y> f2 = F4_2<X, P1, P2, P3, P4, Y>(x, p1, p3, p4)(f)
(finished)valgrind --tool=memcheck --leak-check=full -s ./classicalcrossway
The working directory for the bash is convenienltly set to the location of the executable, 'classicalcrossway' in our present case. Starting from my home directory ~ I thus have to enter
cd Desktop/e/cpm/classical
to reach this place. So far I did not get hints as to the location of my errors (even when compiling under '-g' but the opportunity see whether there is an error or leaking memory blocks is extremely valuable. So far I had the opinion that having constructors and destructors in all my classes would reliably prevent memory leaks. I had to learn that it is not impossible to have errors in constructor code and destructor code. An example for leaking constructor code is by self-created idiom for defining constructors in terms of other constructors:
X::X(B b){ A a=expession1(b); *this = X(a); }
where X::X(A a) was defined earlier. A way to achieve the same thing without any danger of leaking is to define a static make-function
static X X::make(B b){ return X(expression1(b)); }
Instead of giving the function the suggestive name 'make' we could choose even more suggestive names like 'makeFromB' or B2X (B to X), ...
The problem with destructor code was in my array class
template