MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / LNLIB_POLY_horner_uv

Function LNLIB_POLY_horner_uv

dotnet/CAPI/src/Polynomials_CAPI.cpp:30–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void LNLIB_POLY_horner_uv(
31 int degree_u,
32 int degree_v,
33 const double* coefficients,
34 const UV_C* uv,
35 double* out_horner)
36{
37 std::vector<std::vector<double>> coeffs(degree_u + 1, std::vector<double>(degree_v + 1));
38 for (int i = 0; i <= degree_u; ++i) {
39 for (int j = 0; j <= degree_v; ++j) {
40 coeffs[i][j] = coefficients[i * (degree_v + 1) + j];
41 }
42 }
43
44 LNLib::UV cpp_uv{ uv->u, uv->v };
45 double val = LNLib::Polynomials::Horner(degree_u, degree_v, coeffs, cpp_uv);
46 *out_horner = val;
47}
48
49double LNLIB_POLY_horner(int degree, const double* coefficients, int coeff_count, double param_t)
50{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected