MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / differentiate

Method differentiate

Math/Subset Sum Problem.cpp:200–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 return vector<mint>(a.begin() + l, a.begin() + r);
199 }
200 poly differentiate() const {
201 int n = size(); vector<mint> ans(n);
202 for(int i = 1; i < size(); i++) ans[i - 1] = coef(i) * i;
203 return ans;
204 }
205 poly integrate() const {
206 int n = size(); vector<mint> ans(n + 1);
207 for(int i = 0; i < size(); i++) ans[i + 1] = coef(i) / (i + 1);

Callers

nothing calls this directly

Calls 1

sizeFunction · 0.85

Tested by

no test coverage detected