Trait easy_ml::numeric::extra::Pow

source ·
pub trait Pow<Rhs = Self> {
    type Output;

    // Required method
    fn pow(self, rhs: Rhs) -> Self::Output;
}
Expand description

A type which can compute self^rhs.

This is implemented by f32 and f64 for all combinations of by value and by reference, as well as Traces and Records of these.

The Trace and Record implementations also implement versions with the other argument being a raw f32 or f64, for convenience.

Required Associated Types§

Required Methods§

source

fn pow(self, rhs: Rhs) -> Self::Output

Implementations on Foreign Types§

source§

impl Pow for f32

§

type Output = f32

source§

fn pow(self, rhs: Self) -> Self::Output

source§

impl Pow for f64

§

type Output = f64

source§

fn pow(self, rhs: Self) -> Self::Output

source§

impl<'a> Pow<&'a f32> for f32

§

type Output = f32

source§

fn pow(self, rhs: &Self) -> Self::Output

source§

impl<'a> Pow<&'a f64> for f64

§

type Output = f64

source§

fn pow(self, rhs: &Self) -> Self::Output

source§

impl<'a> Pow<f32> for &'a f32

§

type Output = f32

source§

fn pow(self, rhs: f32) -> Self::Output

source§

impl<'a> Pow<f64> for &'a f64

§

type Output = f64

source§

fn pow(self, rhs: f64) -> Self::Output

source§

impl<'a, 'b> Pow<&'b f32> for &'a f32

§

type Output = f32

source§

fn pow(self, rhs: &f32) -> Self::Output

source§

impl<'a, 'b> Pow<&'b f64> for &'a f64

§

type Output = f64

source§

fn pow(self, rhs: &f64) -> Self::Output

source§

impl<'a, T, S> Pow<&RecordContainer<'a, T, MatrixView<(T, usize), S>, 2>> for &T
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: MatrixRef<(T, Index)> + NoInteriorMutability,

Operation for a constant and a record matrix of the same type with both referenced. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, MatrixView<(T, usize), Matrix<(T, usize)>>, 2>

source§

fn pow(self, rhs: &RecordMatrix<'a, T, S>) -> Self::Output

source§

impl<'a, T, S> Pow<RecordContainer<'a, T, MatrixView<(T, usize), S>, 2>> for &T
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: MatrixRef<(T, Index)> + NoInteriorMutability,

Operation for a referenced constant and a record matrix of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, MatrixView<(T, usize), Matrix<(T, usize)>>, 2>

source§

fn pow(self, rhs: RecordMatrix<'a, T, S>) -> Self::Output

source§

impl<'a, T, S, const D: usize> Pow<&RecordContainer<'a, T, TensorView<(T, usize), S, D>, D>> for &T
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: TensorRef<(T, Index), D>,

Operation for a constant and a record tensor of the same type with both referenced. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, TensorView<(T, usize), Tensor<(T, usize), D>, D>, D>

source§

fn pow(self, rhs: &RecordTensor<'a, T, S, D>) -> Self::Output

source§

impl<'a, T, S, const D: usize> Pow<RecordContainer<'a, T, TensorView<(T, usize), S, D>, D>> for &T
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: TensorRef<(T, Index), D>,

Operation for a referenced constant and a record tensor of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, TensorView<(T, usize), Tensor<(T, usize), D>, D>, D>

source§

fn pow(self, rhs: RecordTensor<'a, T, S, D>) -> Self::Output

source§

impl<'a, T: Numeric + Real + Primitive> Pow<&Record<'a, T>> for &T
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Power of a constant to a Record of the same type with both referenced.

§

type Output = Record<'a, T>

source§

fn pow(self, rhs: &Record<'a, T>) -> Self::Output

source§

impl<'a, T: Numeric + Real + Primitive> Pow<Record<'a, T>> for &T
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for a constant and a record of the same type with the left referenced.

§

type Output = Record<'a, T>

source§

fn pow(self, rhs: Record<'a, T>) -> Self::Output

source§

impl<T: Numeric + Real + Primitive> Pow<&Trace<T>> for &T
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Power of a constant to a trace of the same type with both referenced.

§

type Output = Trace<T>

source§

fn pow(self, rhs: &Trace<T>) -> Self::Output

source§

impl<T: Numeric + Real + Primitive> Pow<Trace<T>> for &T
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for a trace and a constant of the same type with the left referenced.

§

type Output = Trace<T>

source§

fn pow(self, rhs: Trace<T>) -> Self::Output

Implementors§

source§

impl<'a, 'l, 'r, T: Numeric + Real + Primitive> Pow<&'r Record<'a, T>> for &'l Record<'a, T>
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Power of one Record to another, ie self^rhs for two records of the same type with both referenced and both using the same WengertList.

§

type Output = Record<'a, T>

source§

impl<'a, T, S> Pow<&RecordContainer<'a, T, MatrixView<(T, usize), S>, 2>> for T
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: MatrixRef<(T, Index)> + NoInteriorMutability,

Operation for a constant and a referenced record matrix of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, MatrixView<(T, usize), Matrix<(T, usize)>>, 2>

source§

impl<'a, T, S> Pow<&T> for &RecordMatrix<'a, T, S>
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: MatrixRef<(T, Index)> + NoInteriorMutability,

Operation for a record matrix and a constant with both referenced. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, MatrixView<(T, usize), Matrix<(T, usize)>>, 2>

source§

impl<'a, T, S> Pow<&T> for RecordMatrix<'a, T, S>
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: MatrixRef<(T, Index)> + NoInteriorMutability,

Operation for a record matrix and a referenced constant. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, MatrixView<(T, usize), Matrix<(T, usize)>>, 2>

source§

impl<'a, T, S> Pow<RecordContainer<'a, T, MatrixView<(T, usize), S>, 2>> for T
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: MatrixRef<(T, Index)> + NoInteriorMutability,

Operation for a constant and a record matrix of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, MatrixView<(T, usize), Matrix<(T, usize)>>, 2>

source§

impl<'a, T, S> Pow<T> for &RecordMatrix<'a, T, S>
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: MatrixRef<(T, Index)> + NoInteriorMutability,

Operation for a referenced record matrix and a constant of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, MatrixView<(T, usize), Matrix<(T, usize)>>, 2>

source§

impl<'a, T, S> Pow<T> for RecordMatrix<'a, T, S>
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: MatrixRef<(T, Index)> + NoInteriorMutability,

Operation for a record matrix and a constant of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, MatrixView<(T, usize), Matrix<(T, usize)>>, 2>

source§

impl<'a, T, S, const D: usize> Pow<&RecordContainer<'a, T, TensorView<(T, usize), S, D>, D>> for T
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: TensorRef<(T, Index), D>,

Operation for a constant and a referenced record tensor of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, TensorView<(T, usize), Tensor<(T, usize), D>, D>, D>

source§

impl<'a, T, S, const D: usize> Pow<&T> for &RecordTensor<'a, T, S, D>
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: TensorRef<(T, Index), D>,

Operation for a record tensor and a constant with both referenced. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, TensorView<(T, usize), Tensor<(T, usize), D>, D>, D>

source§

impl<'a, T, S, const D: usize> Pow<&T> for RecordTensor<'a, T, S, D>
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: TensorRef<(T, Index), D>,

Operation for a record tensor and a referenced constant. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, TensorView<(T, usize), Tensor<(T, usize), D>, D>, D>

source§

impl<'a, T, S, const D: usize> Pow<RecordContainer<'a, T, TensorView<(T, usize), S, D>, D>> for T
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: TensorRef<(T, Index), D>,

Operation for a constant and a record tensor of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, TensorView<(T, usize), Tensor<(T, usize), D>, D>, D>

source§

impl<'a, T, S, const D: usize> Pow<T> for &RecordTensor<'a, T, S, D>
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: TensorRef<(T, Index), D>,

Operation for a referenced record tensor and a constant of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, TensorView<(T, usize), Tensor<(T, usize), D>, D>, D>

source§

impl<'a, T, S, const D: usize> Pow<T> for RecordTensor<'a, T, S, D>
where T: Numeric + Real + Primitive, for<'t> &'t T: NumericRef<T> + RealRef<T>, S: TensorRef<(T, Index), D>,

Operation for a record tensor and a constant of the same type. The scalar is applied to all elements, this is a shorthand for unary().

§

type Output = RecordContainer<'a, T, TensorView<(T, usize), Tensor<(T, usize), D>, D>, D>

source§

impl<'a, T: Numeric + Real + Primitive> Pow for Record<'a, T>
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for two records of the same type.

§

type Output = Record<'a, T>

source§

impl<'a, T: Numeric + Real + Primitive> Pow<&Record<'a, T>> for Record<'a, T>
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for two records of the same type with the right referenced.

§

type Output = Record<'a, T>

source§

impl<'a, T: Numeric + Real + Primitive> Pow<&Record<'a, T>> for T
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for a constant and a record of the same type with the right referenced.

§

type Output = Record<'a, T>

source§

impl<'a, T: Numeric + Real + Primitive> Pow<&T> for &Record<'a, T>
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Power of one Record to a constant of the same type with both referenced.

§

type Output = Record<'a, T>

source§

impl<'a, T: Numeric + Real + Primitive> Pow<&T> for Record<'a, T>
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for a record and a constant of the same type with the right referenced.

§

type Output = Record<'a, T>

source§

impl<'a, T: Numeric + Real + Primitive> Pow<Record<'a, T>> for &Record<'a, T>
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for two records of the same type with the left referenced.

§

type Output = Record<'a, T>

source§

impl<'a, T: Numeric + Real + Primitive> Pow<Record<'a, T>> for T
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for a constant and a record of the same type.

§

type Output = Record<'a, T>

source§

impl<'a, T: Numeric + Real + Primitive> Pow<T> for &Record<'a, T>
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for a record and a constant of the same type with the left referenced.

§

type Output = Record<'a, T>

source§

impl<'a, T: Numeric + Real + Primitive> Pow<T> for Record<'a, T>
where for<'t> &'t T: NumericRef<T> + RealRef<T>,

Operation for a record and a constant of the same type.

§

type Output = Record<'a, T>

source§

impl<'l, 'r, T: Numeric + Real + Primitive> Pow<&'r Trace<T>> for &'l Trace<T>
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Power of one Trace to another, ie self^rhs for two traces of the same type with both referenced.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow for Trace<T>
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for two traces of the same type.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow<&Trace<T>> for Trace<T>
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for two traces of the same type with the right referenced.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow<&Trace<T>> for T
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for a trace and a constant of the same type with the right referenced.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow<&T> for &Trace<T>
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Power of a trace to a constant of the same type with both referenced.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow<&T> for Trace<T>
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for a trace and a constant of the same type with the right referenced.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow<Trace<T>> for &Trace<T>
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for two traces of the same type with the left referenced.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow<Trace<T>> for T
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for a trace and a constant of the same type.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow<T> for &Trace<T>
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for a trace and a constant of the same type with the left referenced.

§

type Output = Trace<T>

source§

impl<T: Numeric + Real + Primitive> Pow<T> for Trace<T>
where for<'a> &'a T: NumericRef<T> + RealRef<T>,

Operation for a trace and a constant of the same type.

§

type Output = Trace<T>