net.simplace.client.simulation.lap.util.helper.DataTransformHelper

Methods for interpolating and integrating piecewise linear functions

Functions are given by arrays of x and y values.

The class provides methods for




public class DataTransformHelper {
// Public Constructors
public DataTransformHelper();


// Class Methods
public static double[] NormalizeCurve(double[] xs, double[] ys);

Normalizes the y-values of an x-y-curve so that the area under the curve is 1.
returns new y values
public static double[] NormalizeCurve(double[] xs, double[] ys, double area);

Normalizes the y-values of an x-y-curve so that the area under the curve has given value.
returns new y values
public static double[] RescaleValues(double min, double max, double[] vs);

Rescales an array of values proportionally from new mininimum to new maximum.
returns the rescaled values
public static double Interpolate(double x, double[] xs, double[] ys, boolean
extrapolate);

Linear interpolation of a piecewise linear curve
returns the interpolated value
public static double Integral(double[] xs, double[] ys);

Calculates the area under the curve defined by arrays of x and y values
returns the area
public static double IntegralFromTo(double t1, double t2, double[] xs,
double[] ys);

Calculates the area under the curve defined by arrays of x and y values between the points t1 and t2
returns the area


}