modify purge to range version, minor refinings on pomdp.cpp vectorSet.cpp