GlassBR
All Classes Files Functions
Interpolation.hpp
Go to the documentation of this file.
1 
7 #ifndef Interpolation_h
8 #define Interpolation_h
9 
10 #include <string>
11 #include <vector>
12 
13 using std::ofstream;
14 using std::string;
15 using std::vector;
16 
25 double lin_interp(double x_1, double y_1, double x_2, double y_2, double x);
26 
32 int find(vector<double> &arr, double v);
33 
39 vector<double> extractColumn(vector<vector<double>> &mat, int j);
40 
47 double interpY(string filename, double x, double z);
48 
55 double interpZ(string filename, double x, double y);
56 
57 #endif
vector< double > extractColumn(vector< vector< double >> &mat, int j)
Extracts a column from a 2D matrix.
double lin_interp(double x_1, double y_1, double x_2, double y_2, double x)
Performs linear interpolation.
double interpZ(string filename, double x, double y)
Linearly interpolates a z value at given x and y values.
double interpY(string filename, double x, double z)
Linearly interpolates a y value at given x and z values.
int find(vector< double > &arr, double v)
Finds the array index for a value closest to the given value.