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

Method extend

Math/Reeds Sloane Algorithm.cpp:12–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10struct LinearRecurrence {
11 using vec = vector<ll>;
12 static void extend(vec &a, size_t d, ll value = 0) {
13 if (d <= a.size()) return;
14 a.resize(d, value);
15 }
16 static vec BerlekampMassey(const vec &s, ll mod) {
17 function<ll(ll)> inverse = [&](ll a) {
18 return a == 1 ? 1 : (ll)(mod - mod / a) * inverse(mod % a) % mod;

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected