Class Diff
 java.lang.Object

 com.opengamma.strata.math.impl.util.Diff

public class Diff extends Object
Computes the numerical difference between adjacent elements in vector.


Constructor Summary
Constructors Constructor Description Diff()

Method Summary
All Methods Static Methods Concrete 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 (n1) 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 (n1) 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 (n1) 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 (n1) 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).



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 (n1) 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 vectort
 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 (n1) 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 vectort
 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 (n1) 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 vectort
 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 (n1) 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 vectort
 the number of differences to be taken (t positive) Returns:
 the numerical difference between adjacent elements in v

