Ndarr

Struct Ndarr 

Source
pub struct Ndarr<T: Clone, R: Unsigned> {
    pub data: Vec<T>,
    pub dim: Dim<R>,
}
Expand description

Main struct of N Dimensional generic array. The shape is denoted by the shape array where the length is the Rank of the Ndarray the actual values are stored in a flattened state in a rank 1 array.

Fields§

§data: Vec<T>§dim: Dim<R>

Implementations§

Source§

impl<T: Clone + Debug, R: Unsigned> Ndarr<T, R>

Source

pub fn assign_at<D: Into<Dim<R>>>(&mut self, index: D, value: T)

Modifies an element at an specific position by assign a new value.

Source

pub fn index_slice_notyped(&self, axis: usize, index: usize) -> Ndarr<T, UTerm>

Source§

impl<T1: Clone + Debug, R1: Unsigned> Ndarr<T1, R1>

Source

pub fn poly_dyadic<F, T2, T3, R2: Unsigned>( &self, other: &Ndarr<T2, R2>, f: F, ) -> Result<Ndarr<T3, Maximum<R1, R2>>, DimError>
where R1: Max<R2>, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug, T2: Clone + Debug, T3: Clone + Debug, F: Fn(T1, T2) -> T3,

Source

pub fn mat_mul<R2: Unsigned>( &self, other: &Ndarr<T1, R2>, ) -> Ndarr<T1, Sub1<Sub1<Sum<R1, R2>>>>
where R1: Max<R2> + Add<R2>, <R1 as Max<R2>>::Output: Unsigned, <R1 as Add<R2>>::Output: Sub<B1>, <<R1 as Add<R2>>::Output as Sub<B1>>::Output: Sub<B1>, <<<R1 as Add<R2>>::Output as Sub<B1>>::Output as Sub<B1>>::Output: Unsigned, T1: Clone + Debug + Default + Add<Output = T1> + Mul<Output = T1>,

Source

pub fn inner_product<F, G, T2, T3, R2: Unsigned>( &self, other: &Ndarr<T2, R2>, f: F, g: G, ) -> Ndarr<T3, Sub1<Sub1<Sum<R1, R2>>>>
where R1: Max<R2> + Add<R2>, <R1 as Max<R2>>::Output: Unsigned, <R1 as Add<R2>>::Output: Sub<B1>, <<R1 as Add<R2>>::Output as Sub<B1>>::Output: Sub<B1>, <<<R1 as Add<R2>>::Output as Sub<B1>>::Output as Sub<B1>>::Output: Unsigned, T1: Clone + Debug, T2: Clone + Debug, T3: Clone + Debug, F: Fn(T1, T2) -> T3, G: Fn(T3, T3) -> T3,

Source

pub fn outer_product<F, T2, T3, R2: Unsigned>( &self, other: &Ndarr<T2, R2>, f: F, ) -> Ndarr<T3, Sum<R1, R2>>
where R1: Max<R2> + Add<R2>, <R1 as Max<R2>>::Output: Unsigned, <R1 as Add<R2>>::Output: Unsigned, T1: Clone + Debug, T2: Clone + Debug, T3: Clone + Debug, F: Fn(T1, T2) -> T3,

Examples found in repository?
examples/conway_gol.rs (line 15)
11fn update(mat: &mut Ndarr<i8, U2>) {
12    let rolls = Ndarr::from([1, 0, -1]);
13    let out = rolls
14        .map(|r| mat.roll(*r, 0))
15        .outer_product(&rolls, |a, r| a.roll(r, 1))
16        .sum();
17    mat.bimap_in_place(&out, |prev, new| {
18        if new == 3 || (prev == 1 && (new == 4)) {
19            1
20        } else {
21            0
22        }
23    })
24}
Source§

impl<T, R: Unsigned> Ndarr<T, R>
where T: Clone + Debug + Signed + PartialOrd,

Source

pub fn abs(&self) -> Self

Source

pub fn is_positive(&self) -> Ndarr<bool, R>

Source

pub fn is_negative(&self) -> Ndarr<bool, R>

Source§

impl<T, R: Unsigned> Ndarr<T, R>
where T: Clone + Debug,

Source

pub fn sum(&self) -> T
where T: Add<Output = T>,

Examples found in repository?
examples/conway_gol.rs (line 16)
11fn update(mat: &mut Ndarr<i8, U2>) {
12    let rolls = Ndarr::from([1, 0, -1]);
13    let out = rolls
14        .map(|r| mat.roll(*r, 0))
15        .outer_product(&rolls, |a, r| a.roll(r, 1))
16        .sum();
17    mat.bimap_in_place(&out, |prev, new| {
18        if new == 3 || (prev == 1 && (new == 4)) {
19            1
20        } else {
21            0
22        }
23    })
24}
Source

pub fn max(&self) -> Option<&T>
where T: Ord,

Source§

impl<T, R: Unsigned> Ndarr<T, R>
where T: Clone + Copy + Debug + Default + Float,

Source

pub fn sin(&self) -> Self

Source

pub fn cos(&self) -> Self

Source

pub fn tan(&self) -> Self

Source

pub fn sinh(&self) -> Self

Source

pub fn cosh(&self) -> Self

Source

pub fn tanh(&self) -> Self

Source

pub fn exp(&self) -> Self

Examples found in repository?
examples/ising_model.rs (line 18)
14fn metropolis(spin_arr: &mut Ndarr<f32, U2>) {
15    let energy: Ndarr<f32, U2> = 2.
16        * spin_arr.clone()
17        * (spin_arr.roll(1, 0) + spin_arr.roll(-1, 0) + spin_arr.roll(1, 1) + spin_arr.roll(-1, 1));
18    let temp_exp = (-&energy / T).exp();
19    let indexes: Vec<usize> = (0..N).collect();
20    let i_s = NdarrRand::choose(&indexes, [M], None); //random i indexes
21    let j_s = NdarrRand::choose(&indexes, [M], None); //random j indexes
22    let p_swich: f32 = NdarrRand::uniform(0.0, 1.0, [1], None)[0]; // selection probability of random spin switch
23    for (i, j) in i_s.data.iter().zip(j_s.data.iter()) {
24        if energy[[*i, *j]] < 0.0 || p_swich < temp_exp[[*i, *j]] {
25            spin_arr[[*i, *j]] *= &-1.0;
26        }
27    }
28}
Source

pub fn log(&self, base: T) -> Self

Source

pub fn ln(&self) -> Self

Source

pub fn log2(&self) -> Self

Source

pub fn is_infinite(&self) -> Ndarr<bool, R>

Source

pub fn is_finite(&self) -> Ndarr<bool, R>

Source

pub fn is_normal(&self) -> Ndarr<bool, R>

Source

pub fn is_nan(&self) -> Ndarr<bool, R>

Source

pub fn maxf(&self) -> T

Max Float, floating types do not implement Ord, but this gives a way to get the maximum value in an Ndarr if all comparisons are allowed.

Source

pub fn minf(&self) -> T

Min Float, floating types do not implement Ord, but this gives a way to get the minimum value in an Ndarr if all comparisons are allowed.

Source§

impl<T1: Clone, R: Unsigned> Ndarr<T1, R>

Source

pub fn map_in_place<F1: Fn(&T1) -> T1>(&mut self, f: F1)

Source

pub fn map<T2: Clone + Debug, F2: Fn(&T1) -> T2>(&self, f: F2) -> Ndarr<T2, R>

Examples found in repository?
examples/conway_gol.rs (line 14)
11fn update(mat: &mut Ndarr<i8, U2>) {
12    let rolls = Ndarr::from([1, 0, -1]);
13    let out = rolls
14        .map(|r| mat.roll(*r, 0))
15        .outer_product(&rolls, |a, r| a.roll(r, 1))
16        .sum();
17    mat.bimap_in_place(&out, |prev, new| {
18        if new == 3 || (prev == 1 && (new == 4)) {
19            1
20        } else {
21            0
22        }
23    })
24}
25
26fn main() {
27    //initialize game matrix with random 0 or 1
28    let mut x = NdarrRand::choose(&[0, 1], [N, N], None);
29    let mut stdout = stdout();
30    stdout.flush().unwrap();
31    stdout.write_all(b"\x1B[2J\x1B[1;1H").unwrap();
32
33    for i in 0..STEPS {
34        update(&mut x); //call update function
35        let vis = x.map(|x| {
36            if *x == 0 {
37                "░".to_string()
38            } else {
39                "█".to_string()
40            }
41        }); //make it pretty
42        println!("{}", vis);
43        println!(
44            "\n Conway's Game of Life using rapl: [Step {} out of {}] \n",
45            i + 1,
46            STEPS
47        );
48        sleep(Duration::from_millis(50));
49        stdout.write_all(b"\x1B[1;1H").unwrap();
50        stdout.flush().unwrap();
51    }
52    stdout.write_all(b"\x1B[2J\x1B[1;1H").unwrap();
53}
More examples
Hide additional examples
examples/ising_model.rs (lines 37-43)
30fn main() {
31    let mut stdout = stdout();
32    let mut spin_arr = NdarrRand::choose(&[-1.0, 1.0], [N, N], None);
33    stdout.flush().unwrap();
34    stdout.write_all(b"\x1B[2J\x1B[1;1H").unwrap();
35    for i in 0..STEPS {
36        metropolis(&mut spin_arr); //updates array with metropolis algorithm
37        let vis = spin_arr.map(|x| {
38            if *x < 0.0 {
39                "░".to_string()
40            } else {
41                "█".to_string()
42            }
43        }); //make it pretty
44
45        println!("{}", vis);
46
47        println!(
48            "\n The Ising Model using rapl: [Step {} out of {}] \n \n for more info: https://en.wikipedia.org/wiki/Ising_model"
49        , i + 1, STEPS);
50        sleep(Duration::from_millis(5));
51        stdout.write_all(b"\x1B[1;1H").unwrap();
52        stdout.flush().unwrap();
53    }
54    stdout.write_all(b"\x1B[2J\x1B[1;1H").unwrap();
55    stdout.flush().unwrap();
56}
Source

pub fn bimap<F: Fn(T1, T1) -> T1>(&self, other: &Self, f: F) -> Self
where T1: Default,

Source

pub fn bimap_in_place<F: Fn(T1, T1) -> T1>(&mut self, other: &Self, f: F)

Examples found in repository?
examples/conway_gol.rs (lines 17-23)
11fn update(mat: &mut Ndarr<i8, U2>) {
12    let rolls = Ndarr::from([1, 0, -1]);
13    let out = rolls
14        .map(|r| mat.roll(*r, 0))
15        .outer_product(&rolls, |a, r| a.roll(r, 1))
16        .sum();
17    mat.bimap_in_place(&out, |prev, new| {
18        if new == 3 || (prev == 1 && (new == 4)) {
19            1
20        } else {
21            0
22        }
23    })
24}
Source

pub fn scanr<F: Fn(T1, T1) -> T1>(&self, axis: usize, f: F) -> Self
where T1: Default, R: Sub<B1>, <R as Sub<B1>>::Output: Unsigned + Add<B1>, <<R as Sub<B1>>::Output as Add<B1>>::Output: Unsigned,

Source

pub fn scanl<F: Fn(T1, T1) -> T1>(&self, axis: usize, f: F) -> Self
where T1: Default, R: Sub<B1>, <R as Sub<B1>>::Output: Unsigned + Add<B1>, <<R as Sub<B1>>::Output as Add<B1>>::Output: Unsigned,

Source§

impl<T: Float + Default + Clone + Debug, R: Unsigned> Ndarr<T, R>

Source

pub fn threshold(&self, threshold: &T, value: &T) -> Self

Source

pub fn hard_tanh(&self, min_val: &T, max_val: &T) -> Self

Source

pub fn elu(&self, alpha: &T) -> Self

Source

pub fn hard_shrink(&self, lambda: &T) -> Self

Source

pub fn hard_sigmoid(&self) -> Self

Source

pub fn hard_swish(&self) -> Self

Source

pub fn log_sigmoid(&self) -> Self

Source

pub fn relu_6(&self) -> Self

Source

pub fn selu(&self) -> Self

Source

pub fn celu(&self, alpha: &T) -> Self

Source

pub fn silu(&self) -> Self

Source

pub fn softplus(&self, beta: &T) -> Self

Source

pub fn mish(&self) -> Self

Source

pub fn softshrink(&self, lambda: &T) -> Self

Source

pub fn softsign(&self) -> Self

Source

pub fn tanhshrink(&self) -> Self

Source

pub fn sigmoid(&self) -> Self

Source

pub fn relu(&self) -> Self

Source

pub fn leaky_relu(&self, a: T) -> Self

Source

pub fn softmax(&self) -> Self

Source§

impl<T, R: Unsigned> Ndarr<T, R>
where T: Clone + Debug + Default,

Source

pub fn zeros<D: Into<Dim<R>>>(shape: D) -> Self
where T: Zero,

Examples found in repository?
examples/image_fft.rs (line 12)
5fn main() {
6    //open image as lumaf32 (gray scale) where 0.0 is white 1.0 is black.
7    let img = open_lumaf32("graphics/peppers.png").unwrap();
8    //transform to complex and take the 2D FFT
9    let fft = img.to_complex().fft2d();
10
11    //initialize kernel for convolution
12    let mut kernel: Ndarr<f32, _> = Ndarr::zeros(&fft.dim);
13    let (m, n) = (img.shape()[0], img.shape()[1]);
14    let mid_x = m / 2;
15    let mid_y = n / 2;
16    kernel[[mid_x, mid_y]] = 4.;
17    kernel[[mid_x + 1, mid_y]] = -1.;
18    kernel[[mid_x - 1, mid_y]] = -1.;
19    kernel[[mid_x, mid_y + 1]] = -1.;
20    kernel[[mid_x, mid_y - 1]] = -1.;
21    //FFT the kernell
22    let kernell = kernel.to_complex().fft2d();
23    //multiply the image FFT to the kernel fft to then do the inverse transform to ger the convolution of the
24    //image and the kernel
25    let out = (fft * kernell).ifft2().fftshif().re();
26    //save output image
27    out.save_as_luma("graphics/pepper_edges.png", ImageFormat::Png)
28}
Source

pub fn ones<D: Into<Dim<R>>>(shape: D) -> Self
where T: One,

Source

pub fn fill<D: Into<Dim<R>>>(with: T, shape: D) -> Self

Source§

impl<T: Debug + Clone + Add<Output = T> + Div<Output = T> + Sub<Output = T>> Ndarr<T, U1>

Source

pub fn linspace(start: T, end: T, n: u16) -> Self
where u16: TryInto<T>, <u16 as TryInto<T>>::Error: Debug,

Return evenly spaced numbers over a specified interval.

Source

pub fn logspace(start: T, end: T, base: T, n: u16) -> Self
where u16: TryInto<T>, <u16 as TryInto<T>>::Error: Debug, T: Pow<T, Output = T> + Mul<Output = T> + Copy,

Return an Ndarr numbers spaced evenly on a log scale.

Source

pub fn geomspace(start: T, end: T, n: u16) -> Self
where u16: TryInto<T>, <u16 as TryInto<T>>::Error: Debug, T: Pow<T, Output = T> + Mul<Output = T> + Copy,

Generates a sequence of values that form a geometric progression.

Source§

impl Ndarr<u8, U3>

Source

pub fn save_as_rgb<P: AsRef<Path>>(&self, path: P, fmt: ImageFormat)

Saves a Ndarr<u8,3> with shape (with, heighth, 3) as RGB Image. Takes path and format, where format is enum: ImageFormat.

Source§

impl Ndarr<f32, U3>

Source

pub fn save_as_rgb<P: AsRef<Path>>(&self, path: P, fmt: ImageFormat)

Saves a Ndarr<f32,3> with shape (with, heighth, 3) as RGB Image. Takes path and format, where format is enum: ImageFormat.

Source§

impl Ndarr<u8, U2>

Source

pub fn save_as_luma<P: AsRef<Path>>(&self, path: P, fmt: ImageFormat)

Saves a Ndarr<u8,2> with shape (with, heighth) as Luma (Black and white) Image. Takes path and format, where format is enum: ImageFormat.

Source§

impl Ndarr<f32, U2>

Source

pub fn save_as_luma<P: AsRef<Path>>(&self, path: P, fmt: ImageFormat)

Normalize a Ndarr<f32,2> to values form 0.0 to 1.0 and saves it as Luma (Black and white) Image. Takes path and format, where format is enum: ImageFormat.

Examples found in repository?
examples/image_fft.rs (line 27)
5fn main() {
6    //open image as lumaf32 (gray scale) where 0.0 is white 1.0 is black.
7    let img = open_lumaf32("graphics/peppers.png").unwrap();
8    //transform to complex and take the 2D FFT
9    let fft = img.to_complex().fft2d();
10
11    //initialize kernel for convolution
12    let mut kernel: Ndarr<f32, _> = Ndarr::zeros(&fft.dim);
13    let (m, n) = (img.shape()[0], img.shape()[1]);
14    let mid_x = m / 2;
15    let mid_y = n / 2;
16    kernel[[mid_x, mid_y]] = 4.;
17    kernel[[mid_x + 1, mid_y]] = -1.;
18    kernel[[mid_x - 1, mid_y]] = -1.;
19    kernel[[mid_x, mid_y + 1]] = -1.;
20    kernel[[mid_x, mid_y - 1]] = -1.;
21    //FFT the kernell
22    let kernell = kernel.to_complex().fft2d();
23    //multiply the image FFT to the kernel fft to then do the inverse transform to ger the convolution of the
24    //image and the kernel
25    let out = (fft * kernell).ifft2().fftshif().re();
26    //save output image
27    out.save_as_luma("graphics/pepper_edges.png", ImageFormat::Png)
28}
Source§

impl<T: Clone + Debug + Copy + PartialEq> Ndarr<C<T>, U1>

Source

pub fn fft(&self) -> Ndarr<C<T>, U1>
where T: Signed + FromPrimitive + Num + Copy + PartialEq + Send + Sync + 'static,

Performs the one dimensional Fourier Transform to a rank one rapl array: Ndarr<C<T>,U1>.

Source

pub fn ifft(&self) -> Ndarr<C<T>, U1>
where T: Signed + FromPrimitive + Num + Copy + PartialEq + Send + Sync + 'static,

Performs the one dimensional Inverse Fourier Transform to a rank one rapl array: a = Ndarr<C<T>,U1>. then a.fft().ifft() is approximately equal to a

Source§

impl<T: Clone + Debug + Copy + PartialEq> Ndarr<C<T>, U2>

Source

pub fn fft2d(&self) -> Ndarr<C<T>, U2>
where T: Signed + FromPrimitive + Num + Copy + PartialEq + Send + Sync + 'static,

Performs the two dimensional Fourier Transform to a rank two rapl array: Ndarr<C<T>,U2>.

Examples found in repository?
examples/image_fft.rs (line 9)
5fn main() {
6    //open image as lumaf32 (gray scale) where 0.0 is white 1.0 is black.
7    let img = open_lumaf32("graphics/peppers.png").unwrap();
8    //transform to complex and take the 2D FFT
9    let fft = img.to_complex().fft2d();
10
11    //initialize kernel for convolution
12    let mut kernel: Ndarr<f32, _> = Ndarr::zeros(&fft.dim);
13    let (m, n) = (img.shape()[0], img.shape()[1]);
14    let mid_x = m / 2;
15    let mid_y = n / 2;
16    kernel[[mid_x, mid_y]] = 4.;
17    kernel[[mid_x + 1, mid_y]] = -1.;
18    kernel[[mid_x - 1, mid_y]] = -1.;
19    kernel[[mid_x, mid_y + 1]] = -1.;
20    kernel[[mid_x, mid_y - 1]] = -1.;
21    //FFT the kernell
22    let kernell = kernel.to_complex().fft2d();
23    //multiply the image FFT to the kernel fft to then do the inverse transform to ger the convolution of the
24    //image and the kernel
25    let out = (fft * kernell).ifft2().fftshif().re();
26    //save output image
27    out.save_as_luma("graphics/pepper_edges.png", ImageFormat::Png)
28}
Source

pub fn ifft2(&self) -> Ndarr<C<T>, U2>
where T: Signed + FromPrimitive + Num + Copy + PartialEq + Send + Sync + 'static,

Examples found in repository?
examples/image_fft.rs (line 25)
5fn main() {
6    //open image as lumaf32 (gray scale) where 0.0 is white 1.0 is black.
7    let img = open_lumaf32("graphics/peppers.png").unwrap();
8    //transform to complex and take the 2D FFT
9    let fft = img.to_complex().fft2d();
10
11    //initialize kernel for convolution
12    let mut kernel: Ndarr<f32, _> = Ndarr::zeros(&fft.dim);
13    let (m, n) = (img.shape()[0], img.shape()[1]);
14    let mid_x = m / 2;
15    let mid_y = n / 2;
16    kernel[[mid_x, mid_y]] = 4.;
17    kernel[[mid_x + 1, mid_y]] = -1.;
18    kernel[[mid_x - 1, mid_y]] = -1.;
19    kernel[[mid_x, mid_y + 1]] = -1.;
20    kernel[[mid_x, mid_y - 1]] = -1.;
21    //FFT the kernell
22    let kernell = kernel.to_complex().fft2d();
23    //multiply the image FFT to the kernel fft to then do the inverse transform to ger the convolution of the
24    //image and the kernel
25    let out = (fft * kernell).ifft2().fftshif().re();
26    //save output image
27    out.save_as_luma("graphics/pepper_edges.png", ImageFormat::Png)
28}
Source§

impl<T: Clone + Debug> Ndarr<T, U1>

Source

pub fn fftshif(&self) -> Self

Source§

impl<T: Clone + Debug> Ndarr<T, U2>

Source

pub fn fftshif(&self) -> Self

Examples found in repository?
examples/image_fft.rs (line 25)
5fn main() {
6    //open image as lumaf32 (gray scale) where 0.0 is white 1.0 is black.
7    let img = open_lumaf32("graphics/peppers.png").unwrap();
8    //transform to complex and take the 2D FFT
9    let fft = img.to_complex().fft2d();
10
11    //initialize kernel for convolution
12    let mut kernel: Ndarr<f32, _> = Ndarr::zeros(&fft.dim);
13    let (m, n) = (img.shape()[0], img.shape()[1]);
14    let mid_x = m / 2;
15    let mid_y = n / 2;
16    kernel[[mid_x, mid_y]] = 4.;
17    kernel[[mid_x + 1, mid_y]] = -1.;
18    kernel[[mid_x - 1, mid_y]] = -1.;
19    kernel[[mid_x, mid_y + 1]] = -1.;
20    kernel[[mid_x, mid_y - 1]] = -1.;
21    //FFT the kernell
22    let kernell = kernel.to_complex().fft2d();
23    //multiply the image FFT to the kernel fft to then do the inverse transform to ger the convolution of the
24    //image and the kernel
25    let out = (fft * kernell).ifft2().fftshif().re();
26    //save output image
27    out.save_as_luma("graphics/pepper_edges.png", ImageFormat::Png)
28}
Source§

impl<T: Copy + PartialEq + Clone + Debug + Default, R: Unsigned> Ndarr<C<T>, R>

Source

pub fn re(&self) -> Ndarr<T, R>

Examples found in repository?
examples/image_fft.rs (line 25)
5fn main() {
6    //open image as lumaf32 (gray scale) where 0.0 is white 1.0 is black.
7    let img = open_lumaf32("graphics/peppers.png").unwrap();
8    //transform to complex and take the 2D FFT
9    let fft = img.to_complex().fft2d();
10
11    //initialize kernel for convolution
12    let mut kernel: Ndarr<f32, _> = Ndarr::zeros(&fft.dim);
13    let (m, n) = (img.shape()[0], img.shape()[1]);
14    let mid_x = m / 2;
15    let mid_y = n / 2;
16    kernel[[mid_x, mid_y]] = 4.;
17    kernel[[mid_x + 1, mid_y]] = -1.;
18    kernel[[mid_x - 1, mid_y]] = -1.;
19    kernel[[mid_x, mid_y + 1]] = -1.;
20    kernel[[mid_x, mid_y - 1]] = -1.;
21    //FFT the kernell
22    let kernell = kernel.to_complex().fft2d();
23    //multiply the image FFT to the kernel fft to then do the inverse transform to ger the convolution of the
24    //image and the kernel
25    let out = (fft * kernell).ifft2().fftshif().re();
26    //save output image
27    out.save_as_luma("graphics/pepper_edges.png", ImageFormat::Png)
28}
Source

pub fn im(&self) -> Ndarr<T, R>

Source§

impl<T: Copy + PartialEq + Num + Debug, R: Unsigned> Ndarr<T, R>

Source

pub fn to_complex(&self) -> Ndarr<C<T>, R>

Examples found in repository?
examples/image_fft.rs (line 9)
5fn main() {
6    //open image as lumaf32 (gray scale) where 0.0 is white 1.0 is black.
7    let img = open_lumaf32("graphics/peppers.png").unwrap();
8    //transform to complex and take the 2D FFT
9    let fft = img.to_complex().fft2d();
10
11    //initialize kernel for convolution
12    let mut kernel: Ndarr<f32, _> = Ndarr::zeros(&fft.dim);
13    let (m, n) = (img.shape()[0], img.shape()[1]);
14    let mid_x = m / 2;
15    let mid_y = n / 2;
16    kernel[[mid_x, mid_y]] = 4.;
17    kernel[[mid_x + 1, mid_y]] = -1.;
18    kernel[[mid_x - 1, mid_y]] = -1.;
19    kernel[[mid_x, mid_y + 1]] = -1.;
20    kernel[[mid_x, mid_y - 1]] = -1.;
21    //FFT the kernell
22    let kernell = kernel.to_complex().fft2d();
23    //multiply the image FFT to the kernel fft to then do the inverse transform to ger the convolution of the
24    //image and the kernel
25    let out = (fft * kernell).ifft2().fftshif().re();
26    //save output image
27    out.save_as_luma("graphics/pepper_edges.png", ImageFormat::Png)
28}
Source§

impl<T: Copy + PartialEq + Neg<Output = T> + Clone + Debug + Default, R: Unsigned> Ndarr<C<T>, R>

Source

pub fn conj(&self) -> Self

Element wise complex conjugate.

Source

pub fn h(&self) -> Self

Conjugate or Hermitian transpose.

Source§

impl<T, R: Unsigned> Ndarr<C<T>, R>
where T: Copy + PartialEq + Neg<Output = T> + Clone + Debug + Default + Div<Output = T> + Mul<Output = T> + Add<Output = T>,

Source

pub fn inv(&self) -> Self

Applies inv element wise.

Source§

impl<T: Copy + PartialEq + Add<Output = T> + Mul<Output = T> + Clone + Debug + Default, R: Unsigned> Ndarr<C<T>, R>

Source

pub fn r_square(&self) -> Ndarr<T, R>

Source§

impl<T, R: Unsigned> Ndarr<C<T>, R>
where C<T>: MulAssign + Debug, T: Clone + Default + Debug + Copy + PartialEq + Num,

Source

pub fn powi(&self, n: i32) -> Self

Source§

impl<T, R: Unsigned> Ndarr<C<T>, R>
where T: Clone + Debug + Default + Float,

Source

pub fn abs(&self) -> Ndarr<T, R>

Source

pub fn exp(&self) -> Self

Source

pub fn arg(&self) -> Ndarr<T, R>

Source

pub fn ln(&self) -> Self

Source

pub fn sqrt(&self) -> Self

Source

pub fn powf(&self, n: T) -> Self

Source

pub fn powc(&self, _z: C<T>) -> Self

Source

pub fn sin(&self) -> Self

Source

pub fn cos(&self) -> Self

Source

pub fn tan(&self) -> Self

Source

pub fn csc(&self) -> Self

Source

pub fn sec(&self) -> Self

Source

pub fn cot(&self) -> Self

Source

pub fn to_polar(&self) -> Ndarr<(T, T), R>

Source

pub fn is_infinite(&self) -> Ndarr<bool, R>

Source

pub fn is_finite(&self) -> Ndarr<bool, R>

Source

pub fn is_normal(&self) -> Ndarr<bool, R>

Source

pub fn is_nan(&self) -> Ndarr<bool, R>

Source§

impl<T: Clone, R: Unsigned> Ndarr<T, R>

Source

pub fn new<D: Into<Dim<R>>>(data: &[T], shape: D) -> Result<Self, DimError>

Source

pub fn rank(&self) -> usize

Source

pub fn shape(&self) -> &[usize]

Examples found in repository?
examples/image_fft.rs (line 13)
5fn main() {
6    //open image as lumaf32 (gray scale) where 0.0 is white 1.0 is black.
7    let img = open_lumaf32("graphics/peppers.png").unwrap();
8    //transform to complex and take the 2D FFT
9    let fft = img.to_complex().fft2d();
10
11    //initialize kernel for convolution
12    let mut kernel: Ndarr<f32, _> = Ndarr::zeros(&fft.dim);
13    let (m, n) = (img.shape()[0], img.shape()[1]);
14    let mid_x = m / 2;
15    let mid_y = n / 2;
16    kernel[[mid_x, mid_y]] = 4.;
17    kernel[[mid_x + 1, mid_y]] = -1.;
18    kernel[[mid_x - 1, mid_y]] = -1.;
19    kernel[[mid_x, mid_y + 1]] = -1.;
20    kernel[[mid_x, mid_y - 1]] = -1.;
21    //FFT the kernell
22    let kernell = kernel.to_complex().fft2d();
23    //multiply the image FFT to the kernel fft to then do the inverse transform to ger the convolution of the
24    //image and the kernel
25    let out = (fft * kernell).ifft2().fftshif().re();
26    //save output image
27    out.save_as_luma("graphics/pepper_edges.png", ImageFormat::Png)
28}
Source

pub fn flatten(self) -> Vec<T>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn from<P: Into<Self>>(p: P) -> Self

Examples found in repository?
examples/conway_gol.rs (line 12)
11fn update(mat: &mut Ndarr<i8, U2>) {
12    let rolls = Ndarr::from([1, 0, -1]);
13    let out = rolls
14        .map(|r| mat.roll(*r, 0))
15        .outer_product(&rolls, |a, r| a.roll(r, 1))
16        .sum();
17    mat.bimap_in_place(&out, |prev, new| {
18        if new == 3 || (prev == 1 && (new == 4)) {
19            1
20        } else {
21            0
22        }
23    })
24}
Source

pub fn reshape<R2: Unsigned, D: Into<Dim<R2>>>( &self, shape: D, ) -> Result<Ndarr<T, R2>, DimError>

Reshapes an Ndarr into an specified Shape. Returns Error if the shape is not compatible.

Source

pub fn slice_at(&self, axis: usize) -> Vec<Ndarr<T, Sub1<R>>>
where R: Sub<B1>, <R as Sub<B1>>::Output: Unsigned,

Source

pub fn slice_at_notyped(&self, axis: usize) -> Vec<Ndarr<T, UTerm>>

Source

pub fn reduce<F: Fn(T, T) -> T + Clone>( &self, axis: usize, f: F, ) -> Result<Ndarr<T, Sub1<R>>, DimError>
where R: Sub<B1>, <R as Sub<B1>>::Output: Unsigned,

Takes a function `F(T,T)-T and an axis, evaluates the function by inserting it between the elements along the specified axis in right-to-left.

Source

pub fn reduce_notyped<F: Fn(T, T) -> T + Clone>( &self, axis: usize, f: F, ) -> Result<Ndarr<T, UTerm>, DimError>

Source

pub fn broadcast_to<R2: Unsigned, D: Into<Dim<R2>>>( &self, shape: D, ) -> Result<Ndarr<T, Maximum<R, R2>>, DimError>
where T: Default, R: Max<R2>, <R as Max<R2>>::Output: Unsigned,

Source

pub fn broadcast<R2: Unsigned, D: Into<Dim<R2>>>( &self, shape: D, ) -> Result<Ndarr<T, Maximum<R, R2>>, DimError>
where T: Default, R: Max<R2>, <R as Max<R2>>::Output: Unsigned,

Source

pub fn broadcast_data<R2: Unsigned, D: Into<Dim<R2>>>( &self, shape: D, ) -> Result<Vec<T>, DimError>

Source

pub fn roll(&self, shift: isize, axis: usize) -> Self

Roll array elements along a given axis, by shift isize. Elements that roll beyond the last position are re-introduced at the first.

Examples found in repository?
examples/conway_gol.rs (line 14)
11fn update(mat: &mut Ndarr<i8, U2>) {
12    let rolls = Ndarr::from([1, 0, -1]);
13    let out = rolls
14        .map(|r| mat.roll(*r, 0))
15        .outer_product(&rolls, |a, r| a.roll(r, 1))
16        .sum();
17    mat.bimap_in_place(&out, |prev, new| {
18        if new == 3 || (prev == 1 && (new == 4)) {
19            1
20        } else {
21            0
22        }
23    })
24}
More examples
Hide additional examples
examples/ising_model.rs (line 17)
14fn metropolis(spin_arr: &mut Ndarr<f32, U2>) {
15    let energy: Ndarr<f32, U2> = 2.
16        * spin_arr.clone()
17        * (spin_arr.roll(1, 0) + spin_arr.roll(-1, 0) + spin_arr.roll(1, 1) + spin_arr.roll(-1, 1));
18    let temp_exp = (-&energy / T).exp();
19    let indexes: Vec<usize> = (0..N).collect();
20    let i_s = NdarrRand::choose(&indexes, [M], None); //random i indexes
21    let j_s = NdarrRand::choose(&indexes, [M], None); //random j indexes
22    let p_swich: f32 = NdarrRand::uniform(0.0, 1.0, [1], None)[0]; // selection probability of random spin switch
23    for (i, j) in i_s.data.iter().zip(j_s.data.iter()) {
24        if energy[[*i, *j]] < 0.0 || p_swich < temp_exp[[*i, *j]] {
25            spin_arr[[*i, *j]] *= &-1.0;
26        }
27    }
28}
Source§

impl<T: Clone + Debug> Ndarr<T, U0>

Source

pub fn scalar(self) -> T
where T: Scalar,

Source

pub fn extract(self) -> T

Trait Implementations§

Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for char
where T: Clone + Debug + Default + Add<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Add<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Add<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Add<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Add<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Add<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Add<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Add<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Add<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Add<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Add<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Add<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<&Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Add<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Add<&Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Add<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Add<&Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Add<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for char
where T: Clone + Debug + Default + Add<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Add<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Add<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Add<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Add<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Add<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Add<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Add<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Add<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Add<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Add<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Add<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, R: Unsigned> Add<Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Add<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Add<Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Add<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Add<Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Add<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the + operation. Read more
Source§

impl<L, P, T, R: Unsigned> Add<P> for &Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Add<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the + operator.
Source§

fn add(self, other: P) -> Self::Output

Performs the + operation. Read more
Source§

impl<L, P, T, R: Unsigned> Add<P> for Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Add<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the + operator.
Source§

fn add(self, other: P) -> Self::Output

Performs the + operation. Read more
Source§

impl<P, T, R: Unsigned> AddAssign<&P> for Ndarr<T, R>
where T: Add<Output = T> + Clone + Debug + Default, P: IntoNdarr<T, R> + Clone,

Source§

fn add_assign(&mut self, other: &P)

Performs the += operation. Read more
Source§

impl<T: Clone + Clone, R: Clone + Unsigned> Clone for Ndarr<T, R>

Source§

fn clone(&self) -> Ndarr<T, R>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + Clone, R: Debug + Unsigned> Debug for Ndarr<T, R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Clone + Debug + Display, R: Unsigned> Display for Ndarr<T, R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for char
where T: Clone + Debug + Default + Div<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Div<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Div<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Div<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Div<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Div<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Div<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Div<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Div<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Div<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Div<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Div<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<&Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Div<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Div<&Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Div<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Div<&Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Div<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for char
where T: Clone + Debug + Default + Div<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Div<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Div<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Div<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Div<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Div<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Div<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Div<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Div<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Div<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Div<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Div<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, R: Unsigned> Div<Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Div<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Div<Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Div<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Div<Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Div<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the / operation. Read more
Source§

impl<L, P, T, R: Unsigned> Div<P> for &Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Div<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the / operator.
Source§

fn div(self, other: P) -> Self::Output

Performs the / operation. Read more
Source§

impl<L, P, T, R: Unsigned> Div<P> for Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Div<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the / operator.
Source§

fn div(self, other: P) -> Self::Output

Performs the / operation. Read more
Source§

impl<P, T, R: Unsigned> DivAssign<&P> for Ndarr<T, R>
where T: Div<Output = T> + Clone + Debug + Default, P: IntoNdarr<T, R> + Clone,

Source§

fn div_assign(&mut self, other: &P)

Performs the /= operation. Read more
Source§

impl From<&str> for Ndarr<char, U1>

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl<T, const N1: usize, const N2: usize, const N3: usize, const N4: usize> From<[[[[T; N1]; N2]; N3]; N4]> for Ndarr<T, U4>
where T: Clone + Debug + Scalar,

Source§

fn from(value: [[[[T; N1]; N2]; N3]; N4]) -> Self

Converts to this type from the input type.
Source§

impl<T, const N1: usize, const N2: usize, const N3: usize> From<[[[T; N1]; N2]; N3]> for Ndarr<T, U3>
where T: Clone + Debug + Scalar,

Source§

fn from(value: [[[T; N1]; N2]; N3]) -> Self

Converts to this type from the input type.
Source§

impl<T, const N1: usize, const N2: usize> From<[[T; N1]; N2]> for Ndarr<T, U2>
where T: Clone + Debug + Scalar,

Source§

fn from(value: [[T; N1]; N2]) -> Self

Converts to this type from the input type.
Source§

impl<T, const N: usize> From<[T; N]> for Ndarr<T, U1>
where T: Clone + Debug + Scalar,

Source§

fn from(value: [T; N]) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Range<T>> for Ndarr<T, U1>
where T: Clone + Debug + Scalar, Range<T>: Iterator, Vec<T>: FromIterator<<Range<T> as Iterator>::Item>,

Source§

fn from(value: Range<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Vec<T>> for Ndarr<T, U1>
where T: Clone + Debug + Scalar,

Source§

fn from(value: Vec<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Clone + Default + Debug, R: Unsigned, I: Into<Dim<R>>> Index<I> for Ndarr<T, R>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: I) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T: Clone + Default + Debug, R: Unsigned, I: Into<Dim<R>>> IndexMut<I> for Ndarr<T, R>

Source§

fn index_mut(&mut self, index: I) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<T, R: Unsigned> IntoNdarr<T, R> for Ndarr<T, R>
where T: Debug + Clone + Default,

Source§

fn into_ndarr(&self, shape: &Dim<R>) -> Ndarr<T, R>

Source§

fn get_rank(&self) -> usize

Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for char
where T: Clone + Debug + Default + Mul<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Mul<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Mul<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Mul<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Mul<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Mul<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Mul<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Mul<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Mul<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Mul<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Mul<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Mul<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<&Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Mul<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Mul<&Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Mul<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Mul<&Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Mul<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for char
where T: Clone + Debug + Default + Mul<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Mul<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Mul<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Mul<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Mul<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Mul<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Mul<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Mul<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Mul<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Mul<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Mul<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Mul<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, R: Unsigned> Mul<Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Mul<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Mul<Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Mul<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Mul<Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Mul<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the * operation. Read more
Source§

impl<L, P, T, R: Unsigned> Mul<P> for &Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Mul<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the * operator.
Source§

fn mul(self, other: P) -> Self::Output

Performs the * operation. Read more
Source§

impl<L, P, T, R: Unsigned> Mul<P> for Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Mul<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the * operator.
Source§

fn mul(self, other: P) -> Self::Output

Performs the * operation. Read more
Source§

impl<P, T, R: Unsigned> MulAssign<&P> for Ndarr<T, R>
where T: Mul<Output = T> + Clone + Debug + Default, P: IntoNdarr<T, R> + Clone,

Source§

fn mul_assign(&mut self, other: &P)

Performs the *= operation. Read more
Source§

impl<T, R: Unsigned> Neg for &Ndarr<T, R>
where T: Neg<Output = T> + Clone + Debug + Default + Copy,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T, R: Unsigned> Neg for Ndarr<T, R>
where T: Neg<Output = T> + Clone + Debug + Default + Copy,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: PartialEq + Clone, R: PartialEq + Unsigned> PartialEq for Ndarr<T, R>

Source§

fn eq(&self, other: &Ndarr<T, R>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for char
where T: Clone + Debug + Default + Rem<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Rem<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Rem<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Rem<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Rem<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Rem<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Rem<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Rem<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Rem<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Rem<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Rem<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Rem<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<&Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Rem<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Rem<&Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Rem<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Rem<&Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Rem<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for char
where T: Clone + Debug + Default + Rem<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Rem<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Rem<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Rem<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Rem<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Rem<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Rem<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Rem<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Rem<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Rem<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Rem<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Rem<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, R: Unsigned> Rem<Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Rem<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Rem<Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Rem<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Rem<Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Rem<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the % operation. Read more
Source§

impl<L, P, T, R: Unsigned> Rem<P> for &Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Rem<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the % operator.
Source§

fn rem(self, other: P) -> Self::Output

Performs the % operation. Read more
Source§

impl<L, P, T, R: Unsigned> Rem<P> for Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Rem<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the % operator.
Source§

fn rem(self, other: P) -> Self::Output

Performs the % operation. Read more
Source§

impl<P, T, R: Unsigned> RemAssign<&P> for Ndarr<T, R>
where T: Rem<Output = T> + Clone + Debug + Default, P: IntoNdarr<T, R> + Clone,

Source§

fn rem_assign(&mut self, other: &P)

Performs the %= operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for char
where T: Clone + Debug + Default + Sub<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Sub<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Sub<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Sub<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Sub<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Sub<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Sub<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Sub<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Sub<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Sub<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Sub<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Sub<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<&Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Sub<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Sub<&Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Sub<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Sub<&Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Sub<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Ndarr<T2, R2>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for char
where T: Clone + Debug + Default + Sub<char, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for f32
where T: Clone + Debug + Default + Sub<f32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for f64
where T: Clone + Debug + Default + Sub<f64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for i128
where T: Clone + Debug + Default + Sub<i128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for i16
where T: Clone + Debug + Default + Sub<i16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for i32
where T: Clone + Debug + Default + Sub<i32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for i64
where T: Clone + Debug + Default + Sub<i64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for i8
where T: Clone + Debug + Default + Sub<i8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for u128
where T: Clone + Debug + Default + Sub<u128, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for u16
where T: Clone + Debug + Default + Sub<u16, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for u32
where T: Clone + Debug + Default + Sub<u32, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for u64
where T: Clone + Debug + Default + Sub<u64, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, R: Unsigned> Sub<Ndarr<T, R>> for u8
where T: Clone + Debug + Default + Sub<u8, Output = T>,

Source§

type Output = Ndarr<T, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T, R>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Sub<Ndarr<T2, R2>> for &Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Sub<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T1, T2, T3, R1, R2: Unsigned> Sub<Ndarr<T2, R2>> for Ndarr<T1, R1>
where R1: Max<R2> + Unsigned, <R1 as Max<R2>>::Output: Unsigned, T1: Clone + Debug + Default + Sub<T2, Output = T3>, T2: Clone + Debug + Default, T3: Clone + Debug + Default,

Source§

type Output = Ndarr<T3, <R1 as Max<R2>>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ndarr<T2, R2>) -> Self::Output

Performs the - operation. Read more
Source§

impl<L, P, T, R: Unsigned> Sub<P> for &Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Sub<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the - operator.
Source§

fn sub(self, other: P) -> Self::Output

Performs the - operation. Read more
Source§

impl<L, P, T, R: Unsigned> Sub<P> for Ndarr<T, R>
where L: Clone + Debug + Default, T: Clone + Debug + Default + Sub<P, Output = L>, P: Scalar + Copy,

Source§

type Output = Ndarr<L, R>

The resulting type after applying the - operator.
Source§

fn sub(self, other: P) -> Self::Output

Performs the - operation. Read more
Source§

impl<P, T, R: Unsigned> SubAssign<&P> for Ndarr<T, R>
where T: Sub<Output = T> + Clone + Debug + Default, P: IntoNdarr<T, R> + Clone,

Source§

fn sub_assign(&mut self, other: &P)

Performs the -= operation. Read more
Source§

impl<T: Eq + Clone, R: Eq + Unsigned> Eq for Ndarr<T, R>

Source§

impl<T: Clone, R: Unsigned> StructuralPartialEq for Ndarr<T, R>

Auto Trait Implementations§

§

impl<T, R> Freeze for Ndarr<T, R>

§

impl<T, R> RefUnwindSafe for Ndarr<T, R>

§

impl<T, R> Send for Ndarr<T, R>
where R: Send, T: Send,

§

impl<T, R> Sync for Ndarr<T, R>
where R: Sync, T: Sync,

§

impl<T, R> Unpin for Ndarr<T, R>
where R: Unpin, T: Unpin,

§

impl<T, R> UnwindSafe for Ndarr<T, R>
where R: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,