GlassBR
Loading...
Searching...
No Matches
Interpolation.hpp
Go to the documentation of this file.
1
6
7#ifndef Interpolation_h
8#define Interpolation_h
9
10#include <string>
11#include <vector>
12
13using std::ofstream;
14using std::string;
15using std::vector;
16
25double lin_interp(double x_1, double y_1, double x_2, double y_2, double x);
26
32int find(vector<double> &arr, double v);
33
39vector<double> extractColumn(vector<vector<double>> &mat, int j);
40
47double interpY(string filename, double x, double z);
48
55double interpZ(string filename, double x, double y);
56
57#endif
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.
vector< double > extractColumn(vector< vector< double > > &mat, int j)
Extracts a column from a 2D matrix.