## Class Diff

• public class Diff
extends Object
Computes the numerical difference between adjacent elements in vector.
• ### Method Summary

All Methods
Modifier and Type Method Description
static double[] values​(double[] v)
Finds the numerical difference between value at position (i+1) and (i) returning a vector of what would be needed to be added to the first (n-1) elements of the original vector to get the original vector.
static double[] values​(double[] v, int t)
Finds the t^{th} numerical difference between value at position (i+1) and (i) (effectively recurses #values "t" times).
static float[] values​(float[] v)
Finds the numerical difference between value at position (i+1) and (i) returning a vector of what would be needed to be added to the first (n-1) elements of the original vector to get the original vector.
static float[] values​(float[] v, int t)
Finds the t^{th} numerical difference between value at position (i+1) and (i) (effectively recurses #values "t" times).
static int[] values​(int[] v)
Finds the numerical difference between value at position (i+1) and (i) returning a vector of what would be needed to be added to the first (n-1) elements of the original vector to get the original vector.
static int[] values​(int[] v, int t)
Finds the t^{th} numerical difference between value at position (i+1) and (i) (effectively recurses #values "t" times).
static long[] values​(long[] v)
Finds the numerical difference between value at position (i+1) and (i) returning a vector of what would be needed to be added to the first (n-1) elements of the original vector to get the original vector.
static long[] values​(long[] v, int t)
Finds the t^{th} numerical difference between value at position (i+1) and (i) (effectively recurses #values "t" times).
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Method Detail

• #### values

public static double[] values​(double[] v)
Finds the numerical difference between value at position (i+1) and (i) returning a vector of what would be needed to be added to the first (n-1) elements of the original vector to get the original vector.
Parameters:
v - the vector
Returns:
the numerical difference between adjacent elements in v
• #### values

public static double[] values​(double[] v,
int t)
Finds the t^{th} numerical difference between value at position (i+1) and (i) (effectively recurses #values "t" times).
Parameters:
v - the vector
t - the number of differences to be taken (t positive)
Returns:
the numerical difference between adjacent elements in v
• #### values

public static float[] values​(float[] v)
Finds the numerical difference between value at position (i+1) and (i) returning a vector of what would be needed to be added to the first (n-1) elements of the original vector to get the original vector.
Parameters:
v - the vector
Returns:
the numerical difference between adjacent elements in v
• #### values

public static float[] values​(float[] v,
int t)
Finds the t^{th} numerical difference between value at position (i+1) and (i) (effectively recurses #values "t" times).
Parameters:
v - the vector
t - the number of differences to be taken (t positive)
Returns:
the numerical difference between adjacent elements in v
• #### values

public static int[] values​(int[] v)
Finds the numerical difference between value at position (i+1) and (i) returning a vector of what would be needed to be added to the first (n-1) elements of the original vector to get the original vector.
Parameters:
v - the vector
Returns:
the numerical difference between adjacent elements in v
• #### values

public static int[] values​(int[] v,
int t)
Finds the t^{th} numerical difference between value at position (i+1) and (i) (effectively recurses #values "t" times).
Parameters:
v - the vector
t - the number of differences to be taken (t positive)
Returns:
the numerical difference between adjacent elements in v
• #### values

public static long[] values​(long[] v)
Finds the numerical difference between value at position (i+1) and (i) returning a vector of what would be needed to be added to the first (n-1) elements of the original vector to get the original vector.
Parameters:
v - the vector
Returns:
the numerical difference between adjacent elements in v
• #### values

public static long[] values​(long[] v,
int t)
Finds the t^{th} numerical difference between value at position (i+1) and (i) (effectively recurses #values "t" times).
Parameters:
v - the vector
t - the number of differences to be taken (t positive)
Returns:
the numerical difference between adjacent elements in v