Here you can find the source of interpolateArray(int[] array, int interval)
public static int[] interpolateArray(int[] array, int interval)
//package com.java2s; //License from project: Apache License public class Main { public static int[] interpolateArray(int[] array, int interval) { int newSize = array.length / interval; int[] list = new int[newSize]; for (int i = 0; i < newSize; i++) { int index = i * interval; list[i] = array[index];/*from www .j ava2 s .c o m*/ } return list; } }