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... */
| 157 | * be a protected function... |
| 158 | */ |
| 159 | double 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 | } |
| 165 | double 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); |
no test coverage detected