MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / evaluatePolynomial

Function evaluatePolynomial

grid_map_core/src/CubicInterpolation.cpp:417–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417double evaluatePolynomial(const FunctionValueMatrix &functionValues, double tx, double ty)
418{
419 const Eigen::Vector4d xVector(1, tx, tx * tx, tx * tx * tx);
420 const Eigen::Vector4d yVector(1, ty, ty * ty, ty * ty * ty);
421 const Eigen::Matrix4d tempMat = functionValues
422 * bicubicInterpolationMatrix.transpose();
423 const Eigen::Matrix4d polynomialCoeffMatrix = bicubicInterpolationMatrix * tempMat;
424 const Eigen::Vector4d tempVec = polynomialCoeffMatrix * yVector;
425 return xVector.transpose() * tempVec;
426}
427
428void assembleFunctionValueMatrix(const DataMatrix &f, const DataMatrix &dfx, const DataMatrix &dfy,
429 const DataMatrix &ddfxy, FunctionValueMatrix *functionValues)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected