Skip to content

Commit d4bb776

Browse files
Changed the monoid namme
1 parent 48ceeb6 commit d4bb776

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub use modint::{
2828
ModInt998244353, Modulus, RemEuclidU32, StaticModInt,
2929
};
3030
pub use scc::SccGraph;
31-
pub use segtree::{Max, Monoid, Segtree};
31+
pub use segtree::{Additive, Max, Min, Monoid, Multiplicative, Segtree};
3232
pub use string::{
3333
lcp_array, lcp_array_arbitrary, suffix_array, suffix_array_arbitrary, suffix_array_manual,
3434
z_algorithm, z_algorithm_arbitrary,

src/segtree.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ where
4040
}
4141
}
4242

43-
pub struct Sum<S>(Infallible, PhantomData<fn() -> S>);
44-
impl<S> Monoid for Sum<S>
43+
pub struct Additive<S>(Infallible, PhantomData<fn() -> S>);
44+
impl<S> Monoid for Additive<S>
4545
where
4646
S: Copy + Add<Output = S> + Zero,
4747
{
@@ -54,8 +54,8 @@ where
5454
}
5555
}
5656

57-
pub struct Product<S>(Infallible, PhantomData<fn() -> S>);
58-
impl<S> Monoid for Product<S>
57+
pub struct Multiplicative<S>(Infallible, PhantomData<fn() -> S>);
58+
impl<S> Monoid for Multiplicative<S>
5959
where
6060
S: Copy + Mul<Output = S> + One,
6161
{

0 commit comments

Comments
 (0)