Here you can find the source of interpolate(float out[], float in1[], float in2[], int in2_idx, float coef, int length)
public static void interpolate(float out[], float in1[], float in2[], int in2_idx, float coef, int length)
//package com.java2s; /*// w ww . j a v a 2 s .c o m * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ public class Main { public static void interpolate(float out[], /* (o) the interpolated vector */ float in1[], /* (i) the first vector for the interpolation */ float in2[], /* (i) the second vector for the interpolation */ int in2_idx, float coef, /* (i) interpolation weights */ int length) /* (i) length of all vectors */ { int i; float invcoef; invcoef = 1.0f - coef; for (i = 0; i < length; i++) { out[i] = coef * in1[i] + invcoef * in2[i + in2_idx]; // System.out.println("out["+i+"] devient " + out[i] + ", par " + // coef + " * " + in1[i] + " + " + invcoef + " * " + in2[i + in2_idx]); } } }