polars_compute::arithmetic

Trait ArithmeticKernel

Source
pub trait ArithmeticKernel: Sized + Array {
    type Scalar;
    type TrueDivT: NativeType;

Show 24 methods // Required methods fn wrapping_abs(self) -> Self; fn wrapping_neg(self) -> Self; fn wrapping_add(self, rhs: Self) -> Self; fn wrapping_sub(self, rhs: Self) -> Self; fn wrapping_mul(self, rhs: Self) -> Self; fn wrapping_floor_div(self, rhs: Self) -> Self; fn wrapping_trunc_div(self, rhs: Self) -> Self; fn wrapping_mod(self, rhs: Self) -> Self; fn wrapping_add_scalar(self, rhs: Self::Scalar) -> Self; fn wrapping_sub_scalar(self, rhs: Self::Scalar) -> Self; fn wrapping_sub_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self; fn wrapping_mul_scalar(self, rhs: Self::Scalar) -> Self; fn wrapping_floor_div_scalar(self, rhs: Self::Scalar) -> Self; fn wrapping_floor_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self; fn wrapping_trunc_div_scalar(self, rhs: Self::Scalar) -> Self; fn wrapping_trunc_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self; fn wrapping_mod_scalar(self, rhs: Self::Scalar) -> Self; fn wrapping_mod_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self; fn true_div(self, rhs: Self) -> PrimitiveArray<Self::TrueDivT>; fn true_div_scalar( self, rhs: Self::Scalar, ) -> PrimitiveArray<Self::TrueDivT>; fn true_div_scalar_lhs( lhs: Self::Scalar, rhs: Self, ) -> PrimitiveArray<Self::TrueDivT>; // Provided methods fn legacy_div(self, rhs: Self) -> Self { ... } fn legacy_div_scalar(self, rhs: Self::Scalar) -> Self { ... } fn legacy_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self { ... }
}

Required Associated Types§

Required Methods§

Source

fn wrapping_abs(self) -> Self

Source

fn wrapping_neg(self) -> Self

Source

fn wrapping_add(self, rhs: Self) -> Self

Source

fn wrapping_sub(self, rhs: Self) -> Self

Source

fn wrapping_mul(self, rhs: Self) -> Self

Source

fn wrapping_floor_div(self, rhs: Self) -> Self

Source

fn wrapping_trunc_div(self, rhs: Self) -> Self

Source

fn wrapping_mod(self, rhs: Self) -> Self

Source

fn wrapping_add_scalar(self, rhs: Self::Scalar) -> Self

Source

fn wrapping_sub_scalar(self, rhs: Self::Scalar) -> Self

Source

fn wrapping_sub_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Source

fn wrapping_mul_scalar(self, rhs: Self::Scalar) -> Self

Source

fn wrapping_floor_div_scalar(self, rhs: Self::Scalar) -> Self

Source

fn wrapping_floor_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Source

fn wrapping_trunc_div_scalar(self, rhs: Self::Scalar) -> Self

Source

fn wrapping_trunc_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Source

fn wrapping_mod_scalar(self, rhs: Self::Scalar) -> Self

Source

fn wrapping_mod_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Source

fn true_div(self, rhs: Self) -> PrimitiveArray<Self::TrueDivT>

Source

fn true_div_scalar(self, rhs: Self::Scalar) -> PrimitiveArray<Self::TrueDivT>

Source

fn true_div_scalar_lhs( lhs: Self::Scalar, rhs: Self, ) -> PrimitiveArray<Self::TrueDivT>

Provided Methods§

Source

fn legacy_div(self, rhs: Self) -> Self

Source

fn legacy_div_scalar(self, rhs: Self::Scalar) -> Self

Source

fn legacy_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: HasPrimitiveArithmeticKernel> ArithmeticKernel for PrimitiveArray<T>

Source§

type Scalar = T

Source§

type TrueDivT = <T as PrimitiveArithmeticKernelImpl>::TrueDivT

Source§

fn wrapping_abs(self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_add(self, rhs: Self) -> Self

Source§

fn wrapping_sub(self, rhs: Self) -> Self

Source§

fn wrapping_mul(self, rhs: Self) -> Self

Source§

fn wrapping_floor_div(self, rhs: Self) -> Self

Source§

fn wrapping_trunc_div(self, rhs: Self) -> Self

Source§

fn wrapping_mod(self, rhs: Self) -> Self

Source§

fn wrapping_add_scalar(self, rhs: Self::Scalar) -> Self

Source§

fn wrapping_sub_scalar(self, rhs: Self::Scalar) -> Self

Source§

fn wrapping_sub_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Source§

fn wrapping_mul_scalar(self, rhs: Self::Scalar) -> Self

Source§

fn wrapping_floor_div_scalar(self, rhs: Self::Scalar) -> Self

Source§

fn wrapping_floor_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Source§

fn wrapping_trunc_div_scalar(self, rhs: Self::Scalar) -> Self

Source§

fn wrapping_trunc_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Source§

fn wrapping_mod_scalar(self, rhs: Self::Scalar) -> Self

Source§

fn wrapping_mod_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

Source§

fn true_div(self, rhs: Self) -> PrimitiveArray<Self::TrueDivT>

Source§

fn true_div_scalar(self, rhs: Self::Scalar) -> PrimitiveArray<Self::TrueDivT>

Source§

fn true_div_scalar_lhs( lhs: Self::Scalar, rhs: Self, ) -> PrimitiveArray<Self::TrueDivT>

Implementors§