Here you can find the source of removeDuplicateValues(double[] values)
public static double[] removeDuplicateValues(double[] values)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] removeDuplicateValues(double[] values) { System.err.println("removeDuplicateValues() not tested"); if (values == null) return null; java.util.ArrayList res = new java.util.ArrayList(values.length); for (int i = 0; i < values.length; i++) { Double d = new Double(values[i]); if (!res.contains(d)) res.add(d);/* www . ja v a2s.c o m*/ } double[] resValues = new double[res.size()]; for (int i = 0; i < resValues.length; i++) { resValues[i] = ((Double) res.get(i)).doubleValue(); } return resValues; } }