Tabulation Class Reference
To read and manipulate tabulated functions. More...
Public Member Functions | |
| Tabulation () | |
| Default constructor. | |
| Tabulation (string file) | |
| Constructor using file name. | |
| ~Tabulation () | |
| Destructor. | |
| void | setFile (string file) |
| Set file name. | |
| double | getValue (string funct, double v) |
| Return the calculated value of the function. | |
| double | getValue (string funct, double v1, double v2) |
| Return the calculated value of the function. | |
| double | getValue (string funct, double v1, double v2, double v3) |
| Return the calculated value of the function. | |
Detailed Description
To read and manipulate tabulated functions.
This class enables reading a tabulated function of one to three variables and calculating the value of the function using piecewise multilinear interpolation.
The file defining the function is an XML file where any function is introduced via the tag "Function".
Member Function Documentation
| void setFile | ( | string | file | ) |
Set file name.
This function is to be used when the default constructor is invoked.
| double getValue | ( | string | funct, |
| double | v | ||
| ) |
Return the calculated value of the function.
Case of a function of one variable
- Parameters:
-
[in] funct Name of the function to be evaluated, as read from input file [in] v Value of the variable
- Returns:
- Computed value of the function
| double getValue | ( | string | funct, |
| double | v1, | ||
| double | v2 | ||
| ) |
Return the calculated value of the function.
Case of a function of two variables
- Parameters:
-
[in] funct Name of the function to be evaluated, as read from input file [in] v1 Value of the first variable [in] v2 Value of the second variable
- Returns:
- Computed value of the function
| double getValue | ( | string | funct, |
| double | v1, | ||
| double | v2, | ||
| double | v3 | ||
| ) |
Return the calculated value of the function.
Case of a function of three variables
- Parameters:
-
[in] funct Name of the funct to be evaluated, as read from input file [in] v1 Value of the first variable [in] v2 Value of the second variable [in] v3 Value of the third variable
- Returns:
- Computed value of the function
- OFELI
- Tabulation
Copyright © 1998-2012 Rachid Touzani