1use crate::algebra::{
4 AddMulOperation, Associative, Field, Group, Invertible, Magma, Monoid, Ring, SemiRing, Unital,
5};
6use crate::array;
7use crate::num::{
8 BarrettReduction, Complex, ExtendedGcd, MInt, MIntBase, MIntConvert, One, RangeBoundsExt,
9 Signed, Unsigned, Wrapping, Zero, montgomery,
10};
11use crate::tools::{AssociatedValue, PartialIgnoredOrd, SerdeByteStr, Xorshift};
12
13#[codesnip::entry("berlekamp_massey")]
14pub use self::berlekamp_massey::berlekamp_massey;
15#[codesnip::entry("bitwise_transform")]
16pub use self::bitwise_transform::bitwise_transform;
17#[codesnip::entry("BitwiseandConvolve")]
18pub use self::bitwiseand_convolve::BitwiseandConvolve;
19#[codesnip::entry("BitwiseorConvolve")]
20pub use self::bitwiseor_convolve::BitwiseorConvolve;
21#[codesnip::entry("BitwisexorConvolve")]
22pub use self::bitwisexor_convolve::BitwisexorConvolve;
23#[codesnip::entry("BlackBoxMatrix")]
24pub use self::black_box_matrix::{
25 BlackBoxMIntMatrix, BlackBoxMatrix, BlackBoxMatrixImpl, SparseMatrix,
26};
27#[codesnip::entry("ConvolveSteps")]
28pub use self::convolve_steps::ConvolveSteps;
29#[codesnip::entry("discrete_logarithm")]
30pub use self::discrete_logarithm::{discrete_logarithm, discrete_logarithm_prime_mod};
31pub use self::factorial::*;
32#[codesnip::entry("fast_fourier_transform")]
33pub use self::fast_fourier_transform::ConvolveRealFft;
34#[codesnip::entry("floor_sum")]
35pub use self::floor_sum::{
36 floor_sum, floor_sum_i64, floor_sum_polynomial, floor_sum_polynomial_i64, floor_sum_range_freq,
37};
38#[codesnip::entry("FormalPowerSeries")]
39pub use self::formal_power_series::{
40 FormalPowerSeries, FormalPowerSeriesCoefficient, FormalPowerSeriesCoefficientSqrt, Fps,
41 Fps998244353,
42};
43#[codesnip::entry("garner")]
44pub use self::garner::Garner;
45pub use self::gcd::*;
46#[codesnip::entry("GcdConvolve")]
47pub use self::gcd_convolve::GcdConvolve;
48#[codesnip::entry("lagrange_interpolation")]
49pub use self::lagrange_interpolation::{lagrange_interpolation, lagrange_interpolation_polynomial};
50#[codesnip::entry("LcmConvolve")]
51pub use self::lcm_convolve::LcmConvolve;
52#[codesnip::entry("linear_congruence")]
53pub use self::linear_congruence::{solve_linear_congruence, solve_simultaneous_linear_congruence};
54#[codesnip::entry("linear_diophantine")]
55pub use self::linear_diophantine::solve_linear_diophantine;
56#[codesnip::entry("Matrix")]
57pub use self::matrix::Matrix;
58#[codesnip::entry("miller_rabin")]
59pub use self::miller_rabin::{miller_rabin, miller_rabin_with_br};
60#[codesnip::entry("MIntMatrix")]
61pub use self::mint_matrix::MIntMatrix;
62#[codesnip::entry("NumberTheoreticTransform")]
63pub use self::number_theoretic_transform::{Convolve, Convolve998244353, MIntConvolve};
64pub use self::polynomial::*;
65pub use self::prime::*;
66#[codesnip::entry("prime_factors")]
67pub use self::prime_factors::{divisors, prime_factors, prime_factors_flatten};
68#[codesnip::entry("PrimeList")]
69pub use self::prime_list::{PrimeList, with_prime_list};
70#[codesnip::entry("PrimeTable")]
71pub use self::prime_table::PrimeTable;
72#[codesnip::entry("primitive_root")]
73pub use self::primitive_root::{check_primitive_root, primitive_root};
74#[codesnip::entry("QuotientArray")]
75pub use self::quotient_array::QuotientArray;
76#[codesnip::entry("SubsetConvolve")]
77pub use self::subset_convolve::SubsetConvolve;
78
79#[cfg_attr(nightly, codesnip::entry("berlekamp_massey", include("zero_one")))]
80mod berlekamp_massey;
81#[cfg_attr(nightly, codesnip::entry("bitwise_transform"))]
82mod bitwise_transform;
83#[cfg_attr(
84 nightly,
85 codesnip::entry("BitwiseandConvolve", include("_zeta_transform", "bitwise_transform"))
86)]
87mod bitwiseand_convolve;
88#[cfg_attr(
89 nightly,
90 codesnip::entry("BitwiseorConvolve", include("_zeta_transform", "bitwise_transform"))
91)]
92mod bitwiseor_convolve;
93#[cfg_attr(
94 nightly,
95 codesnip::entry("BitwisexorConvolve", include("_zeta_transform", "bitwise_transform"))
96)]
97mod bitwisexor_convolve;
98#[cfg_attr(
99 nightly,
100 codesnip::entry("BlackBoxMatrix", include("FormalPowerSeries", "Matrix", "Xorshift"))
101)]
102mod black_box_matrix;
103#[cfg_attr(nightly, codesnip::entry("ConvolveSteps"))]
104mod convolve_steps;
105#[cfg_attr(
106 nightly,
107 codesnip::entry(
108 "discrete_logarithm",
109 include(
110 "BarrettReduction",
111 "lcm",
112 "modinv",
113 "primitive_root",
114 "PrimeList",
115 "Xorshift"
116 )
117 )
118)]
119mod discrete_logarithm;
120mod factorial;
121#[cfg_attr(
122 nightly,
123 codesnip::entry(
124 "fast_fourier_transform",
125 include("Complex", "AssociatedValue", "ConvolveSteps")
126 )
127)]
128mod fast_fourier_transform;
129#[cfg_attr(
130 nightly,
131 codesnip::entry("floor_sum", include("algebra", "ring", "integer", "BarrettReduction"))
132)]
133mod floor_sum;
134#[cfg_attr(
135 nightly,
136 codesnip::entry(
137 "FormalPowerSeries",
138 include(
139 "NumberTheoreticTransform",
140 "montgomery",
141 "mod_sqrt",
142 "factorial",
143 "PartialIgnoredOrd",
144 "berlekamp_massey"
145 )
146 )
147)]
148mod formal_power_series;
149#[cfg_attr(nightly, codesnip::entry(include("integer")))]
150mod garner;
151mod gcd;
152#[cfg_attr(
153 nightly,
154 codesnip::entry("GcdConvolve", include("_zeta_transform", "PrimeList"))
155)]
156mod gcd_convolve;
157#[cfg_attr(
158 nightly,
159 codesnip::entry("lagrange_interpolation", include("factorial", "MIntBase"))
160)]
161mod lagrange_interpolation;
162#[cfg_attr(
163 nightly,
164 codesnip::entry("LcmConvolve", include("_zeta_transform", "PrimeList"))
165)]
166mod lcm_convolve;
167#[cfg_attr(nightly, codesnip::entry(include("integer")))]
168mod linear_congruence;
169#[cfg_attr(nightly, codesnip::entry(include("integer", "discrete_steps")))]
170mod linear_diophantine;
171#[cfg_attr(
172 nightly,
173 codesnip::entry("Matrix", include("zero_one", "ring", "coding"))
174)]
175mod matrix;
176#[cfg_attr(nightly, codesnip::entry("miller_rabin", include("BarrettReduction")))]
177mod miller_rabin;
178#[cfg_attr(
179 nightly,
180 codesnip::entry("MIntMatrix", include("Matrix", "factorial", "Xorshift"))
181)]
182mod mint_matrix;
183#[cfg_attr(nightly, codesnip::entry("mod_sqrt", include("MIntBase")))]
184mod mod_sqrt;
185#[cfg_attr(
186 nightly,
187 codesnip::entry(
188 "NumberTheoreticTransform",
189 include("montgomery", "ConvolveSteps", "avx_helper")
190 )
191)]
192mod number_theoretic_transform;
193mod polynomial;
194mod prime;
195#[cfg_attr(
196 nightly,
197 codesnip::entry("prime_factors", include("miller_rabin", "gcd"))
198)]
199mod prime_factors;
200#[cfg_attr(nightly, codesnip::entry("PrimeList"))]
201mod prime_list;
202#[cfg_attr(nightly, codesnip::entry("PrimeTable"))]
203mod prime_table;
204#[cfg_attr(nightly, codesnip::entry("primitive_root", include("prime_factors")))]
205mod primitive_root;
206#[cfg_attr(
207 nightly,
208 codesnip::entry("QuotientArray", include("algebra", "ring", "PrimeList"))
209)]
210mod quotient_array;
211#[cfg_attr(
212 nightly,
213 codesnip::entry("SubsetConvolve", include("BitwiseorConvolve"))
214)]
215mod subset_convolve;
216
217#[codesnip::entry("_zeta_transform", include("algebra", "ring", "ConvolveSteps"))]
218#[codesnip::skip]
219#[allow(dead_code)]
220#[doc(hidden)]
221enum ZetaTransformSnippets {}