math.extras: adding majority vote algorithm.