math3 썸네일형 리스트형 Java: 유용한 수학 라이브러리 The Apache Commons Mathematics Library 자바로 코딩을 하다보면 가끔 평균이나 분산을 쉽게 구하고 싶을 때가 있다. 평균이야 뭐 값을 더하면서 몇번 더했는지 기억하고 나눠주면 되는데 분산부터는 조금 머리가 아프다. 하지만 math3 라이브러리와 함께라면 쉽게 해결한다는 사실!! import org.apache.commons.math3.stat.descriptive.moment.Mean;import org.apache.commons.math3.stat.descriptive.moment.Variance; public class test {public static void main(String[] args) {System.out.println("1,2,3,4,5 의 평균");int[] arr = new int[]{1,2,3,4,5};Mean m = .. 더보기 이전 1 다음