Triples are formed by taking any three data values from a vector and order this triple of data values from
smallest to largest. If the middle ordered item is closer to the smallest than to the largest, the triple is said
to be a right triple. If the middle ordered item is closer to the largest, the
triple is said to be a left triple. If the middle ordered value is exactly
halfway between the other two, the triple is neither right nor left. This function will do the necessary computations
and return the number of each type of triple.