Here you can find the source of sum(float[] distribution)
public static float sum(float[] distribution)
//package com.java2s; //License from project: Open Source License public class Main { public static float sum(float[] distribution) { float result = 0; for (float val : distribution) result += val; return result; }//w w w. j a v a2 s . com }