GlassBR
Loading...
Searching...
No Matches
GlassBR.Interpolation Class Reference

Static Public Member Functions

static double lin_interp (double x_1, double y_1, double x_2, double y_2, double x) throws IOException
 Performs linear interpolation.
static int find (ArrayList< Double > arr, double v) throws Exception, IOException
 Finds the array index for a value closest to the given value.
static ArrayList< Double > extractColumn (ArrayList< ArrayList< Double > > mat, int j) throws IOException
 Extracts a column from a 2D matrix.
static double interpY (String filename, double x, double z) throws Exception, FileNotFoundException, IOException
 Linearly interpolates a y value at given x and z values.
static double interpZ (String filename, double x, double y) throws Exception, FileNotFoundException, IOException
 Linearly interpolates a z value at given x and y values.

Member Function Documentation

◆ extractColumn()

ArrayList< Double > GlassBR.Interpolation.extractColumn ( ArrayList< ArrayList< Double > > mat,
int j ) throws IOException
static

Extracts a column from a 2D matrix.

Parameters
matmatrix from which column will be extracted
jindex
Returns
column of the given matrix at the given index

◆ find()

int GlassBR.Interpolation.find ( ArrayList< Double > arr,
double v ) throws Exception, IOException
static

Finds the array index for a value closest to the given value.

Parameters
arrarray in which value should be found
vvalue whose index will be found
Returns
index of given value in given array

◆ interpY()

double GlassBR.Interpolation.interpY ( String filename,
double x,
double z ) throws Exception, FileNotFoundException, IOException
static

Linearly interpolates a y value at given x and z values.

Parameters
filenamename of file with x y and z data
xx-coordinate to interpolate at
zz-coordinate to interpolate at
Returns
y value interpolated at given x and z values

◆ interpZ()

double GlassBR.Interpolation.interpZ ( String filename,
double x,
double y ) throws Exception, FileNotFoundException, IOException
static

Linearly interpolates a z value at given x and y values.

Parameters
filenamename of file with x y and z data
xx-coordinate to interpolate at
yy-coordinate to interpolate at
Returns
z value interpolated at given x and y values

◆ lin_interp()

double GlassBR.Interpolation.lin_interp ( double x_1,
double y_1,
double x_2,
double y_2,
double x ) throws IOException
static

Performs linear interpolation.

Parameters
x_1lower x-coordinate
y_1lower y-coordinate
x_2upper x-coordinate
y_2upper y-coordinate
xx-coordinate to interpolate at
Returns
y value interpolated at given x value

The documentation for this class was generated from the following file: