Added version 2 of ToGraph, and added necessary helper functions in TVec, THashMP, TNGraphMP