struct FloorPowerSum<R>where
R: SemiRing,{
x: R::T,
sum: R::T,
}Fields§
§x: R::T§sum: R::TImplementations§
Source§impl<R> FloorPowerSum<R>where
R: SemiRing,
impl<R> FloorPowerSum<R>where
R: SemiRing,
Sourcefn to_x(x: R::T) -> Self
fn to_x(x: R::T) -> Self
Examples found in repository?
crates/competitive/src/math/floor_sum.rs (line 415)
410pub fn floor_power_sum<R>(x: R::T, y: R::T, n: u64, a: u64, b: u64, m: u64) -> R::T
411where
412 R: SemiRing,
413{
414 floor_monoid_product::<FloorPowerSum<R>>(
415 FloorPowerSum::<R>::to_x(x),
416 FloorPowerSum::<R>::to_y(y),
417 n,
418 a,
419 b,
420 m,
421 )
422 .sum
423}Sourcefn to_y(y: R::T) -> Self
fn to_y(y: R::T) -> Self
Examples found in repository?
crates/competitive/src/math/floor_sum.rs (line 416)
410pub fn floor_power_sum<R>(x: R::T, y: R::T, n: u64, a: u64, b: u64, m: u64) -> R::T
411where
412 R: SemiRing,
413{
414 floor_monoid_product::<FloorPowerSum<R>>(
415 FloorPowerSum::<R>::to_x(x),
416 FloorPowerSum::<R>::to_y(y),
417 n,
418 a,
419 b,
420 m,
421 )
422 .sum
423}Trait Implementations§
Source§impl<R> Clone for FloorPowerSum<R>where
R: SemiRing,
impl<R> Clone for FloorPowerSum<R>where
R: SemiRing,
Source§impl<R> Debug for FloorPowerSum<R>
impl<R> Debug for FloorPowerSum<R>
Source§impl<R> Magma for FloorPowerSum<R>where
R: SemiRing,
impl<R> Magma for FloorPowerSum<R>where
R: SemiRing,
Source§impl<R> Unital for FloorPowerSum<R>where
R: SemiRing,
impl<R> Unital for FloorPowerSum<R>where
R: SemiRing,
impl<R> Associative for FloorPowerSum<R>where
R: SemiRing,
Auto Trait Implementations§
impl<R> Freeze for FloorPowerSum<R>
impl<R> RefUnwindSafe for FloorPowerSum<R>
impl<R> Send for FloorPowerSum<R>
impl<R> Sync for FloorPowerSum<R>
impl<R> Unpin for FloorPowerSum<R>
impl<R> UnwindSafe for FloorPowerSum<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more