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 464)
459pub fn floor_power_sum<R>(x: R::T, y: R::T, n: u64, a: u64, b: u64, m: u64) -> R::T
460where
461 R: SemiRing,
462{
463 floor_monoid_product::<FloorPowerSum<R>>(
464 FloorPowerSum::<R>::to_x(x),
465 FloorPowerSum::<R>::to_y(y),
466 n,
467 a,
468 b,
469 m,
470 )
471 .sum
472}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 465)
459pub fn floor_power_sum<R>(x: R::T, y: R::T, n: u64, a: u64, b: u64, m: u64) -> R::T
460where
461 R: SemiRing,
462{
463 floor_monoid_product::<FloorPowerSum<R>>(
464 FloorPowerSum::<R>::to_x(x),
465 FloorPowerSum::<R>::to_y(y),
466 n,
467 a,
468 b,
469 m,
470 )
471 .sum
472}Trait Implementations§
impl<R> Associative for FloorPowerSum<R>where
R: SemiRing,
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,
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> UnsafeUnpin 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