org.psjava.formula.Average Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of psjava Show documentation
Show all versions of psjava Show documentation
Problem Solving Library for Java
package org.psjava.formula;
import org.psjava.ds.Collection;
import org.psjava.ds.numbersystrem.DivisableNumberSystem;
public class Average {
public static T calc(Collection a, DivisableNumberSystem ns) {
T sum = Sum.calc(ns, a);
return ns.divide(sum, ns.getByInt(a.size()));
}
private Average() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy