rokdocs
v0.1

rok::core::collections::broadcast

rok::core::collections::broadcast - the element-wise dot operators on List<T> (stdlib spec 2.6.7): List op List (same length, else a panic), List op T and T op List (the scalar applies to every element). Arithmetic / bitwise ones give List<T>, comparisons List<bool>; .&& / .|| combine List<bool>s without short-circuit. An operator on core collections in source is fused into one loop by the compiler (2.6.6); these impls serve trait bounds, method calls and fn values.

Functions

check_len

pub const fn check_len(len: usize, want: usize)

Lengths of two broadcast operands agree (each collection is checked against the first).

Implementations

impl List

  • pub const fn dot_add_assign(self, rhs: List<T>) where T: Add<Output = T>
  • pub fn dot_sub_assign(self, rhs: List<T>) where T: Sub<Output = T>
  • pub const fn dot_mul_assign(self, rhs: List<T>) where T: Mul<Output = T>
  • pub fn dot_div_assign(self, rhs: List<T>) where T: Div<Output = T>
  • pub fn dot_rem_assign(self, rhs: List<T>) where T: Rem<Output = T>
  • pub const fn dot_modulo_assign(self, rhs: List<T>) where T: Modulo<Output = T>
  • pub fn dot_bitand_assign(self, rhs: List<T>) where T: BitAnd<Output = T>
  • pub fn dot_bitor_assign(self, rhs: List<T>) where T: BitOr<Output = T>
  • pub fn dot_bitxor_assign(self, rhs: List<T>) where T: BitXor<Output = T>
  • pub const fn dot_shl_assign(self, rhs: List<T>) where T: Shl<Output = T>
  • pub const fn dot_shr_assign(self, rhs: List<T>) where T: Shr<Output = T>
Trait implementations 36
  • impl<T: Add<Output = T>> DotAdd<List<T>> for List<T>
  • impl<T: Add<Output = T>> DotAdd<T> for List<T>
  • impl<T: Sub<Output = T>> DotSub<List<T>> for List<T>
  • impl<T: Sub<Output = T>> DotSub<T> for List<T>
  • impl<T: Mul<Output = T>> DotMul<List<T>> for List<T>
  • impl<T: Mul<Output = T>> DotMul<T> for List<T>
  • impl<T: Div<Output = T>> DotDiv<List<T>> for List<T>
  • impl<T: Div<Output = T>> DotDiv<T> for List<T>
  • impl<T: Rem<Output = T>> DotRem<List<T>> for List<T>
  • impl<T: Rem<Output = T>> DotRem<T> for List<T>
  • impl<T: Modulo<Output = T>> DotModulo<List<T>> for List<T>
  • impl<T: Modulo<Output = T>> DotModulo<T> for List<T>
  • impl<T: BitAnd<Output = T>> DotBitAnd<List<T>> for List<T>
  • impl<T: BitAnd<Output = T>> DotBitAnd<T> for List<T>
  • impl<T: BitOr<Output = T>> DotBitOr<List<T>> for List<T>
  • impl<T: BitOr<Output = T>> DotBitOr<T> for List<T>
  • impl<T: BitXor<Output = T>> DotBitXor<List<T>> for List<T>
  • impl<T: BitXor<Output = T>> DotBitXor<T> for List<T>
  • impl<T: Shl<Output = T>> DotShl<List<T>> for List<T>
  • impl<T: Shl<Output = T>> DotShl<T> for List<T>
  • impl<T: Shr<Output = T>> DotShr<List<T>> for List<T>
  • impl<T: Shr<Output = T>> DotShr<T> for List<T>
  • impl<T: PartialEq> DotEq<List<T>> for List<T>
  • impl<T: PartialEq> DotEq<T> for List<T>
  • impl<T: PartialEq> DotNe<List<T>> for List<T>
  • impl<T: PartialEq> DotNe<T> for List<T>
  • impl<T: PartialOrd> DotLt<List<T>> for List<T>
  • impl<T: PartialOrd> DotLt<T> for List<T>
  • impl<T: PartialOrd> DotGt<List<T>> for List<T>
  • impl<T: PartialOrd> DotGt<T> for List<T>
  • impl<T: PartialOrd> DotLe<List<T>> for List<T>
  • impl<T: PartialOrd> DotLe<T> for List<T>
  • impl<T: PartialOrd> DotGe<List<T>> for List<T>
  • impl<T: PartialOrd> DotGe<T> for List<T>
  • impl DotLogicalAnd for List<bool>
  • impl DotLogicalOr for List<bool>