#include <G4AdjointInterpolator.hh>
|
| ~G4AdjointInterpolator () |
|
G4double | LinearInterpolation (G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2) |
|
G4double | LogarithmicInterpolation (G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2) |
|
G4double | ExponentialInterpolation (G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2) |
|
G4double | Interpolation (G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2, G4String InterPolMethod="Log") |
|
size_t | FindPosition (G4double &x, std::vector< G4double > &x_vec, size_t ind_min=0, size_t ind_max=0) |
|
size_t | FindPositionForLogVector (G4double &x, std::vector< G4double > &x_vec) |
|
G4double | Interpolate (G4double &x, std::vector< G4double > &x_vec, std::vector< G4double > &y_vec, G4String InterPolMethod="Log") |
|
G4double | InterpolateWithIndexVector (G4double &x, std::vector< G4double > &x_vec, std::vector< G4double > &y_vec, std::vector< size_t > &index_vec, G4double x0, G4double dx) |
|
G4double | InterpolateForLogVector (G4double &x, std::vector< G4double > &x_vec, std::vector< G4double > &y_vec) |
|
Definition at line 53 of file G4AdjointInterpolator.hh.
G4AdjointInterpolator::~G4AdjointInterpolator |
( |
| ) |
|
size_t G4AdjointInterpolator::FindPosition |
( |
G4double & |
x, |
|
|
std::vector< G4double > & |
x_vec, |
|
|
size_t |
ind_min = 0 , |
|
|
size_t |
ind_max = 0 |
|
) |
| |
Definition at line 116 of file G4AdjointInterpolator.cc.
122 size_t ndim = x_vec.size();
124 size_t ind2 = ndim - 1;
136 if (x_vec[0] < x_vec[1] ) {
138 size_t midBin = (ind1 + ind2)/2;
139 if (
x < x_vec[midBin])
144 }
while (ind2 - ind1 > 1);
148 size_t midBin = (ind1 + ind2)/2;
149 if (
x < x_vec[midBin])
154 }
while (ind2 - ind1 > 1);
size_t G4AdjointInterpolator::FindPositionForLogVector |
( |
G4double & |
x, |
|
|
std::vector< G4double > & |
x_vec |
|
) |
| |
Definition at line 164 of file G4AdjointInterpolator.cc.
size_t FindPosition(G4double &x, std::vector< G4double > &x_vec, size_t ind_min=0, size_t ind_max=0)
Definition at line 189 of file G4AdjointInterpolator.cc.
195 return Interpolation(
x,x_vec[i],x_vec[i+1],y_vec[i],y_vec[i+1],InterPolMethod);
G4double Interpolation(G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2, G4String InterPolMethod="Log")
size_t FindPosition(G4double &x, std::vector< G4double > &x_vec, size_t ind_min=0, size_t ind_max=0)
Definition at line 220 of file G4AdjointInterpolator.cc.
size_t FindPositionForLogVector(G4double &x, std::vector< G4double > &x_vec)
G4double LinearInterpolation(G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2)
Definition at line 200 of file G4AdjointInterpolator.cc.
204 if (
x>x0) ind=
int((
x-x0)/dx);
205 if (ind >= index_vec.size()-1) ind= index_vec.size()-2;
206 size_t ind1 = index_vec[ind];
207 size_t ind2 = index_vec[ind+1];
215 return Interpolation(
x,x_vec[ind],x_vec[ind+1],y_vec[ind],y_vec[ind+1],
"Lin");
G4double Interpolation(G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2, G4String InterPolMethod="Log")
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
size_t FindPosition(G4double &x, std::vector< G4double > &x_vec, size_t ind_min=0, size_t ind_max=0)
Definition at line 97 of file G4AdjointInterpolator.cc.
99 if (InterPolMethod ==
"Log" ){
102 else if (InterPolMethod ==
"Lin" ){
105 else if (InterPolMethod ==
"Exp" ){
G4double LogarithmicInterpolation(G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2)
G4double LinearInterpolation(G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2)
G4double ExponentialInterpolation(G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2)
Definition at line 73 of file G4AdjointInterpolator.cc.
76 G4double B=std::log(y2/y1)/std::log(x2/x1);
double B(double temperature)
double A(double temperature)
G4double LinearInterpolation(G4double &x, G4double &x1, G4double &x2, G4double &y1, G4double &y2)
The documentation for this class was generated from the following files: