1#include"../../kyopro_library/template.hpp"
8 template<
typename Monoid>
11 for(
int i=0; i<n; i++)
for(
int j=0; j<1<<n; j++) {
12 if(j>>i&1) v[j]=Monoid::op(v[j],v[j^(1<<i)]);
20 template<
typename Monoid>
23 for(
int i=0; i<n; i++)
for(
int j=0; j<1<<n; j++) {
24 if(~j>>i&1) v[j]=Monoid::op(v[j],v[j^(1<<i)]);
33 template<
typename Abel>
36 for(
int i=0; i<n; i++)
for(
int j=0; j<1<<n; j++) {
37 if(j>>i&1) v[j]=Abel::op(v[j],Abel::inv(v[j^(1<<i)]));
46 template<
typename Abel>
49 for(
int i=0; i<n; i++)
for(
int j=0; j<1<<n; j++) {
50 if(~j>>i&1) v[j]=Abel::op(v[j],Abel::inv(v[j^(1<<i)]));
56#include"../../kyopro_library/others/monoid.hpp"
57#include"../../kyopro_library/others/abel.hpp"
vector< typename Abel::Type > SupersetMobius(vector< typename Abel::Type > v)
高速メビウス変換(上位集合)
vector< typename Monoid::Type > SupersetZeta(vector< typename Monoid::Type > v)
高速ゼータ変換(上位集合)
vector< typename Monoid::Type > SubsetZeta(vector< typename Monoid::Type > v)
高速ゼータ変換(下位集合)
vector< typename Abel::Type > SubsetMobius(vector< typename Abel::Type > v)
高速メビウス変換(下位集合)