collision matrix symmetrization implemented in C