Collision detection algorithm (discrete) with sweep and prune algorithm for periodic boundary conditions
EDIT: Question Updated with solution approach, but solution much slower than original implementation. Any ideas to speed up implementation? In the discussion on collision detection (see here) I asked ...
1. Default behavior of Sort Note: this peculiarity is described in a comment to a related question at StackOverflow but I think it's worth restating here at mma.sx. It is estabilished in ...
I have been working with ordering of oscillators for example $[a,a^\dagger]=1$ and I have a fairly stable code. I have needed to use inverse oscillators for example expressions like $a^m ...