sumNondiagonalElements = function (arr, i) {
  var sum = 0,
    j;

  for (j = 0; j < i; j++) {
    sum += Math.abs(arr[j]);
  }
  for (j = i + 1; j < arr.length; j++) {
    sum += Math.abs(arr[j]);
  }
  return sum;
}
Add all of the elements in an array together except for the i'th one.
This is a helper function for determining diagonal dominance, and it
should be noted that each element is passed to Math.abs() beforehand.

@param {Array} array
@param {Int} index of element to ignore.
@return {Number} sum.