I think I need the array here because I need to be able to refer to segment i and segment j.  I'm just summing the upper diagonal of a matrix.