Change of heuristic method logic

Doxygen documentation added!