algo — C++23 日本語リファレンス GitHub

shift_of_sampling_points

関数 · 形式的冪級数 (FPS)

template <internal::static_modint_c mint>
std::vector<mint> shift_of_sampling_points(const std::vector<mint> &y, mint c, int m);

概要

標本点のシフト (shift of sampling points)

次数 $< n$ の多項式 $f$ の標本値 $y_i = f(i)$($i = 0, \ldots, n-1$)から $f(c), f(c+1), \ldots, f(c+m-1)$ を求める。 ラグランジュ補間 $f(x) = \left(\prod_k (x-k)\right) \sum_i a_i / (x-i)$ を、係数 $a_i = y_i / \prod_{k \ne i} (i-k)$ と $1/(c+t)$ の畳み込みで一括評価する。 評価点 $c+j$ が標本点 $\{0, \ldots, n-1\}$ と一致する(区間積が $0$ になる)場合は y を直接返す。

テンプレートパラメータ

名前 説明
mint static modint

パラメータ

名前 説明
y 標本値の列 $f(0), \ldots, f(n-1)$
c シフト量
m 求める項数

戻り値

std::vector<mint> $f(c+j)$ の列($j = 0, \ldots, m-1$、長さ $m$)

計算量

関連項目