Updated example code.
Added optimization for PQ where TPriority is double or int. Roughly 2x faster now.