Here you can find the source of sumDifferences(List
public static float sumDifferences(List<Double> a, List<Double> b)
//package com.java2s; /*/* www . j a va2 s . c o m*/ * Copyright 2013 Alibaba.com All right reserved. This software is the * confidential and proprietary information of Alibaba.com ("Confidential * Information"). You shall not disclose such Confidential Information and shall * use it only in accordance with the terms of the license agreement you entered * into with Alibaba.com. */ import java.util.List; public class Main { public static float sumDifferences(List<Double> a, List<Double> b) { assert (a.size() == b.size()); float sumDiff = 0f; // double aSum = 0; // double bSum = 0; for (int i = 0; i < a.size(); i++) { sumDiff += Math.abs(a.get(i) - b.get(i)); // aSum += a.get(i); // bSum += b.get(i); } return (float) sumDiff; } }