Implementation of the 2-opt algorithm for a minimum weighted vertex cover by Clarkson, Kenneth L.
"A modification of the greedy algorithm for vertex cover." Information Processing Letters 16.1
(1983): 23-25. The solution is guaranteed to be within $2$ times the optimum solution. Runtime:
Note: this class supports pseudo-graphs