code: public static double sumOfAbsolutes (double[] vector) {
          // Declare and initialize the accumulator:
          double total = 0.0;
  
          // Iterate over the vector:
          for (int i = 0; i < vector.length; i++) {
              total += Math.abs(vector[i]);
          }
  
          // Done, return:
          return total;
      }
docs: Returns the sum of the absolute values in the vector.
  
  @param vector The input vector as a double array
  @return The sum of the absolute values in the vector