MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / evaluate

Method evaluate

src/PolyMath.cpp:159–164  ·  view source on GitHub ↗

The core functions to evaluate the polynomial It is here we implement the different special * functions that allow us to specify certain * types of polynomials. * The derivative might bee needed during the * solution process of the solver. It could also * be a protected function... */

Source from the content-addressed store, hash-verified

157 * be a protected function...
158 */
159double Polynomial2D::evaluate(const Eigen::MatrixXd& coefficients, const double& x_in) {
160 double result = Eigen::poly_eval(makeVector(coefficients), x_in);
161 if (this->do_debug())
162 std::cout << "Running 1D evaluate(" << mat_to_string(coefficients) << ", x_in:" << vec_to_string(x_in) << "): " << result << '\n';
163 return result;
164}
165double Polynomial2D::evaluate(const Eigen::MatrixXd& coefficients, const double& x_in, const double& y_in) {
166 size_t r = coefficients.rows();
167 double result = evaluate(coefficients.row(r - 1), y_in);

Callers 5

derivativeMethod · 0.95
integralMethod · 0.95
callMethod · 0.45
derivMethod · 0.45
PolyMath.cppFile · 0.45

Calls 7

do_debugMethod · 0.95
makeVectorFunction · 0.85
mat_to_stringFunction · 0.85
vec_to_stringFunction · 0.85
removeColumnFunction · 0.85
removeRowFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected