Struct tract_nnef::internal::tract_ndarray::ArrayBase [−][src]
pub struct ArrayBase<S, D> where
S: RawData, { /* fields omitted */ }
An n-dimensional array.
The array is a general container of elements. It cannot grow or shrink, but can be sliced into subsets of its data. The array supports arithmetic operations by applying them elementwise.
In n-dimensional we include for example 1-dimensional rows or columns, 2-dimensional matrices, and higher dimensional arrays. If the array has n dimensions, then an element is accessed by using that many indices.
The ArrayBase<S, D>
is parameterized by S
for the data container and
D
for the dimensionality.
Type aliases Array
, ArcArray
, CowArray
, ArrayView
, and
ArrayViewMut
refer to ArrayBase
with different types for the data
container.
Contents
- Array
- ArcArray
- CowArray
- Array Views
- Indexing and Dimension
- Loops, Producers and Iterators
- Slicing
- Subviews
- Arithmetic Operations
- Broadcasting
- Conversions
- Constructor Methods for Owned Arrays
- Methods For All Array Types
- Methods For 1-D Arrays
- Methods For 2-D Arrays
- Methods for Dynamic-Dimensional Arrays
- Numerical Methods for Arrays
Array
Array
is an owned array that owns the underlying array
elements directly (just like a Vec
) and it is the default way to create and
store n-dimensional data. Array<A, D>
has two type parameters: A
for
the element type, and D
for the dimensionality. A particular
dimensionality’s type alias like Array3<A>
just has the type parameter
A
for element type.
An example:
// Create a three-dimensional f64 array, initialized with zeros use ndarray::Array3; let mut temperature = Array3::<f64>::zeros((3, 4, 5)); // Increase the temperature in this location temperature[[2, 2, 2]] += 0.5;
ArcArray
ArcArray
is an owned array with reference counted
data (shared ownership).
Sharing requires that it uses copy-on-write for mutable operations.
Calling a method for mutating elements on ArcArray
, for example
view_mut()
or get_mut()
,
will break sharing and require a clone of the data (if it is not uniquely held).
CowArray
CowArray
is analogous to
std::borrow::Cow
.
It can represent either an immutable view or a uniquely owned array. If a
CowArray
instance is the immutable view variant, then calling a method
for mutating elements in the array will cause it to be converted into the
owned variant (by cloning all the elements) before the modification is
performed.
Array Views
ArrayView
and ArrayViewMut
are read-only and read-write array views
respectively. They use dimensionality, indexing, and almost all other
methods the same way as the other array types.
Methods for ArrayBase
apply to array views too, when the trait bounds
allow.
Please see the documentation for the respective array view for an overview
of methods specific to array views: ArrayView
, ArrayViewMut
.
A view is created from an array using .view()
,
.view_mut()
, using
slicing (.slice()
, .slice_mut()
) or from one of
the many iterators that yield array views.
You can also create an array view from a regular slice of data not
allocated with Array
— see array view methods or their From
impls.
Note that all ArrayBase
variants can change their view (slicing) of the
data freely, even when their data can’t be mutated.
Indexing and Dimension
The dimensionality of the array determines the number of axes, for example a 2D array has two axes. These are listed in “big endian” order, so that the greatest dimension is listed first, the lowest dimension with the most rapidly varying index is the last.
In a 2D array the index of each element is [row, column]
as seen in this
4 × 3 example:
[[ [0, 0], [0, 1], [0, 2] ], // row 0 [ [1, 0], [1, 1], [1, 2] ], // row 1 [ [2, 0], [2, 1], [2, 2] ], // row 2 [ [3, 0], [3, 1], [3, 2] ]] // row 3 // \ \ \ // column 0 \ column 2 // column 1
The number of axes for an array is fixed by its D
type parameter: Ix1
for a 1D array, Ix2
for a 2D array etc. The dimension type IxDyn
allows
a dynamic number of axes.
A fixed size array ([usize; N]
) of the corresponding dimensionality is
used to index the Array
, making the syntax array[[
i, j, …]]
use ndarray::Array2; let mut array = Array2::zeros((4, 3)); array[[1, 1]] = 7;
Important traits and types for dimension and indexing:
- A
Dim
value represents a dimensionality or index. - Trait
Dimension
is implemented by all dimensionalities. It defines many operations for dimensions and indices. - Trait
IntoDimension
is used to convert into aDim
value. - Trait
ShapeBuilder
is an extension ofIntoDimension
and is used when constructing an array. A shape describes not just the extent of each axis but also their strides. - Trait
NdIndex
is an extension ofDimension
and is for values that can be used with indexing syntax.
The default memory order of an array is row major order (a.k.a “c” order), where each row is contiguous in memory. A column major (a.k.a. “f” or fortran) memory order array has columns (or, in general, the outermost axis) with contiguous elements.
The logical order of any array’s elements is the row major order
(the rightmost index is varying the fastest).
The iterators .iter(), .iter_mut()
always adhere to this order, for example.
Loops, Producers and Iterators
Using Zip
is the most general way to apply a procedure
across one or several arrays or producers.
NdProducer
is like an iterable but for
multidimensional data. All producers have dimensions and axes, like an
array view, and they can be split and used with parallelization using Zip
.
For example, ArrayView<A, D>
is a producer, it has the same dimensions
as the array view and for each iteration it produces a reference to
the array element (&A
in this case).
Another example, if we have a 10 × 10 array and use .exact_chunks((2, 2))
we get a producer of chunks which has the dimensions 5 × 5 (because
there are 10 / 2 = 5 chunks in either direction). The 5 × 5 chunks producer
can be paired with any other producers of the same dimension with Zip
, for
example 5 × 5 arrays.
.iter()
and .iter_mut()
These are the element iterators of arrays and they produce an element sequence in the logical order of the array, that means that the elements will be visited in the sequence that corresponds to increasing the last index first: 0, …, 0, 0; 0, …, 0, 1; 0, …0, 2 and so on.
.outer_iter()
and .axis_iter()
These iterators produce array views of one smaller dimension.
For example, for a 2D array, .outer_iter()
will produce the 1D rows.
For a 3D array, .outer_iter()
produces 2D subviews.
.axis_iter()
is like outer_iter()
but allows you to pick which
axis to traverse.
The outer_iter
and axis_iter
are one dimensional producers.
.rows()
, .columns()
and .lanes()
.rows()
is a producer (and iterable) of all rows in an array.
use ndarray::Array; // 1. Loop over the rows of a 2D array let mut a = Array::zeros((10, 10)); for mut row in a.rows_mut() { row.fill(1.); } // 2. Use Zip to pair each row in 2D `a` with elements in 1D `b` use ndarray::Zip; let mut b = Array::zeros(a.nrows()); Zip::from(a.rows()) .and(&mut b) .for_each(|a_row, b_elt| { *b_elt = a_row[a.ncols() - 1] - a_row[0]; });
The lanes of an array are 1D segments along an axis and when pointed along the last axis they are rows, when pointed along the first axis they are columns.
A m × n array has m rows each of length n and conversely n columns each of length m.
To generalize this, we say that an array of dimension a × m × n has a m rows. It’s composed of a times the previous array, so it has a times as many rows.
All methods: .rows()
, .rows_mut()
,
.columns()
, .columns_mut()
,
.lanes(axis)
, .lanes_mut(axis)
.
Yes, for 2D arrays .rows()
and .outer_iter()
have about the same
effect:
rows()
is a producer with n - 1 dimensions of 1 dimensional itemsouter_iter()
is a producer with 1 dimension of n - 1 dimensional items
Slicing
You can use slicing to create a view of a subset of the data in
the array. Slicing methods include .slice()
, .slice_mut()
,
.slice_move()
, and .slice_collapse()
.
The slicing argument can be passed using the macro s![]
,
which will be used in all examples. (The explicit form is an instance of
SliceInfo
or another type which implements SliceArg
; see their docs
for more information.)
If a range is used, the axis is preserved. If an index is used, that index
is selected and the axis is removed; this selects a subview. See
Subviews for more information about subviews. If a
NewAxis
instance is used, a new axis is inserted. Note that
.slice_collapse()
panics on NewAxis
elements and behaves like
.collapse_axis()
by preserving the number of dimensions.
When slicing arrays with generic dimensionality, creating an instance of
SliceInfo
to pass to the multi-axis slicing methods like .slice()
is awkward. In these cases, it’s usually more convenient to use
.slice_each_axis()
/.slice_each_axis_mut()
/.slice_each_axis_inplace()
or to create a view and then slice individual axes of the view using
methods such as .slice_axis_inplace()
and .collapse_axis()
.
It’s possible to take multiple simultaneous mutable slices with
.multi_slice_mut()
or (for ArrayViewMut
only)
.multi_slice_move()
.
use ndarray::{arr2, arr3, s, ArrayBase, DataMut, Dimension, NewAxis, Slice}; // 2 submatrices of 2 rows with 3 elements per row, means a shape of `[2, 2, 3]`. let a = arr3(&[[[ 1, 2, 3], // -- 2 rows \_ [ 4, 5, 6]], // -- / [[ 7, 8, 9], // \_ 2 submatrices [10, 11, 12]]]); // / // 3 columns ..../.../.../ assert_eq!(a.shape(), &[2, 2, 3]); // Let’s create a slice with // // - Both of the submatrices of the greatest dimension: `..` // - Only the first row in each submatrix: `0..1` // - Every element in each row: `..` let b = a.slice(s![.., 0..1, ..]); let c = arr3(&[[[ 1, 2, 3]], [[ 7, 8, 9]]]); assert_eq!(b, c); assert_eq!(b.shape(), &[2, 1, 3]); // Let’s create a slice with // // - Both submatrices of the greatest dimension: `..` // - The last row in each submatrix: `-1..` // - Row elements in reverse order: `..;-1` let d = a.slice(s![.., -1.., ..;-1]); let e = arr3(&[[[ 6, 5, 4]], [[12, 11, 10]]]); assert_eq!(d, e); assert_eq!(d.shape(), &[2, 1, 3]); // Let’s create a slice while selecting a subview and inserting a new axis with // // - Both submatrices of the greatest dimension: `..` // - The last row in each submatrix, removing that axis: `-1` // - Row elements in reverse order: `..;-1` // - A new axis at the end. let f = a.slice(s![.., -1, ..;-1, NewAxis]); let g = arr3(&[[ [6], [5], [4]], [[12], [11], [10]]]); assert_eq!(f, g); assert_eq!(f.shape(), &[2, 3, 1]); // Let's take two disjoint, mutable slices of a matrix with // // - One containing all the even-index columns in the matrix // - One containing all the odd-index columns in the matrix let mut h = arr2(&[[0, 1, 2, 3], [4, 5, 6, 7]]); let (s0, s1) = h.multi_slice_mut((s![.., ..;2], s![.., 1..;2])); let i = arr2(&[[0, 2], [4, 6]]); let j = arr2(&[[1, 3], [5, 7]]); assert_eq!(s0, i); assert_eq!(s1, j); // Generic function which assigns the specified value to the elements which // have indices in the lower half along all axes. fn fill_lower<S, D>(arr: &mut ArrayBase<S, D>, x: S::Elem) where S: DataMut, S::Elem: Clone, D: Dimension, { arr.slice_each_axis_mut(|ax| Slice::from(0..ax.len / 2)).fill(x); } fill_lower(&mut h, 9); let k = arr2(&[[9, 9, 2, 3], [4, 5, 6, 7]]); assert_eq!(h, k);
Subviews
Subview methods allow you to restrict the array view while removing one
axis from the array. Methods for selecting individual subviews include
.index_axis()
, .index_axis_mut()
, .index_axis_move()
, and
.index_axis_inplace()
. You can also select a subview by using a single
index instead of a range when slicing. Some other methods, such as
.fold_axis()
, .axis_iter()
, .axis_iter_mut()
,
.outer_iter()
, and .outer_iter_mut()
operate on all the subviews
along an axis.
A related method is .collapse_axis()
, which modifies the view in the
same way as .index_axis()
except for removing the collapsed axis, since
it operates in place. The length of the axis becomes 1.
Methods for selecting an individual subview take two arguments: axis
and
index
.
use ndarray::{arr3, aview1, aview2, s, Axis}; // 2 submatrices of 2 rows with 3 elements per row, means a shape of `[2, 2, 3]`. let a = arr3(&[[[ 1, 2, 3], // \ axis 0, submatrix 0 [ 4, 5, 6]], // / [[ 7, 8, 9], // \ axis 0, submatrix 1 [10, 11, 12]]]); // / // \ // axis 2, column 0 assert_eq!(a.shape(), &[2, 2, 3]); // Let’s take a subview along the greatest dimension (axis 0), // taking submatrix 0, then submatrix 1 let sub_0 = a.index_axis(Axis(0), 0); let sub_1 = a.index_axis(Axis(0), 1); assert_eq!(sub_0, aview2(&[[ 1, 2, 3], [ 4, 5, 6]])); assert_eq!(sub_1, aview2(&[[ 7, 8, 9], [10, 11, 12]])); assert_eq!(sub_0.shape(), &[2, 3]); // This is the subview picking only axis 2, column 0 let sub_col = a.index_axis(Axis(2), 0); assert_eq!(sub_col, aview2(&[[ 1, 4], [ 7, 10]])); // You can take multiple subviews at once (and slice at the same time) let double_sub = a.slice(s![1, .., 0]); assert_eq!(double_sub, aview1(&[7, 10]));
Arithmetic Operations
Arrays support all arithmetic operations the same way: they apply elementwise.
Since the trait implementations are hard to overview, here is a summary.
Binary Operators with Two Arrays
Let A
be an array or view of any kind. Let B
be an array
with owned storage (either Array
or ArcArray
).
Let C
be an array with mutable data (either Array
, ArcArray
or ArrayViewMut
).
The following combinations of operands
are supported for an arbitrary binary operator denoted by @
(it can be
+
, -
, *
, /
and so on).
&A @ &A
which produces a newArray
B @ A
which consumesB
, updates it with the result, and returns itB @ &A
which consumesB
, updates it with the result, and returns itC @= &A
which performs an arithmetic operation in place
Note that the element type needs to implement the operator trait and the
Clone
trait.
use ndarray::{array, ArrayView1}; let owned1 = array![1, 2]; let owned2 = array![3, 4]; let view1 = ArrayView1::from(&[5, 6]); let view2 = ArrayView1::from(&[7, 8]); let mut mutable = array![9, 10]; let sum1 = &view1 + &view2; // Allocates a new array. Note the explicit `&`. // let sum2 = view1 + &view2; // This doesn't work because `view1` is not an owned array. let sum3 = owned1 + view1; // Consumes `owned1`, updates it, and returns it. let sum4 = owned2 + &view2; // Consumes `owned2`, updates it, and returns it. mutable += &view2; // Updates `mutable` in-place.
Binary Operators with Array and Scalar
The trait ScalarOperand
marks types that can be used in arithmetic
with arrays directly. For a scalar K
the following combinations of operands
are supported (scalar can be on either the left or right side, but
ScalarOperand
docs has the detailed condtions).
&A @ K
orK @ &A
which produces a newArray
B @ K
orK @ B
which consumesB
, updates it with the result and returns itC @= K
which performs an arithmetic operation in place
Unary Operators
Let A
be an array or view of any kind. Let B
be an array with owned
storage (either Array
or ArcArray
). The following operands are supported
for an arbitrary unary operator denoted by @
(it can be -
or !
).
@&A
which produces a newArray
@B
which consumesB
, updates it with the result, and returns it
Broadcasting
Arrays support limited broadcasting, where arithmetic operations with
array operands of different sizes can be carried out by repeating the
elements of the smaller dimension array. See
.broadcast()
for a more detailed
description.
use ndarray::arr2; let a = arr2(&[[1., 1.], [1., 2.], [0., 3.], [0., 4.]]); let b = arr2(&[[0., 1.]]); let c = arr2(&[[1., 2.], [1., 3.], [0., 4.], [0., 5.]]); // We can add because the shapes are compatible even if not equal. // The `b` array is shape 1 × 2 but acts like a 4 × 2 array. assert!( c == a + b );
Conversions
Conversions Between Array Types
This table is a summary of the conversions between arrays of different ownership, dimensionality, and element type. All of the conversions in this table preserve the shape of the array.
Output | Input | ||||
---|---|---|---|---|---|
|
|
|
|
|
|
|
no-op |
||||
|
no-op |
||||
|
no-op |
||||
|
|||||
|
illegal |
||||
equivalent with dim |
|||||
equivalent with dim |
|||||
|
Conversions Between Arrays and Vec
s/Slices/Scalars
This is a table of the safe conversions between arrays and
Vec
s/slices/scalars. Note that some of the return values are actually
Result
/Option
wrappers around the indicated output types.
Input | Output | Methods |
---|---|---|
Vec<A> | ArrayBase<S: DataOwned, Ix1> | ::from_vec() |
Vec<A> | ArrayBase<S: DataOwned, D> | ::from_shape_vec() |
&[A] | ArrayView1<A> | ::from() |
&[A] | ArrayView<A, D> | ::from_shape() |
&mut [A] | ArrayViewMut1<A> | ::from() |
&mut [A] | ArrayViewMut<A, D> | ::from_shape() |
&ArrayBase<S, Ix1> | Vec<A> | .to_vec() |
Array<A, D> | Vec<A> | .into_raw_vec() 1 |
&ArrayBase<S, D> | &[A] | .as_slice() 2, .as_slice_memory_order() 3 |
&mut ArrayBase<S: DataMut, D> | &mut [A] | .as_slice_mut() 2, .as_slice_memory_order_mut() 3 |
ArrayView<A, D> | &[A] | .to_slice() 2 |
ArrayViewMut<A, D> | &mut [A] | .into_slice() 2 |
Array0<A> | A | .into_scalar() |
1Returns the data in memory order.
2Works only if the array is contiguous and in standard order.
3Works only if the array is contiguous.
The table above does not include all the constructors; it only shows
conversions to/from Vec
s/slices. See
below for more constructors.
Conversions from Nested Vec
s/Array
s
It’s generally a good idea to avoid nested Vec
/Array
types, such as
Vec<Vec<A>>
or Vec<Array2<A>>
because:
-
they require extra heap allocations compared to a single
Array
, -
they can scatter data all over memory (because of multiple allocations),
-
they cause unnecessary indirection (traversing multiple pointers to reach the data),
-
they don’t enforce consistent shape within the nested
Vec
s/ArrayBase
s, and -
they are generally more difficult to work with.
The most common case where users might consider using nested
Vec
s/Array
s is when creating an array by appending rows/subviews in a
loop, where the rows/subviews are computed within the loop. However, there
are better ways than using nested Vec
s/Array
s.
If you know ahead-of-time the shape of the final array, the cleanest solution is to allocate the final array before the loop, and then assign the data to it within the loop, like this:
use ndarray::{array, Array2, Axis}; let mut arr = Array2::zeros((2, 3)); for (i, mut row) in arr.axis_iter_mut(Axis(0)).enumerate() { // Perform calculations and assign to `row`; this is a trivial example: row.fill(i); } assert_eq!(arr, array![[0, 0, 0], [1, 1, 1]]);
If you don’t know ahead-of-time the shape of the final array, then the
cleanest solution is generally to append the data to a flat Vec
, and then
convert it to an Array
at the end with
::from_shape_vec()
. You just have to be careful
that the layout of the data (the order of the elements in the flat Vec
)
is correct.
use ndarray::{array, Array2}; let ncols = 3; let mut data = Vec::new(); let mut nrows = 0; for i in 0..2 { // Compute `row` and append it to `data`; this is a trivial example: let row = vec![i; ncols]; data.extend_from_slice(&row); nrows += 1; } let arr = Array2::from_shape_vec((nrows, ncols), data)?; assert_eq!(arr, array![[0, 0, 0], [1, 1, 1]]);
If neither of these options works for you, and you really need to convert
nested Vec
/Array
instances to an Array
, the cleanest solution is
generally to use
Iterator::flatten()
to get a flat Vec
, and then convert the Vec
to an Array
with
::from_shape_vec()
, like this:
use ndarray::{array, Array2, Array3}; let nested: Vec<Array2<i32>> = vec![ array![[1, 2, 3], [4, 5, 6]], array![[7, 8, 9], [10, 11, 12]], ]; let inner_shape = nested[0].dim(); let shape = (nested.len(), inner_shape.0, inner_shape.1); let flat: Vec<i32> = nested.iter().flatten().cloned().collect(); let arr = Array3::from_shape_vec(shape, flat)?; assert_eq!(arr, array![ [[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]], ]);
Note that this implementation assumes that the nested Vec
s are all the
same shape and that the Vec
is non-empty. Depending on your application,
it may be a good idea to add checks for these assumptions and possibly
choose a different way to handle the empty case.
Implementations
impl<S, A> ArrayBase<S, Dim<[usize; 1]>> where
S: DataOwned<Elem = A>,
[src]
S: DataOwned<Elem = A>,
Constructor Methods for Owned Arrays
Note that the constructor methods apply to Array
and ArcArray
,
the two array types that have owned storage.
Constructor methods for one-dimensional arrays.
pub fn from_vec(v: Vec<A, Global>) -> ArrayBase<S, Dim<[usize; 1]>>
[src]
Create a one-dimensional array from a vector (no copying needed).
Panics if the length is greater than isize::MAX
.
use ndarray::Array; let array = Array::from_vec(vec![1., 2., 3., 4.]);
pub fn from_iter<I>(iterable: I) -> ArrayBase<S, Dim<[usize; 1]>> where
I: IntoIterator<Item = A>,
[src]
I: IntoIterator<Item = A>,
Create a one-dimensional array from an iterator or iterable.
Panics if the length is greater than isize::MAX
.
use ndarray::Array; let array = Array::from_iter(0..10);
pub fn linspace(start: A, end: A, n: usize) -> ArrayBase<S, Dim<[usize; 1]>> where
A: Float,
[src]
A: Float,
Create a one-dimensional array with n
evenly spaced elements from
start
to end
(inclusive). A
must be a floating point type.
Note that if start > end
, the first element will still be start
,
and the following elements will be decreasing. This is different from
the behavior of std::ops::RangeInclusive
, which interprets start > end
to mean that the range is empty.
Panics if n
is greater than isize::MAX
or if converting n - 1
to type A
fails.
use ndarray::{Array, arr1}; let array = Array::linspace(0., 1., 5); assert!(array == arr1(&[0.0, 0.25, 0.5, 0.75, 1.0]))
pub fn range(start: A, end: A, step: A) -> ArrayBase<S, Dim<[usize; 1]>> where
A: Float,
[src]
A: Float,
Create a one-dimensional array with elements from start
to end
(exclusive), incrementing by step
. A
must be a floating point type.
Panics if the length is greater than isize::MAX
.
use ndarray::{Array, arr1}; let array = Array::range(0., 5., 1.); assert!(array == arr1(&[0., 1., 2., 3., 4.]))
pub fn logspace(
base: A,
start: A,
end: A,
n: usize
) -> ArrayBase<S, Dim<[usize; 1]>> where
A: Float,
[src]
base: A,
start: A,
end: A,
n: usize
) -> ArrayBase<S, Dim<[usize; 1]>> where
A: Float,
Create a one-dimensional array with n
logarithmically spaced
elements, with the starting value being base.powf(start)
and the
final one being base.powf(end)
. A
must be a floating point type.
If base
is negative, all values will be negative.
Panics if n
is greater than isize::MAX
or if converting n - 1
to type A
fails.
use approx::assert_abs_diff_eq; use ndarray::{Array, arr1}; let array = Array::logspace(10.0, 0.0, 3.0, 4); assert_abs_diff_eq!(array, arr1(&[1e0, 1e1, 1e2, 1e3])); let array = Array::logspace(-10.0, 3.0, 0.0, 4); assert_abs_diff_eq!(array, arr1(&[-1e3, -1e2, -1e1, -1e0]));
pub fn geomspace(
start: A,
end: A,
n: usize
) -> Option<ArrayBase<S, Dim<[usize; 1]>>> where
A: Float,
[src]
start: A,
end: A,
n: usize
) -> Option<ArrayBase<S, Dim<[usize; 1]>>> where
A: Float,
Create a one-dimensional array with n
geometrically spaced elements
from start
to end
(inclusive). A
must be a floating point type.
Returns None
if start
and end
have different signs or if either
one is zero. Conceptually, this means that in order to obtain a Some
result, end / start
must be positive.
Panics if n
is greater than isize::MAX
or if converting n - 1
to type A
fails.
use approx::assert_abs_diff_eq; use ndarray::{Array, arr1}; let array = Array::geomspace(1e0, 1e3, 4)?; assert_abs_diff_eq!(array, arr1(&[1e0, 1e1, 1e2, 1e3]), epsilon = 1e-12); let array = Array::geomspace(-1e3, -1e0, 4)?; assert_abs_diff_eq!(array, arr1(&[-1e3, -1e2, -1e1, -1e0]), epsilon = 1e-12);
impl<S, A> ArrayBase<S, Dim<[usize; 2]>> where
S: DataOwned<Elem = A>,
[src]
S: DataOwned<Elem = A>,
pub fn eye(n: usize) -> ArrayBase<S, Dim<[usize; 2]>> where
A: Clone + Zero + One,
S: DataMut,
[src]
A: Clone + Zero + One,
S: DataMut,
Create an identity matrix of size n
(square 2D array).
Panics if n * n
would overflow isize
.
pub fn from_diag<S2>(
diag: &ArrayBase<S2, Dim<[usize; 1]>>
) -> ArrayBase<S, Dim<[usize; 2]>> where
A: Clone + Zero,
S: DataMut,
S2: Data<Elem = A>,
[src]
diag: &ArrayBase<S2, Dim<[usize; 1]>>
) -> ArrayBase<S, Dim<[usize; 2]>> where
A: Clone + Zero,
S: DataMut,
S2: Data<Elem = A>,
Create a 2D matrix from its diagonal
Panics if diag.len() * diag.len()
would overflow isize
.
use ndarray::{Array2, arr1, arr2}; let diag = arr1(&[1, 2]); let array = Array2::from_diag(&diag); assert_eq!(array, arr2(&[[1, 0], [0, 2]]));
impl<S, A, D> ArrayBase<S, D> where
D: Dimension,
S: DataOwned<Elem = A>,
[src]
D: Dimension,
S: DataOwned<Elem = A>,
Constructor methods for n-dimensional arrays.
The shape
argument can be an integer or a tuple of integers to specify
a static size. For example 10
makes a length 10 one-dimensional array
(dimension type Ix1
) and (5, 6)
a 5 × 6 array (dimension type Ix2
).
With the trait ShapeBuilder
in scope, there is the method .f()
to select
column major (“f” order) memory layout instead of the default row major.
For example Array::zeros((5, 6).f())
makes a column major 5 × 6 array.
Use IxDyn
for the shape to create an array with dynamic
number of axes.
Finally, the few constructors that take a completely general
Into<StrideShape>
argument optionally support custom strides, for
example a shape given like (10, 2, 2).strides((1, 10, 20))
is valid.
pub fn from_elem<Sh>(shape: Sh, elem: A) -> ArrayBase<S, D> where
A: Clone,
Sh: ShapeBuilder<Dim = D>,
[src]
A: Clone,
Sh: ShapeBuilder<Dim = D>,
Create an array with copies of elem
, shape shape
.
Panics if the product of non-zero axis lengths overflows isize
.
use ndarray::{Array, arr3, ShapeBuilder}; let a = Array::from_elem((2, 2, 2), 1.); assert!( a == arr3(&[[[1., 1.], [1., 1.]], [[1., 1.], [1., 1.]]]) ); assert!(a.strides() == &[4, 2, 1]); let b = Array::from_elem((2, 2, 2).f(), 1.); assert!(b.strides() == &[1, 2, 4]);
pub fn zeros<Sh>(shape: Sh) -> ArrayBase<S, D> where
A: Clone + Zero,
Sh: ShapeBuilder<Dim = D>,
[src]
A: Clone + Zero,
Sh: ShapeBuilder<Dim = D>,
Create an array with zeros, shape shape
.
Panics if the product of non-zero axis lengths overflows isize
.
pub fn ones<Sh>(shape: Sh) -> ArrayBase<S, D> where
A: Clone + One,
Sh: ShapeBuilder<Dim = D>,
[src]
A: Clone + One,
Sh: ShapeBuilder<Dim = D>,
Create an array with ones, shape shape
.
Panics if the product of non-zero axis lengths overflows isize
.
pub fn default<Sh>(shape: Sh) -> ArrayBase<S, D> where
A: Default,
Sh: ShapeBuilder<Dim = D>,
[src]
A: Default,
Sh: ShapeBuilder<Dim = D>,
Create an array with default values, shape shape
Panics if the product of non-zero axis lengths overflows isize
.
pub fn from_shape_simple_fn<Sh, F>(shape: Sh, f: F) -> ArrayBase<S, D> where
F: FnMut() -> A,
Sh: ShapeBuilder<Dim = D>,
[src]
F: FnMut() -> A,
Sh: ShapeBuilder<Dim = D>,
Create an array with values created by the function f
.
f
is called with no argument, and it should return the element to
create. If the precise index of the element to create is needed,
use from_shape_fn
instead.
This constructor can be useful if the element order is not important, for example if they are identical or random.
Panics if the product of non-zero axis lengths overflows isize
.
pub fn from_shape_fn<Sh, F>(shape: Sh, f: F) -> ArrayBase<S, D> where
F: FnMut(<D as Dimension>::Pattern) -> A,
Sh: ShapeBuilder<Dim = D>,
[src]
F: FnMut(<D as Dimension>::Pattern) -> A,
Sh: ShapeBuilder<Dim = D>,
Create an array with values created by the function f
.
f
is called with the index of the element to create; the elements are
visited in arbitrary order.
Panics if the product of non-zero axis lengths overflows isize
.
use ndarray::{Array, arr2}; // Create a table of i × j (with i and j from 1 to 3) let ij_table = Array::from_shape_fn((3, 3), |(i, j)| (1 + i) * (1 + j)); assert_eq!( ij_table, arr2(&[[1, 2, 3], [2, 4, 6], [3, 6, 9]]) );
pub fn from_shape_vec<Sh>(
shape: Sh,
v: Vec<A, Global>
) -> Result<ArrayBase<S, D>, ShapeError> where
Sh: Into<StrideShape<D>>,
[src]
shape: Sh,
v: Vec<A, Global>
) -> Result<ArrayBase<S, D>, ShapeError> where
Sh: Into<StrideShape<D>>,
Create an array with the given shape from a vector. (No cloning of elements needed.)
For a contiguous c- or f-order shape, the following applies:
Errors if shape
does not correspond to the number of elements in
v
or if the shape/strides would result in overflowing isize
.
For custom strides, the following applies:
Errors if strides and dimensions can point out of bounds of v
, if
strides allow multiple indices to point to the same element, or if the
shape/strides would result in overflowing isize
.
use ndarray::Array; use ndarray::ShapeBuilder; // Needed for .strides() method use ndarray::arr2; let a = Array::from_shape_vec((2, 2), vec![1., 2., 3., 4.]); assert!(a.is_ok()); let b = Array::from_shape_vec((2, 2).strides((1, 2)), vec![1., 2., 3., 4.]).unwrap(); assert!( b == arr2(&[[1., 3.], [2., 4.]]) );
pub unsafe fn from_shape_vec_unchecked<Sh>(
shape: Sh,
v: Vec<A, Global>
) -> ArrayBase<S, D> where
Sh: Into<StrideShape<D>>,
[src]
shape: Sh,
v: Vec<A, Global>
) -> ArrayBase<S, D> where
Sh: Into<StrideShape<D>>,
Creates an array from a vector and interpret it according to the provided shape and strides. (No cloning of elements needed.)
Safety
The caller must ensure that the following conditions are met:
-
The ndim of
dim
andstrides
must be the same. -
The product of non-zero axis lengths must not exceed
isize::MAX
. -
For axes with length > 1, the pointer cannot move outside the slice.
-
If the array will be empty (any axes are zero-length), the difference between the least address and greatest address accessible by moving along all axes must be ≤
v.len()
.If the array will not be empty, the difference between the least address and greatest address accessible by moving along all axes must be <
v.len()
. -
The strides must not allow any element to be referenced by two different indices.
pub fn uninit<Sh>(shape: Sh) -> ArrayBase<<S as DataOwned>::MaybeUninit, D> where
Sh: ShapeBuilder<Dim = D>,
[src]
Sh: ShapeBuilder<Dim = D>,
Create an array with uninitalized elements, shape shape
.
The uninitialized elements of type A
are represented by the type MaybeUninit<A>
,
an easier way to handle uninit values correctly.
Only when the array is completely initialized with valid elements, can it be
converted to an array of A
elements using .assume_init()
.
Panics if the number of elements in shape
would overflow isize.
Safety
The whole of the array must be initialized before it is converted
using .assume_init()
or otherwise traversed.
Examples
It is possible to assign individual values through *elt = MaybeUninit::new(value)
and so on.
use ndarray::{s, Array2}; use ndarray::Zip; use ndarray::Axis; // Example Task: Let's create a column shifted copy of the input fn shift_by_two(a: &Array2<f32>) -> Array2<f32> { // create an uninitialized array let mut b = Array2::uninit(a.dim()); // two first columns in b are two last in a // rest of columns in b are the initial columns in a a.slice(s![.., -2..]).assign_to(b.slice_mut(s![.., ..2])); a.slice(s![.., 2..]).assign_to(b.slice_mut(s![.., ..-2])); // Now we can promise that `b` is safe to use with all operations unsafe { b.assume_init() } }
pub unsafe fn uninitialized<Sh>(shape: Sh) -> ArrayBase<S, D> where
A: Copy,
Sh: ShapeBuilder<Dim = D>,
[src]
A: Copy,
Sh: ShapeBuilder<Dim = D>,
This method is hard to use correctly. Use uninit
instead.
Create an array with uninitalized elements, shape shape
.
Prefer to use uninit()
if possible, because it is
easier to use correctly.
Panics if the number of elements in shape
would overflow isize.
Safety
Accessing uninitalized values is undefined behaviour. You must overwrite all the elements
in the array after it is created; for example using
raw_view_mut
or other low-level element access.
The contents of the array is indeterminate before initialization and it
is an error to perform operations that use the previous values. For
example it would not be legal to use a += 1.;
on such an array.
This constructor is limited to elements where A: Copy
(no destructors)
to avoid users shooting themselves too hard in the foot.
(Also note that the constructors from_shape_vec
and
from_shape_vec_unchecked
allow the user yet more control, in the sense
that Arrays can be created from arbitrary vectors.)
impl<S, A, D> ArrayBase<S, D> where
D: Dimension,
S: DataOwned<Elem = MaybeUninit<A>>,
[src]
D: Dimension,
S: DataOwned<Elem = MaybeUninit<A>>,
pub fn maybe_uninit<Sh>(shape: Sh) -> ArrayBase<S, D> where
Sh: ShapeBuilder<Dim = D>,
[src]
Sh: ShapeBuilder<Dim = D>,
Renamed to uninit
Create an array with uninitalized elements, shape shape
.
This method has been renamed to uninit
impl<A, S, D> ArrayBase<S, D> where
D: Dimension,
S: RawData<Elem = A>,
[src]
D: Dimension,
S: RawData<Elem = A>,
pub fn len(&self) -> usize
[src]
Return the total number of elements in the array.
pub fn len_of(&self, axis: Axis) -> usize
[src]
Return the length of axis
.
The axis should be in the range Axis(
0 .. n )
where n is the
number of dimensions (axes) of the array.
Panics if the axis is out of bounds.
pub fn is_empty(&self) -> bool
[src]
Return whether the array has any elements
pub fn ndim(&self) -> usize
[src]
Return the number of dimensions (axes) in the array
pub fn dim(&self) -> <D as Dimension>::Pattern
[src]
Return the shape of the array in its “pattern” form, an integer in the one-dimensional case, tuple in the n-dimensional cases and so on.
pub fn raw_dim(&self) -> D
[src]
Return the shape of the array as it’s stored in the array.
This is primarily useful for passing to other ArrayBase
functions, such as when creating another array of the same
shape and dimensionality.
use ndarray::Array; let a = Array::from_elem((2, 3), 5.); // Create an array of zeros that's the same shape and dimensionality as `a`. let b = Array::<f64, _>::zeros(a.raw_dim());
pub fn shape(&self) -> &[usize]ⓘ
[src]
Return the shape of the array as a slice.
Note that you probably don’t want to use this to create an array of the
same shape as another array because creating an array with e.g.
Array::zeros()
using a shape of type &[usize]
results in a dynamic-dimensional array. If you want to create an array
that has the same shape and dimensionality as another array, use
.raw_dim()
instead:
use ndarray::{Array, Array2}; let a = Array2::<i32>::zeros((3, 4)); let shape = a.shape(); assert_eq!(shape, &[3, 4]); // Since `a.shape()` returned `&[usize]`, we get an `ArrayD` instance: let b = Array::zeros(shape); assert_eq!(a.clone().into_dyn(), b); // To get the same dimension type, use `.raw_dim()` instead: let c = Array::zeros(a.raw_dim()); assert_eq!(a, c);
pub fn strides(&self) -> &[isize]ⓘ
[src]
Return the strides of the array as a slice.
pub fn stride_of(&self, axis: Axis) -> isize
[src]
Return the stride of axis
.
The axis should be in the range Axis(
0 .. n )
where n is the
number of dimensions (axes) of the array.
Panics if the axis is out of bounds.
pub fn view(&self) -> ArrayBase<ViewRepr<&A>, D> where
S: Data,
[src]
S: Data,
Return a read-only view of the array
pub fn view_mut(&mut self) -> ArrayBase<ViewRepr<&mut A>, D> where
S: DataMut,
[src]
S: DataMut,
Return a read-write view of the array
pub fn cell_view(&mut self) -> ArrayBase<ViewRepr<&MathCell<A>>, D> where
S: DataMut,
[src]
S: DataMut,
Return a shared view of the array with elements as if they were embedded in cells.
The cell view requires a mutable borrow of the array. Once borrowed the cell view itself can be copied and accessed without exclusivity.
The view acts “as if” the elements are temporarily in cells, and elements can be changed through shared references using the regular cell methods.
pub fn to_owned(&self) -> ArrayBase<OwnedRepr<A>, D> where
A: Clone,
S: Data,
[src]
A: Clone,
S: Data,
Return an uniquely owned copy of the array.
If the input array is contiguous, then the output array will have the same
memory layout. Otherwise, the layout of the output array is unspecified.
If you need a particular layout, you can allocate a new array with the
desired memory layout and .assign()
the data.
Alternatively, you can collectan iterator, like this for a result in
standard layout:
Array::from_shape_vec(arr.raw_dim(), arr.iter().cloned().collect()).unwrap()
or this for a result in column-major (Fortran) layout:
Array::from_shape_vec(arr.raw_dim().f(), arr.t().iter().cloned().collect()).unwrap()
pub fn to_shared(&self) -> ArrayBase<OwnedArcRepr<A>, D> where
A: Clone,
S: Data,
[src]
A: Clone,
S: Data,
Return a shared ownership (copy on write) array, cloning the array elements if necessary.
pub fn into_owned(self) -> ArrayBase<OwnedRepr<A>, D> where
A: Clone,
S: Data,
[src]
A: Clone,
S: Data,
Turn the array into a uniquely owned array, cloning the array elements if necessary.
pub fn into_shared(self) -> ArrayBase<OwnedArcRepr<A>, D> where
S: DataOwned,
[src]
S: DataOwned,
Turn the array into a shared ownership (copy on write) array, without any copying.
pub fn first(&self) -> Option<&A> where
S: Data,
[src]
S: Data,
Returns a reference to the first element of the array, or None
if it
is empty.
pub fn first_mut(&mut self) -> Option<&mut A> where
S: DataMut,
[src]
S: DataMut,
Returns a mutable reference to the first element of the array, or
None
if it is empty.
pub fn iter(&self) -> Iter<'_, A, D>ⓘ where
S: Data,
[src]
S: Data,
Return an iterator of references to the elements of the array.
Elements are visited in the logical order of the array, which is where the rightmost index is varying the fastest.
Iterator element type is &A
.
pub fn iter_mut(&mut self) -> IterMut<'_, A, D>ⓘ where
S: DataMut,
[src]
S: DataMut,
Return an iterator of mutable references to the elements of the array.
Elements are visited in the logical order of the array, which is where the rightmost index is varying the fastest.
Iterator element type is &mut A
.
pub fn indexed_iter(&self) -> IndexedIter<'_, A, D>ⓘNotable traits for IndexedIter<'a, A, D>
impl<'a, A, D> Iterator for IndexedIter<'a, A, D> where
D: Dimension, type Item = (<D as Dimension>::Pattern, &'a A);
where
S: Data,
[src]
Notable traits for IndexedIter<'a, A, D>
impl<'a, A, D> Iterator for IndexedIter<'a, A, D> where
D: Dimension, type Item = (<D as Dimension>::Pattern, &'a A);
S: Data,
Return an iterator of indexes and references to the elements of the array.
Elements are visited in the logical order of the array, which is where the rightmost index is varying the fastest.
Iterator element type is (D::Pattern, &A)
.
See also Zip::indexed
pub fn indexed_iter_mut(&mut self) -> IndexedIterMut<'_, A, D>ⓘNotable traits for IndexedIterMut<'a, A, D>
impl<'a, A, D> Iterator for IndexedIterMut<'a, A, D> where
D: Dimension, type Item = (<D as Dimension>::Pattern, &'a mut A);
where
S: DataMut,
[src]
Notable traits for IndexedIterMut<'a, A, D>
impl<'a, A, D> Iterator for IndexedIterMut<'a, A, D> where
D: Dimension, type Item = (<D as Dimension>::Pattern, &'a mut A);
S: DataMut,
Return an iterator of indexes and mutable references to the elements of the array.
Elements are visited in the logical order of the array, which is where the rightmost index is varying the fastest.
Iterator element type is (D::Pattern, &mut A)
.
pub fn slice<I>(
&self,
info: I
) -> ArrayBase<ViewRepr<&A>, <I as SliceArg<D>>::OutDim> where
I: SliceArg<D>,
S: Data,
[src]
&self,
info: I
) -> ArrayBase<ViewRepr<&A>, <I as SliceArg<D>>::OutDim> where
I: SliceArg<D>,
S: Data,
Return a sliced view of the array.
See Slicing for full documentation.
See also s!
, SliceArg
, and SliceInfo
.
Panics if an index is out of bounds or step size is zero.
(Panics if D
is IxDyn
and info
does not match the number of array axes.)
pub fn slice_mut<I>(
&mut self,
info: I
) -> ArrayBase<ViewRepr<&mut A>, <I as SliceArg<D>>::OutDim> where
I: SliceArg<D>,
S: DataMut,
[src]
&mut self,
info: I
) -> ArrayBase<ViewRepr<&mut A>, <I as SliceArg<D>>::OutDim> where
I: SliceArg<D>,
S: DataMut,
Return a sliced read-write view of the array.
See Slicing for full documentation.
See also s!
, SliceArg
, and SliceInfo
.
Panics if an index is out of bounds or step size is zero.
(Panics if D
is IxDyn
and info
does not match the number of array axes.)
pub fn multi_slice_mut<'a, M>(
&'a mut self,
info: M
) -> <M as MultiSliceArg<'a, A, D>>::Output where
S: DataMut,
M: MultiSliceArg<'a, A, D>,
[src]
&'a mut self,
info: M
) -> <M as MultiSliceArg<'a, A, D>>::Output where
S: DataMut,
M: MultiSliceArg<'a, A, D>,
Return multiple disjoint, sliced, mutable views of the array.
See Slicing for full documentation. See also
MultiSliceArg
, s!
, SliceArg
, and
SliceInfo
.
Panics if any of the following occur:
- if any of the views would intersect (i.e. if any element would appear in multiple slices)
- if an index is out of bounds or step size is zero
- if
D
isIxDyn
andinfo
does not match the number of array axes
Example
use ndarray::{arr2, s}; let mut a = arr2(&[[1, 2, 3], [4, 5, 6]]); let (mut edges, mut middle) = a.multi_slice_mut((s![.., ..;2], s![.., 1])); edges.fill(1); middle.fill(0); assert_eq!(a, arr2(&[[1, 0, 1], [1, 0, 1]]));
pub fn slice_move<I>(self, info: I) -> ArrayBase<S, <I as SliceArg<D>>::OutDim> where
I: SliceArg<D>,
[src]
I: SliceArg<D>,
Slice the array, possibly changing the number of dimensions.
See Slicing for full documentation.
See also s!
, SliceArg
, and SliceInfo
.
Panics if an index is out of bounds or step size is zero.
(Panics if D
is IxDyn
and info
does not match the number of array axes.)
pub fn slice_collapse<I>(&mut self, info: I) where
I: SliceArg<D>,
[src]
I: SliceArg<D>,
Slice the array in place without changing the number of dimensions.
In particular, if an axis is sliced with an index, the axis is
collapsed, as in .collapse_axis()
, rather than removed, as in
.slice_move()
or .index_axis_move()
.
See Slicing for full documentation.
See also s!
, SliceArg
, and SliceInfo
.
Panics in the following cases:
- if an index is out of bounds
- if a step size is zero
- if
SliceInfoElem::NewAxis
is ininfo
, e.g. ifNewAxis
was used in thes!
macro - if
D
isIxDyn
andinfo
does not match the number of array axes
pub fn slice_axis(
&self,
axis: Axis,
indices: Slice
) -> ArrayBase<ViewRepr<&A>, D> where
S: Data,
[src]
&self,
axis: Axis,
indices: Slice
) -> ArrayBase<ViewRepr<&A>, D> where
S: Data,
Return a view of the array, sliced along the specified axis.
Panics if an index is out of bounds or step size is zero.
Panics if axis
is out of bounds.
pub fn slice_axis_mut(
&mut self,
axis: Axis,
indices: Slice
) -> ArrayBase<ViewRepr<&mut A>, D> where
S: DataMut,
[src]
&mut self,
axis: Axis,
indices: Slice
) -> ArrayBase<ViewRepr<&mut A>, D> where
S: DataMut,
Return a mutable view of the array, sliced along the specified axis.
Panics if an index is out of bounds or step size is zero.
Panics if axis
is out of bounds.
pub fn slice_axis_inplace(&mut self, axis: Axis, indices: Slice)
[src]
Slice the array in place along the specified axis.
Panics if an index is out of bounds or step size is zero.
Panics if axis
is out of bounds.
pub fn slice_each_axis<F>(&self, f: F) -> ArrayBase<ViewRepr<&A>, D> where
F: FnMut(AxisDescription) -> Slice,
S: Data,
[src]
F: FnMut(AxisDescription) -> Slice,
S: Data,
Return a view of a slice of the array, with a closure specifying the slice for each axis.
This is especially useful for code which is generic over the dimensionality of the array.
Panics if an index is out of bounds or step size is zero.
pub fn slice_each_axis_mut<F>(&mut self, f: F) -> ArrayBase<ViewRepr<&mut A>, D> where
F: FnMut(AxisDescription) -> Slice,
S: DataMut,
[src]
F: FnMut(AxisDescription) -> Slice,
S: DataMut,
Return a mutable view of a slice of the array, with a closure specifying the slice for each axis.
This is especially useful for code which is generic over the dimensionality of the array.
Panics if an index is out of bounds or step size is zero.
pub fn slice_each_axis_inplace<F>(&mut self, f: F) where
F: FnMut(AxisDescription) -> Slice,
[src]
F: FnMut(AxisDescription) -> Slice,
Slice the array in place, with a closure specifying the slice for each axis.
This is especially useful for code which is generic over the dimensionality of the array.
Panics if an index is out of bounds or step size is zero.
pub fn get<I>(&self, index: I) -> Option<&A> where
I: NdIndex<D>,
S: Data,
[src]
I: NdIndex<D>,
S: Data,
Return a reference to the element at index
, or return None
if the index is out of bounds.
Arrays also support indexing syntax: array[index]
.
use ndarray::arr2; let a = arr2(&[[1., 2.], [3., 4.]]); assert!( a.get((0, 1)) == Some(&2.) && a.get((0, 2)) == None && a[(0, 1)] == 2. && a[[0, 1]] == 2. );
pub fn get_mut<I>(&mut self, index: I) -> Option<&mut A> where
I: NdIndex<D>,
S: DataMut,
[src]
I: NdIndex<D>,
S: DataMut,
Return a mutable reference to the element at index
, or return None
if the index is out of bounds.
pub unsafe fn uget<I>(&self, index: I) -> &AⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
where
I: NdIndex<D>,
S: Data,
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
I: NdIndex<D>,
S: Data,
Perform unchecked array indexing.
Return a reference to the element at index
.
Note: only unchecked for non-debug builds of ndarray.
Safety
The caller must ensure that the index is in-bounds.
pub unsafe fn uget_mut<I>(&mut self, index: I) -> &mut AⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
where
I: NdIndex<D>,
S: DataMut,
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
I: NdIndex<D>,
S: DataMut,
Perform unchecked array indexing.
Return a mutable reference to the element at index
.
Note: Only unchecked for non-debug builds of ndarray.
Safety
The caller must ensure that:
-
the index is in-bounds and
-
the data is uniquely held by the array. (This property is guaranteed for
Array
andArrayViewMut
, but not forArcArray
orCowArray
.)
pub fn swap<I>(&mut self, index1: I, index2: I) where
I: NdIndex<D>,
S: DataMut,
[src]
I: NdIndex<D>,
S: DataMut,
Swap elements at indices index1
and index2
.
Indices may be equal.
Panics if an index is out of bounds.
pub unsafe fn uswap<I>(&mut self, index1: I, index2: I) where
I: NdIndex<D>,
S: DataMut,
[src]
I: NdIndex<D>,
S: DataMut,
Swap elements unchecked at indices index1
and index2
.
Indices may be equal.
Note: only unchecked for non-debug builds of ndarray.
Safety
The caller must ensure that:
-
both
index1
andindex2
are in-bounds and -
the data is uniquely held by the array. (This property is guaranteed for
Array
andArrayViewMut
, but not forArcArray
orCowArray
.)
pub fn index_axis(
&self,
axis: Axis,
index: usize
) -> ArrayBase<ViewRepr<&A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
S: Data,
[src]
&self,
axis: Axis,
index: usize
) -> ArrayBase<ViewRepr<&A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
S: Data,
Returns a view restricted to index
along the axis, with the axis
removed.
See Subviews for full documentation.
Panics if axis
or index
is out of bounds.
use ndarray::{arr2, ArrayView, Axis}; let a = arr2(&[[1., 2. ], // ... axis 0, row 0 [3., 4. ], // --- axis 0, row 1 [5., 6. ]]); // ... axis 0, row 2 // . \ // . axis 1, column 1 // axis 1, column 0 assert!( a.index_axis(Axis(0), 1) == ArrayView::from(&[3., 4.]) && a.index_axis(Axis(1), 1) == ArrayView::from(&[2., 4., 6.]) );
pub fn index_axis_mut(
&mut self,
axis: Axis,
index: usize
) -> ArrayBase<ViewRepr<&mut A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
S: DataMut,
[src]
&mut self,
axis: Axis,
index: usize
) -> ArrayBase<ViewRepr<&mut A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
S: DataMut,
Returns a mutable view restricted to index
along the axis, with the
axis removed.
Panics if axis
or index
is out of bounds.
use ndarray::{arr2, aview2, Axis}; let mut a = arr2(&[[1., 2. ], [3., 4. ]]); // . \ // . axis 1, column 1 // axis 1, column 0 { let mut column1 = a.index_axis_mut(Axis(1), 1); column1 += 10.; } assert!( a == aview2(&[[1., 12.], [3., 14.]]) );
pub fn index_axis_move(
self,
axis: Axis,
index: usize
) -> ArrayBase<S, <D as Dimension>::Smaller> where
D: RemoveAxis,
[src]
self,
axis: Axis,
index: usize
) -> ArrayBase<S, <D as Dimension>::Smaller> where
D: RemoveAxis,
Collapses the array to index
along the axis and removes the axis.
See .index_axis()
and Subviews for full documentation.
Panics if axis
or index
is out of bounds.
pub fn collapse_axis(&mut self, axis: Axis, index: usize)
[src]
Selects index
along the axis, collapsing the axis into length one.
Panics if axis
or index
is out of bounds.
pub fn select(
&self,
axis: Axis,
indices: &[usize]
) -> ArrayBase<OwnedRepr<A>, D> where
D: RemoveAxis,
A: Copy,
S: Data,
[src]
&self,
axis: Axis,
indices: &[usize]
) -> ArrayBase<OwnedRepr<A>, D> where
D: RemoveAxis,
A: Copy,
S: Data,
Along axis
, select arbitrary subviews corresponding to indices
and and copy them into a new array.
Panics if axis
or an element of indices
is out of bounds.
use ndarray::{arr2, Axis}; let x = arr2(&[[0., 1.], [2., 3.], [4., 5.], [6., 7.], [8., 9.]]); let r = x.select(Axis(0), &[0, 4, 3]); assert!( r == arr2(&[[0., 1.], [8., 9.], [6., 7.]]) );
pub fn rows(&self) -> Lanes<'_, A, <D as Dimension>::Smaller> where
S: Data,
[src]
S: Data,
Return a producer and iterable that traverses over the generalized rows of the array. For a 2D array these are the regular rows.
This is equivalent to .lanes(Axis(n - 1))
where n is self.ndim()
.
For an array of dimensions a × b × c × … × l × m it has a × b × c × … × l rows each of length m.
For example, in a 2 × 2 × 3 array, each row is 3 elements long and there are 2 × 2 = 4 rows in total.
Iterator element is ArrayView1<A>
(1D array view).
use ndarray::{arr3, Axis, arr1}; let a = arr3(&[[[ 0, 1, 2], // -- row 0, 0 [ 3, 4, 5]], // -- row 0, 1 [[ 6, 7, 8], // -- row 1, 0 [ 9, 10, 11]]]); // -- row 1, 1 // `rows` will yield the four generalized rows of the array. for row in a.rows() { /* loop body */ }
pub fn genrows(&self) -> Lanes<'_, A, <D as Dimension>::Smaller> where
S: Data,
[src]
S: Data,
Renamed to .rows()
pub fn rows_mut(&mut self) -> LanesMut<'_, A, <D as Dimension>::Smaller> where
S: DataMut,
[src]
S: DataMut,
Return a producer and iterable that traverses over the generalized rows of the array and yields mutable array views.
Iterator element is ArrayView1<A>
(1D read-write array view).
pub fn genrows_mut(&mut self) -> LanesMut<'_, A, <D as Dimension>::Smaller> where
S: DataMut,
[src]
S: DataMut,
Renamed to .rows_mut()
pub fn columns(&self) -> Lanes<'_, A, <D as Dimension>::Smaller> where
S: Data,
[src]
S: Data,
Return a producer and iterable that traverses over the generalized columns of the array. For a 2D array these are the regular columns.
This is equivalent to .lanes(Axis(0))
.
For an array of dimensions a × b × c × … × l × m it has b × c × … × l × m columns each of length a.
For example, in a 2 × 2 × 3 array, each column is 2 elements long and there are 2 × 3 = 6 columns in total.
Iterator element is ArrayView1<A>
(1D array view).
use ndarray::{arr3, Axis, arr1}; // The generalized columns of a 3D array: // are directed along the 0th axis: 0 and 6, 1 and 7 and so on... let a = arr3(&[[[ 0, 1, 2], [ 3, 4, 5]], [[ 6, 7, 8], [ 9, 10, 11]]]); // Here `columns` will yield the six generalized columns of the array. for row in a.columns() { /* loop body */ }
pub fn gencolumns(&self) -> Lanes<'_, A, <D as Dimension>::Smaller> where
S: Data,
[src]
S: Data,
Renamed to .columns()
Return a producer and iterable that traverses over the generalized columns of the array. For a 2D array these are the regular columns.
Renamed to .columns()
pub fn columns_mut(&mut self) -> LanesMut<'_, A, <D as Dimension>::Smaller> where
S: DataMut,
[src]
S: DataMut,
Return a producer and iterable that traverses over the generalized columns of the array and yields mutable array views.
Iterator element is ArrayView1<A>
(1D read-write array view).
pub fn gencolumns_mut(&mut self) -> LanesMut<'_, A, <D as Dimension>::Smaller> where
S: DataMut,
[src]
S: DataMut,
Renamed to .columns_mut()
Return a producer and iterable that traverses over the generalized columns of the array and yields mutable array views.
Renamed to .columns_mut()
pub fn lanes(&self, axis: Axis) -> Lanes<'_, A, <D as Dimension>::Smaller> where
S: Data,
[src]
S: Data,
Return a producer and iterable that traverses over all 1D lanes
pointing in the direction of axis
.
When pointing in the direction of the first axis, they are columns, in the direction of the last axis rows; in general they are all lanes and are one dimensional.
Iterator element is ArrayView1<A>
(1D array view).
use ndarray::{arr3, aview1, Axis}; let a = arr3(&[[[ 0, 1, 2], [ 3, 4, 5]], [[ 6, 7, 8], [ 9, 10, 11]]]); let inner0 = a.lanes(Axis(0)); let inner1 = a.lanes(Axis(1)); let inner2 = a.lanes(Axis(2)); // The first lane for axis 0 is [0, 6] assert_eq!(inner0.into_iter().next().unwrap(), aview1(&[0, 6])); // The first lane for axis 1 is [0, 3] assert_eq!(inner1.into_iter().next().unwrap(), aview1(&[0, 3])); // The first lane for axis 2 is [0, 1, 2] assert_eq!(inner2.into_iter().next().unwrap(), aview1(&[0, 1, 2]));
pub fn lanes_mut(
&mut self,
axis: Axis
) -> LanesMut<'_, A, <D as Dimension>::Smaller> where
S: DataMut,
[src]
&mut self,
axis: Axis
) -> LanesMut<'_, A, <D as Dimension>::Smaller> where
S: DataMut,
Return a producer and iterable that traverses over all 1D lanes
pointing in the direction of axis
.
Iterator element is ArrayViewMut1<A>
(1D read-write array view).
pub fn outer_iter(&self) -> AxisIter<'_, A, <D as Dimension>::Smaller>ⓘ where
D: RemoveAxis,
S: Data,
[src]
D: RemoveAxis,
S: Data,
Return an iterator that traverses over the outermost dimension and yields each subview.
This is equivalent to .axis_iter(Axis(0))
.
Iterator element is ArrayView<A, D::Smaller>
(read-only array view).
pub fn outer_iter_mut(
&mut self
) -> AxisIterMut<'_, A, <D as Dimension>::Smaller>ⓘNotable traits for AxisIterMut<'a, A, D>
impl<'a, A, D> Iterator for AxisIterMut<'a, A, D> where
D: Dimension, type Item = ArrayBase<ViewRepr<&'a mut A>, D>;
where
D: RemoveAxis,
S: DataMut,
[src]
&mut self
) -> AxisIterMut<'_, A, <D as Dimension>::Smaller>ⓘ
Notable traits for AxisIterMut<'a, A, D>
impl<'a, A, D> Iterator for AxisIterMut<'a, A, D> where
D: Dimension, type Item = ArrayBase<ViewRepr<&'a mut A>, D>;
D: RemoveAxis,
S: DataMut,
Return an iterator that traverses over the outermost dimension and yields each subview.
This is equivalent to .axis_iter_mut(Axis(0))
.
Iterator element is ArrayViewMut<A, D::Smaller>
(read-write array view).
pub fn axis_iter(
&self,
axis: Axis
) -> AxisIter<'_, A, <D as Dimension>::Smaller>ⓘ where
D: RemoveAxis,
S: Data,
[src]
&self,
axis: Axis
) -> AxisIter<'_, A, <D as Dimension>::Smaller>ⓘ where
D: RemoveAxis,
S: Data,
Return an iterator that traverses over axis
and yields each subview along it.
For example, in a 3 × 4 × 5 array, with axis
equal to Axis(2)
,
the iterator element
is a 3 × 4 subview (and there are 5 in total), as shown
in the picture below.
Iterator element is ArrayView<A, D::Smaller>
(read-only array view).
See Subviews for full documentation.
Panics if axis
is out of bounds.
pub fn axis_iter_mut(
&mut self,
axis: Axis
) -> AxisIterMut<'_, A, <D as Dimension>::Smaller>ⓘNotable traits for AxisIterMut<'a, A, D>
impl<'a, A, D> Iterator for AxisIterMut<'a, A, D> where
D: Dimension, type Item = ArrayBase<ViewRepr<&'a mut A>, D>;
where
D: RemoveAxis,
S: DataMut,
[src]
&mut self,
axis: Axis
) -> AxisIterMut<'_, A, <D as Dimension>::Smaller>ⓘ
Notable traits for AxisIterMut<'a, A, D>
impl<'a, A, D> Iterator for AxisIterMut<'a, A, D> where
D: Dimension, type Item = ArrayBase<ViewRepr<&'a mut A>, D>;
D: RemoveAxis,
S: DataMut,
Return an iterator that traverses over axis
and yields each mutable subview along it.
Iterator element is ArrayViewMut<A, D::Smaller>
(read-write array view).
Panics if axis
is out of bounds.
pub fn axis_chunks_iter(
&self,
axis: Axis,
size: usize
) -> AxisChunksIter<'_, A, D>ⓘNotable traits for AxisChunksIter<'a, A, D>
impl<'a, A, D> Iterator for AxisChunksIter<'a, A, D> where
D: Dimension, type Item = ArrayBase<ViewRepr<&'a A>, D>;
where
S: Data,
[src]
&self,
axis: Axis,
size: usize
) -> AxisChunksIter<'_, A, D>ⓘ
Notable traits for AxisChunksIter<'a, A, D>
impl<'a, A, D> Iterator for AxisChunksIter<'a, A, D> where
D: Dimension, type Item = ArrayBase<ViewRepr<&'a A>, D>;
S: Data,
Return an iterator that traverses over axis
by chunks of size
,
yielding non-overlapping views along that axis.
Iterator element is ArrayView<A, D>
The last view may have less elements if size
does not divide
the axis’ dimension.
Panics if axis
is out of bounds or if size
is zero.
use ndarray::Array; use ndarray::{arr3, Axis}; use std::iter::FromIterator; let a = Array::from_iter(0..28).into_shape((2, 7, 2)).unwrap(); let mut iter = a.axis_chunks_iter(Axis(1), 2); // first iteration yields a 2 × 2 × 2 view assert_eq!(iter.next().unwrap(), arr3(&[[[ 0, 1], [ 2, 3]], [[14, 15], [16, 17]]])); // however the last element is a 2 × 1 × 2 view since 7 % 2 == 1 assert_eq!(iter.next_back().unwrap(), arr3(&[[[12, 13]], [[26, 27]]]));
pub fn axis_chunks_iter_mut(
&mut self,
axis: Axis,
size: usize
) -> AxisChunksIterMut<'_, A, D>ⓘNotable traits for AxisChunksIterMut<'a, A, D>
impl<'a, A, D> Iterator for AxisChunksIterMut<'a, A, D> where
D: Dimension, type Item = ArrayBase<ViewRepr<&'a mut A>, D>;
where
S: DataMut,
[src]
&mut self,
axis: Axis,
size: usize
) -> AxisChunksIterMut<'_, A, D>ⓘ
Notable traits for AxisChunksIterMut<'a, A, D>
impl<'a, A, D> Iterator for AxisChunksIterMut<'a, A, D> where
D: Dimension, type Item = ArrayBase<ViewRepr<&'a mut A>, D>;
S: DataMut,
Return an iterator that traverses over axis
by chunks of size
,
yielding non-overlapping read-write views along that axis.
Iterator element is ArrayViewMut<A, D>
Panics if axis
is out of bounds or if size
is zero.
pub fn exact_chunks<E>(&self, chunk_size: E) -> ExactChunks<'_, A, D> where
E: IntoDimension<Dim = D>,
S: Data,
[src]
E: IntoDimension<Dim = D>,
S: Data,
Return an exact chunks producer (and iterable).
It produces the whole chunks of a given n-dimensional chunk size, skipping the remainder along each dimension that doesn’t fit evenly.
The produced element is a ArrayView<A, D>
with exactly the dimension
chunk_size
.
Panics if any dimension of chunk_size
is zero
(Panics if D
is IxDyn
and chunk_size
does not match the
number of array axes.)
pub fn exact_chunks_mut<E>(&mut self, chunk_size: E) -> ExactChunksMut<'_, A, D> where
E: IntoDimension<Dim = D>,
S: DataMut,
[src]
E: IntoDimension<Dim = D>,
S: DataMut,
Return an exact chunks producer (and iterable).
It produces the whole chunks of a given n-dimensional chunk size, skipping the remainder along each dimension that doesn’t fit evenly.
The produced element is a ArrayViewMut<A, D>
with exactly
the dimension chunk_size
.
Panics if any dimension of chunk_size
is zero
(Panics if D
is IxDyn
and chunk_size
does not match the
number of array axes.)
use ndarray::Array; use ndarray::arr2; let mut a = Array::zeros((6, 7)); // Fill each 2 × 2 chunk with the index of where it appeared in iteration for (i, mut chunk) in a.exact_chunks_mut((2, 2)).into_iter().enumerate() { chunk.fill(i); } // The resulting array is: assert_eq!( a, arr2(&[[0, 0, 1, 1, 2, 2, 0], [0, 0, 1, 1, 2, 2, 0], [3, 3, 4, 4, 5, 5, 0], [3, 3, 4, 4, 5, 5, 0], [6, 6, 7, 7, 8, 8, 0], [6, 6, 7, 7, 8, 8, 0]]));
pub fn windows<E>(&self, window_size: E) -> Windows<'_, A, D> where
E: IntoDimension<Dim = D>,
S: Data,
[src]
E: IntoDimension<Dim = D>,
S: Data,
Return a window producer and iterable.
The windows are all distinct overlapping views of size window_size
that fit into the array’s shape.
This produces no elements if the window size is larger than the actual array size along any axis.
The produced element is an ArrayView<A, D>
with exactly the dimension
window_size
.
Panics if any dimension of window_size
is zero.
(Panics if D
is IxDyn
and window_size
does not match the
number of array axes.)
This is an illustration of the 2×2 windows in a 3×4 array:
──▶ Axis(1)
│ ┏━━━━━┳━━━━━┱─────┬─────┐ ┌─────┲━━━━━┳━━━━━┱─────┐ ┌─────┬─────┲━━━━━┳━━━━━┓
▼ ┃ a₀₀ ┃ a₀₁ ┃ │ │ │ ┃ a₀₁ ┃ a₀₂ ┃ │ │ │ ┃ a₀₂ ┃ a₀₃ ┃
Axis(0) ┣━━━━━╋━━━━━╉─────┼─────┤ ├─────╊━━━━━╋━━━━━╉─────┤ ├─────┼─────╊━━━━━╋━━━━━┫
┃ a₁₀ ┃ a₁₁ ┃ │ │ │ ┃ a₁₁ ┃ a₁₂ ┃ │ │ │ ┃ a₁₂ ┃ a₁₃ ┃
┡━━━━━╇━━━━━╃─────┼─────┤ ├─────╄━━━━━╇━━━━━╃─────┤ ├─────┼─────╄━━━━━╇━━━━━┩
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┘
┌─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
┢━━━━━╈━━━━━╅─────┼─────┤ ├─────╆━━━━━╈━━━━━╅─────┤ ├─────┼─────╆━━━━━╈━━━━━┪
┃ a₁₀ ┃ a₁₁ ┃ │ │ │ ┃ a₁₁ ┃ a₁₂ ┃ │ │ │ ┃ a₁₂ ┃ a₁₃ ┃
┣━━━━━╋━━━━━╉─────┼─────┤ ├─────╊━━━━━╋━━━━━╉─────┤ ├─────┼─────╊━━━━━╋━━━━━┫
┃ a₂₀ ┃ a₂₁ ┃ │ │ │ ┃ a₂₁ ┃ a₂₂ ┃ │ │ │ ┃ a₂₂ ┃ a₂₃ ┃
┗━━━━━┻━━━━━┹─────┴─────┘ └─────┺━━━━━┻━━━━━┹─────┘ └─────┴─────┺━━━━━┻━━━━━┛
pub fn diag(&self) -> ArrayBase<ViewRepr<&A>, Dim<[usize; 1]>> where
S: Data,
[src]
S: Data,
Return a view of the diagonal elements of the array.
The diagonal is simply the sequence indexed by (0, 0, .., 0), (1, 1, …, 1) etc as long as all axes have elements.
pub fn diag_mut(&mut self) -> ArrayBase<ViewRepr<&mut A>, Dim<[usize; 1]>> where
S: DataMut,
[src]
S: DataMut,
Return a read-write view over the diagonal elements of the array.
pub fn into_diag(self) -> ArrayBase<S, Dim<[usize; 1]>>
[src]
Return the diagonal as a one-dimensional array.
pub fn is_standard_layout(&self) -> bool
[src]
Return true
if the array data is laid out in contiguous “C order” in
memory (where the last index is the most rapidly varying).
Return false
otherwise, i.e. the array is possibly not
contiguous in memory, it has custom strides, etc.
pub fn as_standard_layout(&self) -> ArrayBase<CowRepr<'_, A>, D> where
A: Clone,
S: Data<Elem = A>,
[src]
A: Clone,
S: Data<Elem = A>,
Return a standard-layout array containing the data, cloning if necessary.
If self
is in standard layout, a COW view of the data is returned
without cloning. Otherwise, the data is cloned, and the returned array
owns the cloned data.
use ndarray::Array2; let standard = Array2::<f64>::zeros((3, 4)); assert!(standard.is_standard_layout()); let cow_view = standard.as_standard_layout(); assert!(cow_view.is_view()); assert!(cow_view.is_standard_layout()); let fortran = standard.reversed_axes(); assert!(!fortran.is_standard_layout()); let cow_owned = fortran.as_standard_layout(); assert!(cow_owned.is_owned()); assert!(cow_owned.is_standard_layout());
pub fn as_ptr(&self) -> *const A
[src]
Return a pointer to the first element in the array.
Raw access to array elements needs to follow the strided indexing scheme: an element at multi-index I in an array with strides S is located at offset
Σ0 ≤ k < d Ik × Sk
where d is self.ndim()
.
pub fn as_mut_ptr(&mut self) -> *mut A where
S: RawDataMut,
[src]
S: RawDataMut,
Return a mutable pointer to the first element in the array.
pub fn raw_view(&self) -> ArrayBase<RawViewRepr<*const A>, D>
[src]
Return a raw view of the array.
pub fn raw_view_mut(&mut self) -> ArrayBase<RawViewRepr<*mut A>, D> where
S: RawDataMut,
[src]
S: RawDataMut,
Return a raw mutable view of the array.
pub fn as_slice(&self) -> Option<&[A]> where
S: Data,
[src]
S: Data,
Return the array’s data as a slice, if it is contiguous and in standard order.
Return None
otherwise.
If this function returns Some(_)
, then the element order in the slice
corresponds to the logical order of the array’s elements.
pub fn as_slice_mut(&mut self) -> Option<&mut [A]> where
S: DataMut,
[src]
S: DataMut,
Return the array’s data as a slice, if it is contiguous and in standard order.
Return None
otherwise.
pub fn as_slice_memory_order(&self) -> Option<&[A]> where
S: Data,
[src]
S: Data,
Return the array’s data as a slice if it is contiguous,
return None
otherwise.
If this function returns Some(_)
, then the elements in the slice
have whatever order the elements have in memory.
pub fn as_slice_memory_order_mut(&mut self) -> Option<&mut [A]> where
S: DataMut,
[src]
S: DataMut,
Return the array’s data as a slice if it is contiguous,
return None
otherwise.
pub fn into_shape<E>(
self,
shape: E
) -> Result<ArrayBase<S, <E as IntoDimension>::Dim>, ShapeError> where
E: IntoDimension,
[src]
self,
shape: E
) -> Result<ArrayBase<S, <E as IntoDimension>::Dim>, ShapeError> where
E: IntoDimension,
Transform the array into shape
; any shape with the same number of
elements is accepted, but the source array or view must be in standard
or column-major (Fortran) layout.
Errors if the shapes don’t have the same number of elements.
Errors if the input array is not c- or f-contiguous.
use ndarray::{aview1, aview2}; assert!( aview1(&[1., 2., 3., 4.]).into_shape((2, 2)).unwrap() == aview2(&[[1., 2.], [3., 4.]]) );
pub fn reshape<E>(&self, shape: E) -> ArrayBase<S, <E as IntoDimension>::Dim> where
E: IntoDimension,
A: Clone,
S: DataShared + DataOwned,
[src]
E: IntoDimension,
A: Clone,
S: DataShared + DataOwned,
Note: Reshape is for ArcArray
only. Use .into_shape()
for
other arrays and array views.
Transform the array into shape
; any shape with the same number of
elements is accepted.
May clone all elements if needed to arrange elements in standard layout (and break sharing).
Panics if shapes are incompatible.
use ndarray::{rcarr1, rcarr2}; assert!( rcarr1(&[1., 2., 3., 4.]).reshape((2, 2)) == rcarr2(&[[1., 2.], [3., 4.]]) );
pub fn into_dyn(self) -> ArrayBase<S, Dim<IxDynImpl>>
[src]
Convert any array or array view to a dynamic dimensional array or array view (respectively).
use ndarray::{arr2, ArrayD}; let array: ArrayD<i32> = arr2(&[[1, 2], [3, 4]]).into_dyn();
pub fn into_dimensionality<D2>(self) -> Result<ArrayBase<S, D2>, ShapeError> where
D2: Dimension,
[src]
D2: Dimension,
Convert an array or array view to another with the same type, but different dimensionality type. Errors if the dimensions don’t agree (the number of axes must match).
Note that conversion to a dynamic dimensional array will never fail (and is equivalent to
the into_dyn
method).
use ndarray::{ArrayD, Ix2, IxDyn}; // Create a dynamic dimensionality array and convert it to an Array2 // (Ix2 dimension type). let array = ArrayD::<f64>::zeros(IxDyn(&[10, 10])); assert!(array.into_dimensionality::<Ix2>().is_ok());
pub fn broadcast<E>(
&self,
dim: E
) -> Option<ArrayBase<ViewRepr<&A>, <E as IntoDimension>::Dim>> where
E: IntoDimension,
S: Data,
[src]
&self,
dim: E
) -> Option<ArrayBase<ViewRepr<&A>, <E as IntoDimension>::Dim>> where
E: IntoDimension,
S: Data,
Act like a larger size and/or shape array by broadcasting into a larger shape, if possible.
Return None
if shapes can not be broadcast together.
Background
- Two axes are compatible if they are equal, or one of them is 1.
- In this instance, only the axes of the smaller side (self) can be 1.
Compare axes beginning with the last axis of each shape.
For example (1, 2, 4) can be broadcast into (7, 6, 2, 4) because its axes are either equal or 1 (or missing); while (2, 2) can not be broadcast into (2, 4).
The implementation creates a view with strides set to zero for the axes that are to be repeated.
The broadcasting documentation for Numpy has more information.
use ndarray::{aview1, aview2}; assert!( aview1(&[1., 0.]).broadcast((10, 2)).unwrap() == aview2(&[[1., 0.]; 10]) );
pub fn swap_axes(&mut self, ax: usize, bx: usize)
[src]
Swap axes ax
and bx
.
This does not move any data, it just adjusts the array’s dimensions and strides.
Panics if the axes are out of bounds.
use ndarray::arr2; let mut a = arr2(&[[1., 2., 3.]]); a.swap_axes(0, 1); assert!( a == arr2(&[[1.], [2.], [3.]]) );
pub fn permuted_axes<T>(self, axes: T) -> ArrayBase<S, D> where
T: IntoDimension<Dim = D>,
[src]
T: IntoDimension<Dim = D>,
Permute the axes.
This does not move any data, it just adjusts the array’s dimensions and strides.
i in the j-th place in the axes sequence means self
’s i-th axis
becomes self.permuted_axes()
’s j-th axis
Panics if any of the axes are out of bounds, if an axis is missing, or if an axis is repeated more than once.
Examples
use ndarray::{arr2, Array3}; let a = arr2(&[[0, 1], [2, 3]]); assert_eq!(a.view().permuted_axes([1, 0]), a.t()); let b = Array3::<u8>::zeros((1, 2, 3)); assert_eq!(b.permuted_axes([1, 0, 2]).shape(), &[2, 1, 3]);
pub fn reversed_axes(self) -> ArrayBase<S, D>
[src]
Transpose the array by reversing axes.
Transposition reverses the order of the axes (dimensions and strides) while retaining the same data.
pub fn t(&self) -> ArrayBase<ViewRepr<&A>, D> where
S: Data,
[src]
S: Data,
Return a transposed view of the array.
This is a shorthand for self.view().reversed_axes()
.
See also the more general methods .reversed_axes()
and .swap_axes()
.
pub fn axes(&self) -> Axes<'_, D>ⓘ
[src]
Return an iterator over the length and stride of each axis.
pub fn max_stride_axis(&self) -> Axis
[src]
Return the axis with the greatest stride (by absolute value), preferring axes with len > 1.
pub fn invert_axis(&mut self, axis: Axis)
[src]
Reverse the stride of axis
.
Panics if the axis is out of bounds.
pub fn merge_axes(&mut self, take: Axis, into: Axis) -> bool
[src]
If possible, merge in the axis take
to into
.
Returns true
iff the axes are now merged.
This method merges the axes if movement along the two original axes
(moving fastest along the into
axis) can be equivalently represented
as movement along one (merged) axis. Merging the axes preserves this
order in the merged axis. If take
and into
are the same axis, then
the axis is “merged” if its length is ≤ 1.
If the return value is true
, then the following hold:
-
The new length of the
into
axis is the product of the original lengths of the two axes. -
The new length of the
take
axis is 0 if the product of the original lengths of the two axes is 0, and 1 otherwise.
If the return value is false
, then merging is not possible, and the
original shape and strides have been preserved.
Note that the ordering constraint means that if it’s possible to merge
take
into into
, it’s usually not possible to merge into
into
take
, and vice versa.
use ndarray::Array3; use ndarray::Axis; let mut a = Array3::<f64>::zeros((2, 3, 4)); assert!(a.merge_axes(Axis(1), Axis(2))); assert_eq!(a.shape(), &[2, 1, 12]);
Panics if an axis is out of bounds.
pub fn insert_axis(self, axis: Axis) -> ArrayBase<S, <D as Dimension>::Larger>
[src]
Insert new array axis at axis
and return the result.
use ndarray::{Array3, Axis, arr1, arr2}; // Convert a 1-D array into a row vector (2-D). let a = arr1(&[1, 2, 3]); let row = a.insert_axis(Axis(0)); assert_eq!(row, arr2(&[[1, 2, 3]])); // Convert a 1-D array into a column vector (2-D). let b = arr1(&[1, 2, 3]); let col = b.insert_axis(Axis(1)); assert_eq!(col, arr2(&[[1], [2], [3]])); // The new axis always has length 1. let b = Array3::<f64>::zeros((3, 4, 5)); assert_eq!(b.insert_axis(Axis(2)).shape(), &[3, 4, 1, 5]);
Panics if the axis is out of bounds.
pub fn remove_axis(self, axis: Axis) -> ArrayBase<S, <D as Dimension>::Smaller> where
D: RemoveAxis,
[src]
D: RemoveAxis,
Remove array axis axis
and return the result.
This is equivalent to .index_axis_move(axis, 0)
and makes most sense to use if the
axis to remove is of length 1.
Panics if the axis is out of bounds or its length is zero.
pub fn assign<E, S2>(&mut self, rhs: &ArrayBase<S2, E>) where
E: Dimension,
A: Clone,
S: DataMut,
S2: Data<Elem = A>,
[src]
E: Dimension,
A: Clone,
S: DataMut,
S2: Data<Elem = A>,
Perform an elementwise assigment to self
from rhs
.
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn assign_to<P>(&self, to: P) where
P: IntoNdProducer<Dim = D>,
A: Clone,
S: Data,
<P as IntoNdProducer>::Item: AssignElem<A>,
[src]
P: IntoNdProducer<Dim = D>,
A: Clone,
S: Data,
<P as IntoNdProducer>::Item: AssignElem<A>,
Perform an elementwise assigment of values cloned from self
into array or producer to
.
The destination to
can be another array or a producer of assignable elements.
AssignElem
determines how elements are assigned.
Panics if shapes disagree.
pub fn fill(&mut self, x: A) where
A: Clone,
S: DataMut,
[src]
A: Clone,
S: DataMut,
Perform an elementwise assigment to self
from element x
.
pub fn zip_mut_with<B, S2, E, F>(&mut self, rhs: &ArrayBase<S2, E>, f: F) where
E: Dimension,
F: FnMut(&mut A, &B),
S: DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
F: FnMut(&mut A, &B),
S: DataMut,
S2: Data<Elem = B>,
Traverse two arrays in unspecified order, in lock step,
calling the closure f
on each element pair.
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn fold<'a, F, B>(&'a self, init: B, f: F) -> B where
F: FnMut(B, &'a A) -> B,
A: 'a,
S: Data,
[src]
F: FnMut(B, &'a A) -> B,
A: 'a,
S: Data,
Traverse the array elements and apply a fold, returning the resulting value.
Elements are visited in arbitrary order.
pub fn map<'a, B, F>(&'a self, f: F) -> ArrayBase<OwnedRepr<B>, D> where
F: FnMut(&'a A) -> B,
A: 'a,
S: Data,
[src]
F: FnMut(&'a A) -> B,
A: 'a,
S: Data,
Call f
by reference on each element and create a new array
with the new values.
Elements are visited in arbitrary order.
Return an array with the same shape as self
.
use ndarray::arr2; let a = arr2(&[[ 0., 1.], [-1., 2.]]); assert!( a.map(|x| *x >= 1.0) == arr2(&[[false, true], [false, true]]) );
pub fn map_mut<'a, B, F>(&'a mut self, f: F) -> ArrayBase<OwnedRepr<B>, D> where
F: FnMut(&'a mut A) -> B,
A: 'a,
S: DataMut,
[src]
F: FnMut(&'a mut A) -> B,
A: 'a,
S: DataMut,
Call f
on a mutable reference of each element and create a new array
with the new values.
Elements are visited in arbitrary order.
Return an array with the same shape as self
.
pub fn mapv<B, F>(&self, f: F) -> ArrayBase<OwnedRepr<B>, D> where
F: FnMut(A) -> B,
A: Clone,
S: Data,
[src]
F: FnMut(A) -> B,
A: Clone,
S: Data,
Call f
by value on each element and create a new array
with the new values.
Elements are visited in arbitrary order.
Return an array with the same shape as self
.
use ndarray::arr2; let a = arr2(&[[ 0., 1.], [-1., 2.]]); assert!( a.mapv(f32::abs) == arr2(&[[0., 1.], [1., 2.]]) );
pub fn mapv_into<F>(self, f: F) -> ArrayBase<S, D> where
F: FnMut(A) -> A,
A: Clone,
S: DataMut,
[src]
F: FnMut(A) -> A,
A: Clone,
S: DataMut,
Call f
by value on each element, update the array with the new values
and return it.
Elements are visited in arbitrary order.
pub fn map_inplace<'a, F>(&'a mut self, f: F) where
F: FnMut(&'a mut A),
A: 'a,
S: DataMut,
[src]
F: FnMut(&'a mut A),
A: 'a,
S: DataMut,
Modify the array in place by calling f
by mutable reference on each element.
Elements are visited in arbitrary order.
pub fn mapv_inplace<F>(&mut self, f: F) where
F: FnMut(A) -> A,
A: Clone,
S: DataMut,
[src]
F: FnMut(A) -> A,
A: Clone,
S: DataMut,
Modify the array in place by calling f
by value on each element.
The array is updated with the new values.
Elements are visited in arbitrary order.
use approx::assert_abs_diff_eq; use ndarray::arr2; let mut a = arr2(&[[ 0., 1.], [-1., 2.]]); a.mapv_inplace(f32::exp); assert_abs_diff_eq!( a, arr2(&[[1.00000, 2.71828], [0.36788, 7.38906]]), epsilon = 1e-5, );
pub fn for_each<'a, F>(&'a self, f: F) where
F: FnMut(&'a A),
A: 'a,
S: Data,
[src]
F: FnMut(&'a A),
A: 'a,
S: Data,
Call f
for each element in the array.
Elements are visited in arbitrary order.
pub fn visit<'a, F>(&'a self, f: F) where
F: FnMut(&'a A),
A: 'a,
S: Data,
[src]
F: FnMut(&'a A),
A: 'a,
S: Data,
Renamed to .for_each()
Visit each element in the array by calling f
by reference
on each element.
Elements are visited in arbitrary order.
pub fn fold_axis<B, F>(
&self,
axis: Axis,
init: B,
fold: F
) -> ArrayBase<OwnedRepr<B>, <D as Dimension>::Smaller> where
F: FnMut(&B, &A) -> B,
D: RemoveAxis,
B: Clone,
S: Data,
[src]
&self,
axis: Axis,
init: B,
fold: F
) -> ArrayBase<OwnedRepr<B>, <D as Dimension>::Smaller> where
F: FnMut(&B, &A) -> B,
D: RemoveAxis,
B: Clone,
S: Data,
Fold along an axis.
Combine the elements of each subview with the previous using the fold
function and initial value init
.
Return the result as an Array
.
Panics if axis
is out of bounds.
pub fn map_axis<'a, B, F>(
&'a self,
axis: Axis,
mapping: F
) -> ArrayBase<OwnedRepr<B>, <D as Dimension>::Smaller> where
F: FnMut(ArrayBase<ViewRepr<&'a A>, Dim<[usize; 1]>>) -> B,
D: RemoveAxis,
A: 'a,
S: Data,
[src]
&'a self,
axis: Axis,
mapping: F
) -> ArrayBase<OwnedRepr<B>, <D as Dimension>::Smaller> where
F: FnMut(ArrayBase<ViewRepr<&'a A>, Dim<[usize; 1]>>) -> B,
D: RemoveAxis,
A: 'a,
S: Data,
Reduce the values along an axis into just one value, producing a new array with one less dimension.
Elements are visited in arbitrary order.
Return the result as an Array
.
Panics if axis
is out of bounds.
pub fn map_axis_mut<'a, B, F>(
&'a mut self,
axis: Axis,
mapping: F
) -> ArrayBase<OwnedRepr<B>, <D as Dimension>::Smaller> where
F: FnMut(ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 1]>>) -> B,
D: RemoveAxis,
A: 'a,
S: DataMut,
[src]
&'a mut self,
axis: Axis,
mapping: F
) -> ArrayBase<OwnedRepr<B>, <D as Dimension>::Smaller> where
F: FnMut(ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 1]>>) -> B,
D: RemoveAxis,
A: 'a,
S: DataMut,
Reduce the values along an axis into just one value, producing a new array with one less dimension. 1-dimensional lanes are passed as mutable references to the reducer, allowing for side-effects.
Elements are visited in arbitrary order.
Return the result as an Array
.
Panics if axis
is out of bounds.
pub fn accumulate_axis_inplace<F>(&mut self, axis: Axis, f: F) where
F: FnMut(&A, &mut A),
S: DataMut,
[src]
F: FnMut(&A, &mut A),
S: DataMut,
Iterates over pairs of consecutive elements along the axis.
The first argument to the closure is an element, and the second argument is the next element along the axis. Iteration is guaranteed to proceed in order along the specified axis, but in all other respects the iteration order is unspecified.
Example
For example, this can be used to compute the cumulative sum along an axis:
use ndarray::{array, Axis}; let mut arr = array![ [[1, 2], [3, 4], [5, 6]], [[7, 8], [9, 10], [11, 12]], ]; arr.accumulate_axis_inplace(Axis(1), |&prev, curr| *curr += prev); assert_eq!( arr, array![ [[1, 2], [4, 6], [9, 12]], [[7, 8], [16, 18], [27, 30]], ], );
impl<A> ArrayBase<OwnedRepr<A>, Dim<[usize; 0]>>
[src]
Methods specific to Array0
.
See also all methods for ArrayBase
pub fn into_scalar(self) -> A
[src]
Returns the single element in the array without cloning it.
use ndarray::{arr0, Array0}; // `Foo` doesn't implement `Clone`. #[derive(Debug, Eq, PartialEq)] struct Foo; let array: Array0<Foo> = arr0(Foo); let scalar: Foo = array.into_scalar(); assert_eq!(scalar, Foo);
impl<A, D> ArrayBase<OwnedRepr<A>, D> where
D: Dimension,
[src]
D: Dimension,
Methods specific to Array
.
See also all methods for ArrayBase
pub fn into_raw_vec(self) -> Vec<A, Global>ⓘ
[src]
Return a vector of the elements in the array, in the way they are stored internally.
If the array is in standard memory layout, the logical element order
of the array (.iter()
order) and of the returned vector will be the same.
impl<A, S, D> ArrayBase<S, D> where
D: Dimension,
S: RawDataSubst<A, Elem = MaybeUninit<A>>,
[src]
D: Dimension,
S: RawDataSubst<A, Elem = MaybeUninit<A>>,
Methods specific to arrays with MaybeUninit
elements.
See also all methods for ArrayBase
pub unsafe fn assume_init(self) -> ArrayBase<<S as RawDataSubst<A>>::Output, D>
[src]
Promise that the array’s elements are all fully initialized, and convert
the array from element type MaybeUninit<A>
to A
.
For example, it can convert an Array<MaybeUninit<f64>, D>
to Array<f64, D>
.
Safety
Safe to use if all the array’s elements have been initialized.
Note that for owned and shared ownership arrays, the promise must include all of the array’s storage; it is for example possible to slice these in place, but that must only be done after all elements have been initialized.
impl<A, S> ArrayBase<S, Dim<[usize; 1]>> where
S: RawData<Elem = A>,
[src]
S: RawData<Elem = A>,
pub fn to_vec(&self) -> Vec<A, Global>ⓘ where
A: Clone,
S: Data,
[src]
A: Clone,
S: Data,
Return an vector with the elements of the one-dimensional array.
impl<A, S> ArrayBase<S, Dim<[usize; 2]>> where
S: RawData<Elem = A>,
[src]
S: RawData<Elem = A>,
pub fn row(&self, index: usize) -> ArrayBase<ViewRepr<&A>, Dim<[usize; 1]>> where
S: Data,
[src]
S: Data,
Return an array view of row index
.
Panics if index
is out of bounds.
use ndarray::array; let array = array![[1., 2.], [3., 4.]]; assert_eq!(array.row(0), array![1., 2.]);
pub fn row_mut(
&mut self,
index: usize
) -> ArrayBase<ViewRepr<&mut A>, Dim<[usize; 1]>> where
S: DataMut,
[src]
&mut self,
index: usize
) -> ArrayBase<ViewRepr<&mut A>, Dim<[usize; 1]>> where
S: DataMut,
Return a mutable array view of row index
.
Panics if index
is out of bounds.
use ndarray::array; let mut array = array![[1., 2.], [3., 4.]]; array.row_mut(0)[1] = 5.; assert_eq!(array, array![[1., 5.], [3., 4.]]);
pub fn nrows(&self) -> usize
[src]
Return the number of rows (length of Axis(0)
) in the two-dimensional array.
use ndarray::array; let array = array![[1., 2.], [3., 4.]]; assert_eq!(array.nrows(), 2usize);
pub fn column(&self, index: usize) -> ArrayBase<ViewRepr<&A>, Dim<[usize; 1]>> where
S: Data,
[src]
S: Data,
Return an array view of column index
.
Panics if index
is out of bounds.
use ndarray::array; let array = array![[1., 2.], [3., 4.]]; assert_eq!(array.column(0), array![1., 3.]);
pub fn column_mut(
&mut self,
index: usize
) -> ArrayBase<ViewRepr<&mut A>, Dim<[usize; 1]>> where
S: DataMut,
[src]
&mut self,
index: usize
) -> ArrayBase<ViewRepr<&mut A>, Dim<[usize; 1]>> where
S: DataMut,
Return a mutable array view of column index
.
Panics if index
is out of bounds.
use ndarray::array; let mut array = array![[1., 2.], [3., 4.]]; array.column_mut(0)[1] = 5.; assert_eq!(array, array![[1., 2.], [5., 4.]]);
pub fn ncols(&self) -> usize
[src]
Return the number of columns (length of Axis(1)
) in the two-dimensional array.
use ndarray::array; let array = array![[1., 2.], [3., 4.]]; assert_eq!(array.ncols(), 2usize);
pub fn is_square(&self) -> bool
[src]
Return true if the array is square, false otherwise.
Examples
Sqaure:
use ndarray::array; let array = array![[1., 2.], [3., 4.]]; assert!(array.is_square());
Not sqaure:
use ndarray::array; let array = array![[1., 2., 5.], [3., 4., 6.]]; assert!(!array.is_square());
impl<A, S> ArrayBase<S, Dim<IxDynImpl>> where
S: Data<Elem = A>,
[src]
S: Data<Elem = A>,
pub fn insert_axis_inplace(&mut self, axis: Axis)
[src]
Insert new array axis of length 1 at axis
, modifying the shape and
strides in-place.
Panics if the axis is out of bounds.
use ndarray::{Axis, arr2, arr3}; let mut a = arr2(&[[1, 2, 3], [4, 5, 6]]).into_dyn(); assert_eq!(a.shape(), &[2, 3]); a.insert_axis_inplace(Axis(1)); assert_eq!(a, arr3(&[[[1, 2, 3]], [[4, 5, 6]]]).into_dyn()); assert_eq!(a.shape(), &[2, 1, 3]);
pub fn index_axis_inplace(&mut self, axis: Axis, index: usize)
[src]
Collapses the array to index
along the axis and removes the axis,
modifying the shape and strides in-place.
Panics if axis
or index
is out of bounds.
use ndarray::{Axis, arr1, arr2}; let mut a = arr2(&[[1, 2, 3], [4, 5, 6]]).into_dyn(); assert_eq!(a.shape(), &[2, 3]); a.index_axis_inplace(Axis(1), 1); assert_eq!(a, arr1(&[2, 5]).into_dyn()); assert_eq!(a.shape(), &[2]);
impl<A, S, D> ArrayBase<S, D> where
D: Dimension,
S: Data<Elem = A>,
[src]
D: Dimension,
S: Data<Elem = A>,
pub fn sum(&self) -> A where
A: Clone + Add<A, Output = A> + Zero,
[src]
A: Clone + Add<A, Output = A> + Zero,
Return the sum of all elements in the array.
use ndarray::arr2; let a = arr2(&[[1., 2.], [3., 4.]]); assert_eq!(a.sum(), 10.);
pub fn scalar_sum(&self) -> A where
A: Clone + Add<A, Output = A> + Zero,
[src]
A: Clone + Add<A, Output = A> + Zero,
renamed to sum
Return the sum of all elements in the array.
This method has been renamed to .sum()
pub fn mean(&self) -> Option<A> where
A: Clone + FromPrimitive + Add<A, Output = A> + Div<A, Output = A> + Zero,
[src]
A: Clone + FromPrimitive + Add<A, Output = A> + Div<A, Output = A> + Zero,
Returns the arithmetic mean x̅ of all elements in the array:
1 n
x̅ = ― ∑ xᵢ
n i=1
If the array is empty, None
is returned.
Panics if A::from_usize()
fails to convert the number of elements in the array.
pub fn product(&self) -> A where
A: Clone + Mul<A, Output = A> + One,
[src]
A: Clone + Mul<A, Output = A> + One,
Return the product of all elements in the array.
use ndarray::arr2; let a = arr2(&[[1., 2.], [3., 4.]]); assert_eq!(a.product(), 24.);
pub fn var(&self, ddof: A) -> A where
A: Float + FromPrimitive,
[src]
A: Float + FromPrimitive,
Return variance of elements in the array.
The variance is computed using the Welford one-pass algorithm.
The parameter ddof
specifies the “delta degrees of freedom”. For
example, to calculate the population variance, use ddof = 0
, or to
calculate the sample variance, use ddof = 1
.
The variance is defined as:
1 n
variance = ―――――――― ∑ (xᵢ - x̅)²
n - ddof i=1
where
1 n
x̅ = ― ∑ xᵢ
n i=1
and n
is the length of the array.
Panics if ddof
is less than zero or greater than n
Example
use ndarray::array; use approx::assert_abs_diff_eq; let a = array![1., -4.32, 1.14, 0.32]; let var = a.var(1.); assert_abs_diff_eq!(var, 6.7331, epsilon = 1e-4);
pub fn std(&self, ddof: A) -> A where
A: Float + FromPrimitive,
[src]
A: Float + FromPrimitive,
Return standard deviation of elements in the array.
The standard deviation is computed from the variance using the Welford one-pass algorithm.
The parameter ddof
specifies the “delta degrees of freedom”. For
example, to calculate the population standard deviation, use ddof = 0
,
or to calculate the sample standard deviation, use ddof = 1
.
The standard deviation is defined as:
⎛ 1 n ⎞
stddev = sqrt ⎜ ―――――――― ∑ (xᵢ - x̅)²⎟
⎝ n - ddof i=1 ⎠
where
1 n
x̅ = ― ∑ xᵢ
n i=1
and n
is the length of the array.
Panics if ddof
is less than zero or greater than n
Example
use ndarray::array; use approx::assert_abs_diff_eq; let a = array![1., -4.32, 1.14, 0.32]; let stddev = a.std(1.); assert_abs_diff_eq!(stddev, 2.59483, epsilon = 1e-4);
pub fn sum_axis(
&self,
axis: Axis
) -> ArrayBase<OwnedRepr<A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
A: Clone + Zero<Output = A> + Add<A>,
[src]
&self,
axis: Axis
) -> ArrayBase<OwnedRepr<A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
A: Clone + Zero<Output = A> + Add<A>,
Return sum along axis
.
use ndarray::{aview0, aview1, arr2, Axis}; let a = arr2(&[[1., 2., 3.], [4., 5., 6.]]); assert!( a.sum_axis(Axis(0)) == aview1(&[5., 7., 9.]) && a.sum_axis(Axis(1)) == aview1(&[6., 15.]) && a.sum_axis(Axis(0)).sum_axis(Axis(0)) == aview0(&21.) );
Panics if axis
is out of bounds.
pub fn mean_axis(
&self,
axis: Axis
) -> Option<ArrayBase<OwnedRepr<A>, <D as Dimension>::Smaller>> where
D: RemoveAxis,
A: Clone + Zero<Output = A> + FromPrimitive + Add<A> + Div<A, Output = A>,
[src]
&self,
axis: Axis
) -> Option<ArrayBase<OwnedRepr<A>, <D as Dimension>::Smaller>> where
D: RemoveAxis,
A: Clone + Zero<Output = A> + FromPrimitive + Add<A> + Div<A, Output = A>,
Return mean along axis
.
Return None
if the length of the axis is zero.
Panics if axis
is out of bounds or if A::from_usize()
fails for the axis length.
use ndarray::{aview0, aview1, arr2, Axis}; let a = arr2(&[[1., 2., 3.], [4., 5., 6.]]); assert!( a.mean_axis(Axis(0)).unwrap() == aview1(&[2.5, 3.5, 4.5]) && a.mean_axis(Axis(1)).unwrap() == aview1(&[2., 5.]) && a.mean_axis(Axis(0)).unwrap().mean_axis(Axis(0)).unwrap() == aview0(&3.5) );
pub fn var_axis(
&self,
axis: Axis,
ddof: A
) -> ArrayBase<OwnedRepr<A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
A: Float + FromPrimitive,
[src]
&self,
axis: Axis,
ddof: A
) -> ArrayBase<OwnedRepr<A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
A: Float + FromPrimitive,
Return variance along axis
.
The variance is computed using the Welford one-pass algorithm.
The parameter ddof
specifies the “delta degrees of freedom”. For
example, to calculate the population variance, use ddof = 0
, or to
calculate the sample variance, use ddof = 1
.
The variance is defined as:
1 n
variance = ―――――――― ∑ (xᵢ - x̅)²
n - ddof i=1
where
1 n
x̅ = ― ∑ xᵢ
n i=1
and n
is the length of the axis.
Panics if ddof
is less than zero or greater than n
, if axis
is out of bounds, or if A::from_usize()
fails for any any of the
numbers in the range 0..=n
.
Example
use ndarray::{aview1, arr2, Axis}; let a = arr2(&[[1., 2.], [3., 4.], [5., 6.]]); let var = a.var_axis(Axis(0), 1.); assert_eq!(var, aview1(&[4., 4.]));
pub fn std_axis(
&self,
axis: Axis,
ddof: A
) -> ArrayBase<OwnedRepr<A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
A: Float + FromPrimitive,
[src]
&self,
axis: Axis,
ddof: A
) -> ArrayBase<OwnedRepr<A>, <D as Dimension>::Smaller> where
D: RemoveAxis,
A: Float + FromPrimitive,
Return standard deviation along axis
.
The standard deviation is computed from the variance using the Welford one-pass algorithm.
The parameter ddof
specifies the “delta degrees of freedom”. For
example, to calculate the population standard deviation, use ddof = 0
,
or to calculate the sample standard deviation, use ddof = 1
.
The standard deviation is defined as:
⎛ 1 n ⎞
stddev = sqrt ⎜ ―――――――― ∑ (xᵢ - x̅)²⎟
⎝ n - ddof i=1 ⎠
where
1 n
x̅ = ― ∑ xᵢ
n i=1
and n
is the length of the axis.
Panics if ddof
is less than zero or greater than n
, if axis
is out of bounds, or if A::from_usize()
fails for any any of the
numbers in the range 0..=n
.
Example
use ndarray::{aview1, arr2, Axis}; let a = arr2(&[[1., 2.], [3., 4.], [5., 6.]]); let stddev = a.std_axis(Axis(0), 1.); assert_eq!(stddev, aview1(&[2., 2.]));
impl<A, S> ArrayBase<S, Dim<[usize; 1]>> where
S: Data<Elem = A>,
[src]
S: Data<Elem = A>,
pub fn dot<Rhs>(
&self,
rhs: &Rhs
) -> <ArrayBase<S, Dim<[usize; 1]>> as Dot<Rhs>>::Output where
ArrayBase<S, Dim<[usize; 1]>>: Dot<Rhs>,
[src]
&self,
rhs: &Rhs
) -> <ArrayBase<S, Dim<[usize; 1]>> as Dot<Rhs>>::Output where
ArrayBase<S, Dim<[usize; 1]>>: Dot<Rhs>,
Perform dot product or matrix multiplication of arrays self
and rhs
.
Rhs
may be either a one-dimensional or a two-dimensional array.
If Rhs
is one-dimensional, then the operation is a vector dot
product, which is the sum of the elementwise products (no conjugation
of complex operands, and thus not their inner product). In this case,
self
and rhs
must be the same length.
If Rhs
is two-dimensional, then the operation is matrix
multiplication, where self
is treated as a row vector. In this case,
if self
is shape M, then rhs
is shape M × N and the result is
shape N.
Panics if the array shapes are incompatible.
Note: If enabled, uses blas dot
for elements of f32, f64
when memory
layout allows.
impl<A, S> ArrayBase<S, Dim<[usize; 2]>> where
S: Data<Elem = A>,
[src]
S: Data<Elem = A>,
pub fn dot<Rhs>(
&self,
rhs: &Rhs
) -> <ArrayBase<S, Dim<[usize; 2]>> as Dot<Rhs>>::Output where
ArrayBase<S, Dim<[usize; 2]>>: Dot<Rhs>,
[src]
&self,
rhs: &Rhs
) -> <ArrayBase<S, Dim<[usize; 2]>> as Dot<Rhs>>::Output where
ArrayBase<S, Dim<[usize; 2]>>: Dot<Rhs>,
Perform matrix multiplication of rectangular arrays self
and rhs
.
Rhs
may be either a one-dimensional or a two-dimensional array.
If Rhs is two-dimensional, they array shapes must agree in the way that
if self
is M × N, then rhs
is N × K.
Return a result array with shape M × K.
Panics if shapes are incompatible or the number of elements in the
result would overflow isize
.
Note: If enabled, uses blas gemv/gemm
for elements of f32, f64
when memory layout allows. The default matrixmultiply backend
is otherwise used for f32, f64
for all memory layouts.
use ndarray::arr2; let a = arr2(&[[1., 2.], [0., 1.]]); let b = arr2(&[[1., 2.], [2., 3.]]); assert!( a.dot(&b) == arr2(&[[5., 8.], [2., 3.]]) );
impl<A, S, D> ArrayBase<S, D> where
D: Dimension,
S: Data<Elem = A>,
[src]
D: Dimension,
S: Data<Elem = A>,
pub fn scaled_add<S2, E>(&mut self, alpha: A, rhs: &ArrayBase<S2, E>) where
E: Dimension,
A: LinalgScalar,
S: DataMut,
S2: Data<Elem = A>,
[src]
E: Dimension,
A: LinalgScalar,
S: DataMut,
S2: Data<Elem = A>,
Perform the operation self += alpha * rhs
efficiently, where
alpha
is a scalar and rhs
is another array. This operation is
also known as axpy
in BLAS.
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
impl<'a, A, D> ArrayBase<ViewRepr<&'a A>, D> where
D: Dimension,
[src]
D: Dimension,
Methods for read-only array views.
pub fn from_shape<Sh>(
shape: Sh,
xs: &'a [A]
) -> Result<ArrayBase<ViewRepr<&'a A>, D>, ShapeError> where
Sh: Into<StrideShape<D>>,
[src]
shape: Sh,
xs: &'a [A]
) -> Result<ArrayBase<ViewRepr<&'a A>, D>, ShapeError> where
Sh: Into<StrideShape<D>>,
Create a read-only array view borrowing its data from a slice.
Checks whether shape
are compatible with the slice’s
length, returning an Err
if not compatible.
use ndarray::ArrayView; use ndarray::arr3; use ndarray::ShapeBuilder; // advanced example where we are even specifying exact strides to use (which is optional). let s = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; let a = ArrayView::from_shape((2, 3, 2).strides((1, 4, 2)), &s).unwrap(); assert!( a == arr3(&[[[0, 2], [4, 6], [8, 10]], [[1, 3], [5, 7], [9, 11]]]) ); assert!(a.strides() == &[1, 4, 2]);
pub unsafe fn from_shape_ptr<Sh>(
shape: Sh,
ptr: *const A
) -> ArrayBase<ViewRepr<&'a A>, D> where
Sh: Into<StrideShape<D>>,
[src]
shape: Sh,
ptr: *const A
) -> ArrayBase<ViewRepr<&'a A>, D> where
Sh: Into<StrideShape<D>>,
Create an ArrayView<A, D>
from shape information and a raw pointer to
the elements.
Safety
The caller is responsible for ensuring all of the following:
-
The elements seen by moving
ptr
according to the shape and strides must live at least as long as'a
and must not be not mutably aliased for the duration of'a
. -
ptr
must be non-null and aligned, and it must be safe to.offset()
ptr
by zero. -
It must be safe to
.offset()
the pointer repeatedly along all axes and calculate thecount
s for the.offset()
calls without overflow, even if the array is empty or the elements are zero-sized.In other words,
-
All possible pointers generated by moving along all axes must be in bounds or one byte past the end of a single allocation with element type
A
. The only exceptions are if the array is empty or the element type is zero-sized. In these cases,ptr
may be dangling, but it must still be safe to.offset()
the pointer along the axes. -
The offset in units of bytes between the least address and greatest address by moving along all axes must not exceed
isize::MAX
. This constraint prevents the computed offset, in bytes, from overflowingisize
regardless of the starting point due to past offsets. -
The offset in units of
A
between the least address and greatest address by moving along all axes must not exceedisize::MAX
. This constraint prevents overflow when calculating thecount
parameter to.offset()
regardless of the starting point due to past offsets.
-
-
The product of non-zero axis lengths must not exceed
isize::MAX
. -
Strides must be non-negative.
This function can use debug assertions to check some of these requirements, but it’s not a complete check.
impl<'a, A, D> ArrayBase<ViewRepr<&'a mut A>, D> where
D: Dimension,
[src]
D: Dimension,
Methods for read-write array views.
pub fn from_shape<Sh>(
shape: Sh,
xs: &'a mut [A]
) -> Result<ArrayBase<ViewRepr<&'a mut A>, D>, ShapeError> where
Sh: Into<StrideShape<D>>,
[src]
shape: Sh,
xs: &'a mut [A]
) -> Result<ArrayBase<ViewRepr<&'a mut A>, D>, ShapeError> where
Sh: Into<StrideShape<D>>,
Create a read-write array view borrowing its data from a slice.
Checks whether dim
and strides
are compatible with the slice’s
length, returning an Err
if not compatible.
use ndarray::ArrayViewMut; use ndarray::arr3; use ndarray::ShapeBuilder; let mut s = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; let mut a = ArrayViewMut::from_shape((2, 3, 2).strides((1, 4, 2)), &mut s).unwrap(); a[[0, 0, 0]] = 1; assert!( a == arr3(&[[[1, 2], [4, 6], [8, 10]], [[1, 3], [5, 7], [9, 11]]]) ); assert!(a.strides() == &[1, 4, 2]);
pub unsafe fn from_shape_ptr<Sh>(
shape: Sh,
ptr: *mut A
) -> ArrayBase<ViewRepr<&'a mut A>, D> where
Sh: Into<StrideShape<D>>,
[src]
shape: Sh,
ptr: *mut A
) -> ArrayBase<ViewRepr<&'a mut A>, D> where
Sh: Into<StrideShape<D>>,
Create an ArrayViewMut<A, D>
from shape information and a
raw pointer to the elements.
Safety
The caller is responsible for ensuring all of the following:
-
The elements seen by moving
ptr
according to the shape and strides must live at least as long as'a
and must not be aliased for the duration of'a
. -
ptr
must be non-null and aligned, and it must be safe to.offset()
ptr
by zero. -
It must be safe to
.offset()
the pointer repeatedly along all axes and calculate thecount
s for the.offset()
calls without overflow, even if the array is empty or the elements are zero-sized.In other words,
-
All possible pointers generated by moving along all axes must be in bounds or one byte past the end of a single allocation with element type
A
. The only exceptions are if the array is empty or the element type is zero-sized. In these cases,ptr
may be dangling, but it must still be safe to.offset()
the pointer along the axes. -
The offset in units of bytes between the least address and greatest address by moving along all axes must not exceed
isize::MAX
. This constraint prevents the computed offset, in bytes, from overflowingisize
regardless of the starting point due to past offsets. -
The offset in units of
A
between the least address and greatest address by moving along all axes must not exceedisize::MAX
. This constraint prevents overflow when calculating thecount
parameter to.offset()
regardless of the starting point due to past offsets.
-
-
The product of non-zero axis lengths must not exceed
isize::MAX
. -
Strides must be non-negative.
This function can use debug assertions to check some of these requirements, but it’s not a complete check.
pub fn reborrow<'b>(self) -> ArrayBase<ViewRepr<&'b mut A>, D> where
'a: 'b,
[src]
'a: 'b,
Convert the view into an ArrayViewMut<'b, A, D>
where 'b
is a lifetime
outlived by 'a'
.
impl<'a, A, D> ArrayBase<ViewRepr<&'a A>, D> where
D: Dimension,
[src]
D: Dimension,
Methods for read-only array views.
pub fn reborrow<'b>(self) -> ArrayBase<ViewRepr<&'b A>, D> where
'a: 'b,
[src]
'a: 'b,
Convert the view into an ArrayView<'b, A, D>
where 'b
is a lifetime
outlived by 'a'
.
pub fn to_slice(&self) -> Option<&'a [A]>
[src]
Return the array’s data as a slice, if it is contiguous and in standard order.
Return None
otherwise.
Note that while the method is similar to ArrayBase::as_slice()
, this method tranfers
the view’s lifetime to the slice, so it is a bit more powerful.
impl<'a, A> ArrayBase<ViewRepr<&'a A>, Dim<[usize; 0]>>
[src]
pub fn into_scalar(self) -> &'a AⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
Consume the view and return a reference to the single element in the array.
The lifetime of the returned reference matches the lifetime of the data the array view was pointing to.
use ndarray::{arr0, Array0}; // `Foo` doesn't implement `Clone`. #[derive(Debug, Eq, PartialEq)] struct Foo; let array: Array0<Foo> = arr0(Foo); let view = array.view(); let scalar: &Foo = view.into_scalar(); assert_eq!(scalar, &Foo);
impl<'a, A> ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 0]>>
[src]
Methods specific to ArrayViewMut0
.
See also all methods for ArrayViewMut
and ArrayBase
pub fn into_scalar(self) -> &'a mut AⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
Consume the mutable view and return a mutable reference to the single element in the array.
The lifetime of the returned reference matches the lifetime of the data the array view was pointing to.
use ndarray::{arr0, Array0}; let mut array: Array0<f64> = arr0(5.); let view = array.view_mut(); let mut scalar = view.into_scalar(); *scalar = 7.; assert_eq!(scalar, &7.); assert_eq!(array[()], 7.);
impl<'a, A, D> ArrayBase<ViewRepr<&'a mut A>, D> where
D: Dimension,
[src]
D: Dimension,
Methods for read-write array views.
pub fn into_slice(self) -> Option<&'a mut [A]>
[src]
Return the array’s data as a slice, if it is contiguous and in standard order.
Return None
otherwise.
Note that while this is similar to ArrayBase::as_slice_mut()
, this method tranfers the
view’s lifetime to the slice.
pub fn into_cell_view(self) -> ArrayBase<ViewRepr<&'a MathCell<A>>, D>
[src]
Return a shared view of the array with elements as if they were embedded in cells.
The cell view itself can be copied and accessed without exclusivity.
The view acts “as if” the elements are temporarily in cells, and elements can be changed through shared references using the regular cell methods.
impl<'a, A, D> ArrayBase<ViewRepr<&'a A>, D> where
D: Dimension,
[src]
D: Dimension,
Methods for read-only array views.
pub fn split_at(
self,
axis: Axis,
index: usize
) -> (ArrayBase<ViewRepr<&'a A>, D>, ArrayBase<ViewRepr<&'a A>, D>)
[src]
self,
axis: Axis,
index: usize
) -> (ArrayBase<ViewRepr<&'a A>, D>, ArrayBase<ViewRepr<&'a A>, D>)
Split the array view along axis
and return one view strictly before the
split and one view after the split.
Panics if axis
or index
is out of bounds.
Examples:
let a = aview2(&[[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 0, 1]]);
The array view a
has two axes and shape 3 × 4:
──▶ Axis(1)
┌─────┬─────┬─────┬─────┐ 0
│ │ a₀₀ │ a₀₁ │ a₀₂ │ a₀₃ │
▼ ├─────┼─────┼─────┼─────┤ 1
Axis(0)│ a₁₀ │ a₁₁ │ a₁₂ │ a₁₃ │
├─────┼─────┼─────┼─────┤ 2
│ a₂₀ │ a₂₁ │ a₂₂ │ a₂₃ │
└─────┴─────┴─────┴─────┘ 3 ↑
0 1 2 3 4 ← possible split_at indices.
Row indices increase along Axis(0)
, and column indices increase along
Axis(1)
. Note that we split “before” an element index, and that
both 0 and the endpoint are valid split indices.
Example 1: Split a
along the first axis, in this case the rows, at
index 2.
This produces views v1 and v2 of shapes 2 × 4 and 1 × 4:
let (v1, v2) = a.split_at(Axis(0), 2);
┌─────┬─────┬─────┬─────┐ 0 ↓ indices
│ a₀₀ │ a₀₁ │ a₀₂ │ a₀₃ │ along Axis(0)
├─────┼─────┼─────┼─────┤ v1 1
│ a₁₀ │ a₁₁ │ a₁₂ │ a₁₃ │
└─────┴─────┴─────┴─────┘
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ 2
┌─────┬─────┬─────┬─────┐
│ a₂₀ │ a₂₁ │ a₂₂ │ a₂₃ │ v2
└─────┴─────┴─────┴─────┘ 3
Example 2: Split a
along the second axis, in this case the
columns, at index 2.
This produces views u1 and u2 of shapes 3 × 2 and 3 × 2:
let (u1, u2) = a.split_at(Axis(1), 2);
u1 u2
┌─────┬─────┐┊┌─────┬─────┐
│ a₀₀ │ a₀₁ │┊│ a₀₂ │ a₀₃ │
├─────┼─────┤┊├─────┼─────┤
│ a₁₀ │ a₁₁ │┊│ a₁₂ │ a₁₃ │
├─────┼─────┤┊├─────┼─────┤
│ a₂₀ │ a₂₁ │┊│ a₂₂ │ a₂₃ │
└─────┴─────┘┊└─────┴─────┘
0 1 2 3 4 indices →
along Axis(1)
impl<'a, A, D> ArrayBase<ViewRepr<&'a mut A>, D> where
D: Dimension,
[src]
D: Dimension,
Methods for read-write array views.
pub fn split_at(
self,
axis: Axis,
index: usize
) -> (ArrayBase<ViewRepr<&'a mut A>, D>, ArrayBase<ViewRepr<&'a mut A>, D>)
[src]
self,
axis: Axis,
index: usize
) -> (ArrayBase<ViewRepr<&'a mut A>, D>, ArrayBase<ViewRepr<&'a mut A>, D>)
Split the array view along axis
and return one mutable view strictly
before the split and one mutable view after the split.
Panics if axis
or index
is out of bounds.
pub fn multi_slice_move<M>(
self,
info: M
) -> <M as MultiSliceArg<'a, A, D>>::Output where
M: MultiSliceArg<'a, A, D>,
[src]
self,
info: M
) -> <M as MultiSliceArg<'a, A, D>>::Output where
M: MultiSliceArg<'a, A, D>,
Split the view into multiple disjoint slices.
This is similar to .multi_slice_mut()
, but .multi_slice_move()
consumes self
and produces views with lifetimes matching that of
self
.
See Slicing for full documentation. See also
MultiSliceArg
, s!
, SliceArg
, and
SliceInfo
.
Panics if any of the following occur:
- if any of the views would intersect (i.e. if any element would appear in multiple slices)
- if an index is out of bounds or step size is zero
- if
D
isIxDyn
andinfo
does not match the number of array axes
impl<A, D> ArrayBase<RawViewRepr<*const A>, D> where
D: Dimension,
[src]
D: Dimension,
pub unsafe fn from_shape_ptr<Sh>(
shape: Sh,
ptr: *const A
) -> ArrayBase<RawViewRepr<*const A>, D> where
Sh: Into<StrideShape<D>>,
[src]
shape: Sh,
ptr: *const A
) -> ArrayBase<RawViewRepr<*const A>, D> where
Sh: Into<StrideShape<D>>,
Create an RawArrayView<A, D>
from shape information and a raw pointer
to the elements.
Safety
The caller is responsible for ensuring all of the following:
-
ptr
must be non-null, and it must be safe to.offset()
ptr
by zero. -
It must be safe to
.offset()
the pointer repeatedly along all axes and calculate thecount
s for the.offset()
calls without overflow, even if the array is empty or the elements are zero-sized.In other words,
-
All possible pointers generated by moving along all axes must be in bounds or one byte past the end of a single allocation with element type
A
. The only exceptions are if the array is empty or the element type is zero-sized. In these cases,ptr
may be dangling, but it must still be safe to.offset()
the pointer along the axes. -
The offset in units of bytes between the least address and greatest address by moving along all axes must not exceed
isize::MAX
. This constraint prevents the computed offset, in bytes, from overflowingisize
regardless of the starting point due to past offsets. -
The offset in units of
A
between the least address and greatest address by moving along all axes must not exceedisize::MAX
. This constraint prevents overflow when calculating thecount
parameter to.offset()
regardless of the starting point due to past offsets.
-
-
The product of non-zero axis lengths must not exceed
isize::MAX
. -
Strides must be non-negative.
This function can use debug assertions to check some of these requirements, but it’s not a complete check.
pub unsafe fn deref_into_view<'a>(self) -> ArrayBase<ViewRepr<&'a A>, D>
[src]
Converts to a read-only view of the array.
Safety
From a safety standpoint, this is equivalent to dereferencing a raw pointer for every element in the array. You must ensure that all of the data is valid, ensure that the pointer is aligned, and choose the correct lifetime.
pub fn split_at(
self,
axis: Axis,
index: usize
) -> (ArrayBase<RawViewRepr<*const A>, D>, ArrayBase<RawViewRepr<*const A>, D>)
[src]
self,
axis: Axis,
index: usize
) -> (ArrayBase<RawViewRepr<*const A>, D>, ArrayBase<RawViewRepr<*const A>, D>)
Split the array view along axis
and return one array pointer strictly
before the split and one array pointer after the split.
Panics if axis
or index
is out of bounds.
pub fn cast<B>(self) -> ArrayBase<RawViewRepr<*const B>, D>
[src]
Cast the raw pointer of the raw array view to a different type
Panics if element size is not compatible.
Lack of panic does not imply it is a valid cast. The cast works the same way as regular raw pointer casts.
While this method is safe, for the same reason as regular raw pointer casts are safe, access through the produced raw view is only possible in an unsafe block or function.
impl<A, D> ArrayBase<RawViewRepr<*mut A>, D> where
D: Dimension,
[src]
D: Dimension,
pub unsafe fn from_shape_ptr<Sh>(
shape: Sh,
ptr: *mut A
) -> ArrayBase<RawViewRepr<*mut A>, D> where
Sh: Into<StrideShape<D>>,
[src]
shape: Sh,
ptr: *mut A
) -> ArrayBase<RawViewRepr<*mut A>, D> where
Sh: Into<StrideShape<D>>,
Create an RawArrayViewMut<A, D>
from shape information and a raw
pointer to the elements.
Safety
The caller is responsible for ensuring all of the following:
-
ptr
must be non-null, and it must be safe to.offset()
ptr
by zero. -
It must be safe to
.offset()
the pointer repeatedly along all axes and calculate thecount
s for the.offset()
calls without overflow, even if the array is empty or the elements are zero-sized.In other words,
-
All possible pointers generated by moving along all axes must be in bounds or one byte past the end of a single allocation with element type
A
. The only exceptions are if the array is empty or the element type is zero-sized. In these cases,ptr
may be dangling, but it must still be safe to.offset()
the pointer along the axes. -
The offset in units of bytes between the least address and greatest address by moving along all axes must not exceed
isize::MAX
. This constraint prevents the computed offset, in bytes, from overflowingisize
regardless of the starting point due to past offsets. -
The offset in units of
A
between the least address and greatest address by moving along all axes must not exceedisize::MAX
. This constraint prevents overflow when calculating thecount
parameter to.offset()
regardless of the starting point due to past offsets.
-
-
The product of non-zero axis lengths must not exceed
isize::MAX
. -
Strides must be non-negative.
This function can use debug assertions to check some of these requirements, but it’s not a complete check.
pub unsafe fn deref_into_view<'a>(self) -> ArrayBase<ViewRepr<&'a A>, D>
[src]
Converts to a read-only view of the array.
Safety
From a safety standpoint, this is equivalent to dereferencing a raw pointer for every element in the array. You must ensure that all of the data is valid, ensure that the pointer is aligned, and choose the correct lifetime.
pub unsafe fn deref_into_view_mut<'a>(self) -> ArrayBase<ViewRepr<&'a mut A>, D>
[src]
Converts to a mutable view of the array.
Safety
From a safety standpoint, this is equivalent to dereferencing a raw pointer for every element in the array. You must ensure that all of the data is valid, ensure that the pointer is aligned, and choose the correct lifetime.
pub fn split_at(
self,
axis: Axis,
index: usize
) -> (ArrayBase<RawViewRepr<*mut A>, D>, ArrayBase<RawViewRepr<*mut A>, D>)
[src]
self,
axis: Axis,
index: usize
) -> (ArrayBase<RawViewRepr<*mut A>, D>, ArrayBase<RawViewRepr<*mut A>, D>)
Split the array view along axis
and return one array pointer strictly
before the split and one array pointer after the split.
Panics if axis
or index
is out of bounds.
pub fn cast<B>(self) -> ArrayBase<RawViewRepr<*mut B>, D>
[src]
Cast the raw pointer of the raw array view to a different type
Panics if element size is not compatible.
Lack of panic does not imply it is a valid cast. The cast works the same way as regular raw pointer casts.
While this method is safe, for the same reason as regular raw pointer casts are safe, access through the produced raw view is only possible in an unsafe block or function.
impl<'a, A, D> ArrayBase<CowRepr<'a, A>, D> where
D: Dimension,
[src]
D: Dimension,
Methods specific to CowArray
.
See also all methods for ArrayBase
pub fn is_view(&self) -> bool
[src]
Returns true
iff the array is the view (borrowed) variant.
pub fn is_owned(&self) -> bool
[src]
Returns true
iff the array is the owned variant.
Trait Implementations
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for f32 where
D: Dimension,
S: Data<Elem = f32>,
[src]
D: Dimension,
S: Data<Elem = f32>,
type Output = ArrayBase<OwnedRepr<f32>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for Complex<f32> where
D: Dimension,
S: Data<Elem = Complex<f32>>,
[src]
D: Dimension,
S: Data<Elem = Complex<f32>>,
type Output = ArrayBase<OwnedRepr<Complex<f32>>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f32> as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f32> as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for Complex<f64> where
D: Dimension,
S: Data<Elem = Complex<f64>>,
[src]
D: Dimension,
S: Data<Elem = Complex<f64>>,
type Output = ArrayBase<OwnedRepr<Complex<f64>>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f64> as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f64> as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for f64 where
D: Dimension,
S: Data<Elem = f64>,
[src]
D: Dimension,
S: Data<Elem = f64>,
type Output = ArrayBase<OwnedRepr<f64>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Add<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Add<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Add<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> Add<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Add<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Add<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
addition
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Add<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Add<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Add<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Add<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Add<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
addition
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Add<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Add<&'a ArrayBase<S2, E>>>::Output
impl<S, D> Add<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for Complex<f64> where
D: Dimension,
S: DataOwned<Elem = Complex<f64>> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = Complex<f64>> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for f64 where
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for f32 where
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for Complex<f32> where
D: Dimension,
S: DataOwned<Elem = Complex<f32>> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = Complex<f32>> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Add<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<'a, A, B, S, S2, D, E> Add<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Add<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Add<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
addition
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Add<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Add<ArrayBase<S2, E>>>::Output
impl<A, B, S, S2, D, E> Add<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Add<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Add<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
addition
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Add<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Add<ArrayBase<S2, E>>>::Output
impl<A, S, D, B> Add<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + Add<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Add<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
addition
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the +
operator.
pub fn add(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, D, B> Add<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + Add<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + Add<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
addition
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the +
operator.
pub fn add(self, x: B) -> <&'a ArrayBase<S, D> as Add<B>>::Output
[src]
impl<'a, A, S, S2, D, E> AddAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + AddAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + AddAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self += rhs
as elementwise addition (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn add_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> AddAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + AddAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + AddAssign<A>,
S: DataMut<Elem = A>,
Perform self += rhs
as elementwise addition (in place).
pub fn add_assign(&mut self, rhs: A)
[src]
impl<'a, A, S, D> Binary for ArrayBase<S, D> where
D: Dimension,
A: Binary,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Binary,
S: Data<Elem = A>,
Format the array using Binary
and apply the formatting parameters used
to each element.
The array is shown in multiline style.
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for bool where
D: Dimension,
S: Data<Elem = bool>,
[src]
D: Dimension,
S: Data<Elem = bool>,
type Output = ArrayBase<OwnedRepr<bool>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <bool as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <bool as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitAnd<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as BitAnd<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as BitAnd<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> BitAnd<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitAnd<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitAnd<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
bit and
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitAnd<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitAnd<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> BitAnd<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitAnd<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitAnd<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
bit and
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitAnd<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitAnd<&'a ArrayBase<S2, E>>>::Output
impl<S, D> BitAnd<ArrayBase<S, D>> for bool where
D: Dimension,
S: DataOwned<Elem = bool> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = bool> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitAnd<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<A, B, S, S2, D, E> BitAnd<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitAnd<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitAnd<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
bit and
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitAnd<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitAnd<ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> BitAnd<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + BitAnd<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + BitAnd<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
bit and
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the &
operator.
pub fn bitand(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitAnd<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitAnd<ArrayBase<S2, E>>>::Output
impl<A, S, D, B> BitAnd<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + BitAnd<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + BitAnd<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
bit and
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the &
operator.
pub fn bitand(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, D, B> BitAnd<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + BitAnd<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + BitAnd<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
bit and
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the &
operator.
pub fn bitand(self, x: B) -> <&'a ArrayBase<S, D> as BitAnd<B>>::Output
[src]
impl<'a, A, S, S2, D, E> BitAndAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + BitAndAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + BitAndAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self &= rhs
as elementwise bit and (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn bitand_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> BitAndAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + BitAndAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + BitAndAssign<A>,
S: DataMut<Elem = A>,
Perform self &= rhs
as elementwise bit and (in place).
pub fn bitand_assign(&mut self, rhs: A)
[src]
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for bool where
D: Dimension,
S: Data<Elem = bool>,
[src]
D: Dimension,
S: Data<Elem = bool>,
type Output = ArrayBase<OwnedRepr<bool>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <bool as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <bool as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitOr<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as BitOr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as BitOr<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> BitOr<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitOr<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitOr<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
bit or
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitOr<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitOr<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> BitOr<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitOr<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitOr<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
bit or
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitOr<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitOr<&'a ArrayBase<S2, E>>>::Output
impl<S, D> BitOr<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for bool where
D: Dimension,
S: DataOwned<Elem = bool> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = bool> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitOr<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<'a, A, B, S, S2, D, E> BitOr<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + BitOr<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + BitOr<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
bit or
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitOr<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitOr<ArrayBase<S2, E>>>::Output
impl<A, B, S, S2, D, E> BitOr<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitOr<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitOr<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
bit or
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the |
operator.
pub fn bitor(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitOr<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitOr<ArrayBase<S2, E>>>::Output
impl<'a, A, S, D, B> BitOr<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + BitOr<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + BitOr<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
bit or
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the |
operator.
pub fn bitor(self, x: B) -> <&'a ArrayBase<S, D> as BitOr<B>>::Output
[src]
impl<A, S, D, B> BitOr<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + BitOr<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + BitOr<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
bit or
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the |
operator.
pub fn bitor(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, S2, D, E> BitOrAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + BitOrAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + BitOrAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self |= rhs
as elementwise bit or (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn bitor_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> BitOrAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + BitOrAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + BitOrAssign<A>,
S: DataMut<Elem = A>,
Perform self |= rhs
as elementwise bit or (in place).
pub fn bitor_assign(&mut self, rhs: A)
[src]
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for bool where
D: Dimension,
S: Data<Elem = bool>,
[src]
D: Dimension,
S: Data<Elem = bool>,
type Output = ArrayBase<OwnedRepr<bool>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <bool as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <bool as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> BitXor<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as BitXor<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as BitXor<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> BitXor<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitXor<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitXor<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
bit xor
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitXor<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitXor<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> BitXor<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitXor<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitXor<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
bit xor
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitXor<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitXor<&'a ArrayBase<S2, E>>>::Output
impl<S, D> BitXor<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for bool where
D: Dimension,
S: DataOwned<Elem = bool> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = bool> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> BitXor<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<A, B, S, S2, D, E> BitXor<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitXor<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + BitXor<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
bit xor
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitXor<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as BitXor<ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> BitXor<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + BitXor<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + BitXor<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
bit xor
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the ^
operator.
pub fn bitxor(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitXor<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as BitXor<ArrayBase<S2, E>>>::Output
impl<'a, A, S, D, B> BitXor<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + BitXor<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + BitXor<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
bit xor
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, x: B) -> <&'a ArrayBase<S, D> as BitXor<B>>::Output
[src]
impl<A, S, D, B> BitXor<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + BitXor<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + BitXor<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
bit xor
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the ^
operator.
pub fn bitxor(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, S2, D, E> BitXorAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + BitXorAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + BitXorAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self ^= rhs
as elementwise bit xor (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn bitxor_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> BitXorAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + BitXorAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + BitXorAssign<A>,
S: DataMut<Elem = A>,
Perform self ^= rhs
as elementwise bit xor (in place).
pub fn bitxor_assign(&mut self, rhs: A)
[src]
impl<S, D> Clone for ArrayBase<S, D> where
D: Clone,
S: RawDataClone,
[src]
D: Clone,
S: RawDataClone,
pub fn clone(&self) -> ArrayBase<S, D>
[src]
pub fn clone_from(&mut self, other: &ArrayBase<S, D>)
[src]
Array
implements .clone_from()
to reuse an array’s existing
allocation. Semantically equivalent to *self = other.clone()
, but
potentially more efficient.
impl<S, D> Copy for ArrayBase<S, D> where
D: Copy,
S: RawDataClone + Copy,
[src]
D: Copy,
S: RawDataClone + Copy,
impl<'a, A, S, D> Debug for ArrayBase<S, D> where
D: Dimension,
A: Debug,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Debug,
S: Data<Elem = A>,
Format the array using Debug
and apply the formatting parameters used
to each element.
The array is shown in multiline style.
impl<A, S, D> Default for ArrayBase<S, D> where
D: Dimension,
A: Default,
S: DataOwned<Elem = A>,
[src]
D: Dimension,
A: Default,
S: DataOwned<Elem = A>,
Create an owned array with a default state.
The array is created with dimension D::default()
, which results
in for example dimensions 0
and (0, 0)
with zero elements for the
one-dimensional and two-dimensional cases respectively.
The default dimension for IxDyn
is IxDyn(&[0])
(array has zero
elements). And the default for the dimension ()
is ()
(array has
one element).
Since arrays cannot grow, the intention is to use the default value as placeholder.
impl<'a, A, S, D> Display for ArrayBase<S, D> where
D: Dimension,
A: Display,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Display,
S: Data<Elem = A>,
Format the array using Display
and apply the formatting parameters used
to each element.
The array is shown in multiline style.
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for Complex<f64> where
D: Dimension,
S: Data<Elem = Complex<f64>>,
[src]
D: Dimension,
S: Data<Elem = Complex<f64>>,
type Output = ArrayBase<OwnedRepr<Complex<f64>>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f64> as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f64> as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for f64 where
D: Dimension,
S: Data<Elem = f64>,
[src]
D: Dimension,
S: Data<Elem = f64>,
type Output = ArrayBase<OwnedRepr<f64>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for f32 where
D: Dimension,
S: Data<Elem = f32>,
[src]
D: Dimension,
S: Data<Elem = f32>,
type Output = ArrayBase<OwnedRepr<f32>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for Complex<f32> where
D: Dimension,
S: Data<Elem = Complex<f32>>,
[src]
D: Dimension,
S: Data<Elem = Complex<f32>>,
type Output = ArrayBase<OwnedRepr<Complex<f32>>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f32> as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f32> as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Div<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Div<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Div<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> Div<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Div<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Div<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
division
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Div<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Div<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Div<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Div<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Div<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
division
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Div<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Div<&'a ArrayBase<S2, E>>>::Output
impl<S, D> Div<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for f32 where
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for Complex<f64> where
D: Dimension,
S: DataOwned<Elem = Complex<f64>> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = Complex<f64>> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for f64 where
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Div<ArrayBase<S, D>> for Complex<f32> where
D: Dimension,
S: DataOwned<Elem = Complex<f32>> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = Complex<f32>> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<A, B, S, S2, D, E> Div<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Div<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Div<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
division
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Div<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Div<ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Div<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Div<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Div<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
division
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the /
operator.
pub fn div(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Div<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Div<ArrayBase<S2, E>>>::Output
impl<'a, A, S, D, B> Div<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + Div<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + Div<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
division
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the /
operator.
pub fn div(self, x: B) -> <&'a ArrayBase<S, D> as Div<B>>::Output
[src]
impl<A, S, D, B> Div<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + Div<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Div<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
division
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the /
operator.
pub fn div(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, S2, D, E> DivAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + DivAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + DivAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self /= rhs
as elementwise division (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn div_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> DivAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + DivAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + DivAssign<A>,
S: DataMut<Elem = A>,
Perform self /= rhs
as elementwise division (in place).
pub fn div_assign(&mut self, rhs: A)
[src]
impl<A, S, S2> Dot<ArrayBase<S2, Dim<[usize; 1]>>> for ArrayBase<S, Dim<[usize; 1]>> where
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
[src]
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
type Output = A
The result of the operation. Read more
pub fn dot(&self, rhs: &ArrayBase<S2, Dim<[usize; 1]>>) -> A
[src]
Compute the dot product of one-dimensional arrays.
The dot product is a sum of the elementwise products (no conjugation of complex operands, and thus not their inner product).
Panics if the arrays are not of the same length.
Note: If enabled, uses blas dot
for elements of f32, f64
when memory
layout allows.
impl<A, S, S2> Dot<ArrayBase<S2, Dim<[usize; 1]>>> for ArrayBase<S, Dim<[usize; 2]>> where
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
[src]
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
Perform the matrix multiplication of the rectangular array self
and
column vector rhs
.
The array shapes must agree in the way that
if self
is M × N, then rhs
is N.
Return a result array with shape M.
Panics if shapes are incompatible.
type Output = ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
The result of the operation. Read more
pub fn dot(
&self,
rhs: &ArrayBase<S2, Dim<[usize; 1]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
[src]
&self,
rhs: &ArrayBase<S2, Dim<[usize; 1]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
impl<A, S, S2> Dot<ArrayBase<S2, Dim<[usize; 2]>>> for ArrayBase<S, Dim<[usize; 2]>> where
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
[src]
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
type Output = ArrayBase<OwnedRepr<A>, Dim<[usize; 2]>>
The result of the operation. Read more
pub fn dot(
&self,
b: &ArrayBase<S2, Dim<[usize; 2]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 2]>>
[src]
&self,
b: &ArrayBase<S2, Dim<[usize; 2]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 2]>>
impl<A, S, S2> Dot<ArrayBase<S2, Dim<[usize; 2]>>> for ArrayBase<S, Dim<[usize; 1]>> where
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
[src]
A: LinalgScalar,
S: Data<Elem = A>,
S2: Data<Elem = A>,
type Output = ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
The result of the operation. Read more
pub fn dot(
&self,
rhs: &ArrayBase<S2, Dim<[usize; 2]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
[src]
&self,
rhs: &ArrayBase<S2, Dim<[usize; 2]>>
) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>
Perform the matrix multiplication of the row vector self
and
rectangular matrix rhs
.
The array shapes must agree in the way that
if self
is M, then rhs
is M × N.
Return a result array with shape N.
Panics if shapes are incompatible.
impl<S, D> Eq for ArrayBase<S, D> where
D: Dimension,
S: Data,
<S as RawData>::Elem: Eq,
[src]
D: Dimension,
S: Data,
<S as RawData>::Elem: Eq,
impl<'a, A, S, D> From<&'a ArrayBase<S, D>> for ArrayBase<ViewRepr<&'a A>, D> where
D: Dimension,
S: Data<Elem = A>,
[src]
D: Dimension,
S: Data<Elem = A>,
Implementation of ArrayView::from(&A)
where A
is an array.
pub fn from(array: &'a ArrayBase<S, D>) -> ArrayBase<ViewRepr<&'a A>, D>
[src]
Create a read-only array view of the array.
impl<'a, A, Slice> From<&'a Slice> for ArrayBase<ViewRepr<&'a A>, Dim<[usize; 1]>> where
Slice: AsRef<[A]> + ?Sized,
[src]
Slice: AsRef<[A]> + ?Sized,
Implementation of ArrayView::from(&S)
where S
is a slice or slicable.
pub fn from(slice: &'a Slice) -> ArrayBase<ViewRepr<&'a A>, Dim<[usize; 1]>>
[src]
Create a one-dimensional read-only array view of the data in slice
.
Panics if the slice length is greater than isize::MAX
.
impl<'a, A, S, D> From<&'a mut ArrayBase<S, D>> for ArrayBase<ViewRepr<&'a mut A>, D> where
D: Dimension,
S: DataMut<Elem = A>,
[src]
D: Dimension,
S: DataMut<Elem = A>,
Implementation of ArrayViewMut::from(&mut A)
where A
is an array.
pub fn from(array: &'a mut ArrayBase<S, D>) -> ArrayBase<ViewRepr<&'a mut A>, D>
[src]
Create a read-write array view of the array.
impl<'a, A, Slice> From<&'a mut Slice> for ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 1]>> where
Slice: AsMut<[A]> + ?Sized,
[src]
Slice: AsMut<[A]> + ?Sized,
Implementation of ArrayViewMut::from(&mut S)
where S
is a slice or slicable.
pub fn from(
slice: &'a mut Slice
) -> ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 1]>>
[src]
slice: &'a mut Slice
) -> ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 1]>>
Create a one-dimensional read-write array view of the data in slice
.
Panics if the slice length is greater than isize::MAX
.
impl<'a, A, D> From<ArrayBase<OwnedRepr<A>, D>> for ArrayBase<CowRepr<'a, A>, D> where
D: Dimension,
[src]
D: Dimension,
impl<D, T> From<ArrayBase<OwnedRepr<T>, D>> for Tensor where
T: Datum,
D: Dimension,
T: Datum,
D: Dimension,
impl<'a, A, D> From<ArrayBase<ViewRepr<&'a A>, D>> for ArrayBase<CowRepr<'a, A>, D> where
D: Dimension,
[src]
D: Dimension,
impl<A, S> From<Vec<A, Global>> for ArrayBase<S, Dim<[usize; 1]>> where
S: DataOwned<Elem = A>,
[src]
S: DataOwned<Elem = A>,
pub fn from(v: Vec<A, Global>) -> ArrayBase<S, Dim<[usize; 1]>>
[src]
Create a one-dimensional array from a vector (no copying needed).
Panics if the length is greater than isize::MAX
.
use ndarray::Array; let array = Array::from(vec![1., 2., 3., 4.]);
impl<A, V> From<Vec<V, Global>> for ArrayBase<OwnedRepr<A>, Dim<[usize; 2]>> where
V: FixedInitializer<Elem = A>,
[src]
V: FixedInitializer<Elem = A>,
pub fn from(xs: Vec<V, Global>) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 2]>>
[src]
Converts the Vec
of arrays to an owned 2-D array.
Panics if the product of non-zero axis lengths overflows isize
.
impl<A, V, U> From<Vec<V, Global>> for ArrayBase<OwnedRepr<A>, Dim<[usize; 3]>> where
V: FixedInitializer<Elem = U>,
U: FixedInitializer<Elem = A>,
[src]
V: FixedInitializer<Elem = U>,
U: FixedInitializer<Elem = A>,
pub fn from(xs: Vec<V, Global>) -> ArrayBase<OwnedRepr<A>, Dim<[usize; 3]>>
[src]
Converts the Vec
of arrays to an owned 3-D array.
Panics if the product of non-zero axis lengths overflows isize
.
impl<A, S> FromIterator<A> for ArrayBase<S, Dim<[usize; 1]>> where
S: DataOwned<Elem = A>,
[src]
S: DataOwned<Elem = A>,
pub fn from_iter<I>(iterable: I) -> ArrayBase<S, Dim<[usize; 1]>> where
I: IntoIterator<Item = A>,
[src]
I: IntoIterator<Item = A>,
Create a one-dimensional array from an iterable.
Panics if the length is greater than isize::MAX
.
use ndarray::{Array, arr1}; use std::iter::FromIterator; // Either use `from_iter` directly or use `Iterator::collect`. let array = Array::from_iter((0..5).map(|x| x * x)); assert!(array == arr1(&[0, 1, 4, 9, 16]))
impl<'a, S, D> Hash for ArrayBase<S, D> where
D: Dimension,
S: Data,
<S as RawData>::Elem: Hash,
[src]
D: Dimension,
S: Data,
<S as RawData>::Elem: Hash,
pub fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<S, D, I> Index<I> for ArrayBase<S, D> where
D: Dimension,
I: NdIndex<D>,
S: Data,
[src]
D: Dimension,
I: NdIndex<D>,
S: Data,
Access the element at index.
Panics if index is out of bounds.
type Output = <S as RawData>::Elem
The returned type after indexing.
pub fn index(&self, index: I) -> &<S as RawData>::Elem
[src]
impl<'a, I, A, D> IndexLonger<I> for ArrayBase<ViewRepr<&'a mut A>, D> where
D: Dimension,
I: NdIndex<D>,
[src]
D: Dimension,
I: NdIndex<D>,
type Output = &'a mut A
The type of the reference to the element that is produced, including its lifetime. Read more
pub fn index(self, index: I) -> &'a mut AⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
Convert a mutable array view to a mutable reference of a element.
This method is like IndexMut::index_mut
but with a longer lifetime
(matching the array view); which we can only do for the array view and
not in the Index
trait.
See also the get_mut
method which works for all arrays and array
views.
Panics if index is out of bounds.
pub fn get(self, index: I) -> Option<&'a mut A>
[src]
Convert a mutable array view to a mutable reference of a element, with checked access.
See also the get_mut
method which works for all arrays and array
views.
pub unsafe fn uget(self, index: I) -> &'a mut AⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
Convert a mutable array view to a mutable reference of a element without boundary check.
See also the uget_mut
method which works for all arrays and array
views.
Note: only unchecked for non-debug builds of ndarray.
impl<'a, 'b, I, A, D> IndexLonger<I> for &'b ArrayBase<ViewRepr<&'a A>, D> where
D: Dimension,
I: NdIndex<D>,
[src]
D: Dimension,
I: NdIndex<D>,
type Output = &'a A
The type of the reference to the element that is produced, including its lifetime. Read more
pub fn index(self, index: I) -> &'a AⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
Get a reference of a element through the view.
This method is like Index::index
but with a longer lifetime (matching
the array view); which we can only do for the array view and not in the
Index
trait.
See also the get
method which works for all arrays and array
views.
Panics if index is out of bounds.
pub fn get(self, index: I) -> Option<&'a A>
[src]
pub unsafe fn uget(self, index: I) -> &'a AⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
Get a reference of a element through the view without boundary check
This method is like elem
with a longer lifetime (matching the array
view); which we can’t do for general arrays.
See also the uget
method which works for all arrays and array
views.
Note: only unchecked for non-debug builds of ndarray.
impl<S, D, I> IndexMut<I> for ArrayBase<S, D> where
D: Dimension,
I: NdIndex<D>,
S: DataMut,
[src]
D: Dimension,
I: NdIndex<D>,
S: DataMut,
Access the element at index mutably.
Panics if index is out of bounds.
impl<D, T> IntoArcTensor for ArrayBase<OwnedRepr<T>, D> where
T: Datum,
D: Dimension,
T: Datum,
D: Dimension,
pub fn into_arc_tensor(self) -> Arc<Tensor>
impl<'a, A, D> IntoIterator for ArrayBase<ViewRepr<&'a mut A>, D> where
D: Dimension,
[src]
D: Dimension,
type Item = &'a mut A
The type of the elements being iterated over.
type IntoIter = IterMut<'a, A, D>
Which kind of iterator are we turning this into?
pub fn into_iter(
self
) -> <ArrayBase<ViewRepr<&'a mut A>, D> as IntoIterator>::IntoIter
[src]
self
) -> <ArrayBase<ViewRepr<&'a mut A>, D> as IntoIterator>::IntoIter
impl<'a, S, D> IntoIterator for &'a mut ArrayBase<S, D> where
D: Dimension,
S: DataMut,
[src]
D: Dimension,
S: DataMut,
type Item = &'a mut <S as RawData>::Elem
The type of the elements being iterated over.
type IntoIter = IterMut<'a, <S as RawData>::Elem, D>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> <&'a mut ArrayBase<S, D> as IntoIterator>::IntoIter
[src]
impl<'a, A, D> IntoIterator for ArrayBase<ViewRepr<&'a A>, D> where
D: Dimension,
[src]
D: Dimension,
type Item = &'a A
The type of the elements being iterated over.
type IntoIter = Iter<'a, A, D>
Which kind of iterator are we turning this into?
pub fn into_iter(
self
) -> <ArrayBase<ViewRepr<&'a A>, D> as IntoIterator>::IntoIter
[src]
self
) -> <ArrayBase<ViewRepr<&'a A>, D> as IntoIterator>::IntoIter
impl<'a, S, D> IntoIterator for &'a ArrayBase<S, D> where
D: Dimension,
S: Data,
[src]
D: Dimension,
S: Data,
type Item = &'a <S as RawData>::Elem
The type of the elements being iterated over.
type IntoIter = Iter<'a, <S as RawData>::Elem, D>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> <&'a ArrayBase<S, D> as IntoIterator>::IntoIter
[src]
impl<'a, A, S, D> IntoNdProducer for &'a ArrayBase<S, D> where
D: Dimension,
A: 'a,
S: Data<Elem = A>,
[src]
D: Dimension,
A: 'a,
S: Data<Elem = A>,
An array reference is an n-dimensional producer of element references (like ArrayView).
type Item = &'a A
The element produced per iteration.
type Dim = D
Dimension type of the producer
type Output = ArrayBase<ViewRepr<&'a A>, D>
pub fn into_producer(self) -> <&'a ArrayBase<S, D> as IntoNdProducer>::Output
[src]
impl<'a, A, S, D> IntoNdProducer for &'a mut ArrayBase<S, D> where
D: Dimension,
A: 'a,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: 'a,
S: DataMut<Elem = A>,
A mutable array reference is an n-dimensional producer of mutable element references (like ArrayViewMut).
type Item = &'a mut A
The element produced per iteration.
type Dim = D
Dimension type of the producer
type Output = ArrayBase<ViewRepr<&'a mut A>, D>
pub fn into_producer(
self
) -> <&'a mut ArrayBase<S, D> as IntoNdProducer>::Output
[src]
self
) -> <&'a mut ArrayBase<S, D> as IntoNdProducer>::Output
impl<D, T> IntoTensor for ArrayBase<OwnedRepr<T>, D> where
T: Datum,
D: Dimension,
T: Datum,
D: Dimension,
pub fn into_tensor(self) -> Tensor
impl<'a, A, S, D> LowerExp for ArrayBase<S, D> where
D: Dimension,
A: LowerExp,
S: Data<Elem = A>,
[src]
D: Dimension,
A: LowerExp,
S: Data<Elem = A>,
Format the array using LowerExp
and apply the formatting parameters used
to each element.
The array is shown in multiline style.
impl<'a, A, S, D> LowerHex for ArrayBase<S, D> where
D: Dimension,
A: LowerHex,
S: Data<Elem = A>,
[src]
D: Dimension,
A: LowerHex,
S: Data<Elem = A>,
Format the array using LowerHex
and apply the formatting parameters used
to each element.
The array is shown in multiline style.
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for f32 where
D: Dimension,
S: Data<Elem = f32>,
[src]
D: Dimension,
S: Data<Elem = f32>,
type Output = ArrayBase<OwnedRepr<f32>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for f64 where
D: Dimension,
S: Data<Elem = f64>,
[src]
D: Dimension,
S: Data<Elem = f64>,
type Output = ArrayBase<OwnedRepr<f64>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for Complex<f64> where
D: Dimension,
S: Data<Elem = Complex<f64>>,
[src]
D: Dimension,
S: Data<Elem = Complex<f64>>,
type Output = ArrayBase<OwnedRepr<Complex<f64>>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f64> as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f64> as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for Complex<f32> where
D: Dimension,
S: Data<Elem = Complex<f32>>,
[src]
D: Dimension,
S: Data<Elem = Complex<f32>>,
type Output = ArrayBase<OwnedRepr<Complex<f32>>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f32> as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f32> as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Mul<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Mul<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Mul<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> Mul<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Mul<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Mul<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
multiplication
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Mul<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Mul<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Mul<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Mul<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Mul<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
multiplication
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Mul<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Mul<&'a ArrayBase<S2, E>>>::Output
impl<S, D> Mul<ArrayBase<S, D>> for f64 where
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for f32 where
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for Complex<f64> where
D: Dimension,
S: DataOwned<Elem = Complex<f64>> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = Complex<f64>> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for Complex<f32> where
D: Dimension,
S: DataOwned<Elem = Complex<f32>> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = Complex<f32>> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Mul<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<'a, A, B, S, S2, D, E> Mul<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Mul<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Mul<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
multiplication
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Mul<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Mul<ArrayBase<S2, E>>>::Output
impl<A, B, S, S2, D, E> Mul<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Mul<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Mul<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
multiplication
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the *
operator.
pub fn mul(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Mul<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Mul<ArrayBase<S2, E>>>::Output
impl<A, S, D, B> Mul<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + Mul<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Mul<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
multiplication
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the *
operator.
pub fn mul(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, D, B> Mul<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + Mul<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + Mul<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
multiplication
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the *
operator.
pub fn mul(self, x: B) -> <&'a ArrayBase<S, D> as Mul<B>>::Output
[src]
impl<'a, A, S, S2, D, E> MulAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + MulAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + MulAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self *= rhs
as elementwise multiplication (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn mul_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> MulAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + MulAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + MulAssign<A>,
S: DataMut<Elem = A>,
Perform self *= rhs
as elementwise multiplication (in place).
pub fn mul_assign(&mut self, rhs: A)
[src]
impl<'a, A, D> NdProducer for ArrayBase<ViewRepr<&'a A>, D> where
D: Dimension,
[src]
D: Dimension,
type Item = &'a A
The element produced per iteration.
type Dim = D
Dimension type
type Ptr = *mut A
type Stride = isize
pub fn contiguous_stride(
&self
) -> <ArrayBase<ViewRepr<&'a A>, D> as NdProducer>::Stride
[src]
&self
) -> <ArrayBase<ViewRepr<&'a A>, D> as NdProducer>::Stride
pub fn raw_dim(&self) -> Self::Dim
[src]
pub fn __private__(&self) -> PrivateMarker
[src]
impl<'a, A, D> NdProducer for ArrayBase<ViewRepr<&'a mut A>, D> where
D: Dimension,
[src]
D: Dimension,
type Item = &'a mut A
The element produced per iteration.
type Dim = D
Dimension type
type Ptr = *mut A
type Stride = isize
pub fn contiguous_stride(
&self
) -> <ArrayBase<ViewRepr<&'a mut A>, D> as NdProducer>::Stride
[src]
&self
) -> <ArrayBase<ViewRepr<&'a mut A>, D> as NdProducer>::Stride
pub fn raw_dim(&self) -> Self::Dim
[src]
pub fn __private__(&self) -> PrivateMarker
[src]
impl<A, D> NdProducer for ArrayBase<RawViewRepr<*mut A>, D> where
D: Dimension,
[src]
D: Dimension,
type Item = *mut A
The element produced per iteration.
type Dim = D
Dimension type
type Ptr = *mut A
type Stride = isize
pub fn contiguous_stride(
&self
) -> <ArrayBase<RawViewRepr<*mut A>, D> as NdProducer>::Stride
[src]
&self
) -> <ArrayBase<RawViewRepr<*mut A>, D> as NdProducer>::Stride
pub fn raw_dim(&self) -> Self::Dim
[src]
pub fn __private__(&self) -> PrivateMarker
[src]
impl<A, D> NdProducer for ArrayBase<RawViewRepr<*const A>, D> where
D: Dimension,
[src]
D: Dimension,
type Item = *const A
The element produced per iteration.
type Dim = D
Dimension type
type Ptr = *const A
type Stride = isize
pub fn contiguous_stride(
&self
) -> <ArrayBase<RawViewRepr<*const A>, D> as NdProducer>::Stride
[src]
&self
) -> <ArrayBase<RawViewRepr<*const A>, D> as NdProducer>::Stride
pub fn raw_dim(&self) -> Self::Dim
[src]
pub fn __private__(&self) -> PrivateMarker
[src]
impl<'a, A, S, D> Neg for &'a ArrayBase<S, D> where
D: Dimension,
S: Data<Elem = A>,
&'a A: 'a,
&'a A: Neg,
<&'a A as Neg>::Output == A,
[src]
D: Dimension,
S: Data<Elem = A>,
&'a A: 'a,
&'a A: Neg,
<&'a A as Neg>::Output == A,
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the -
operator.
pub fn neg(self) -> ArrayBase<OwnedRepr<A>, D>
[src]
Perform an elementwise negation of reference self
and return the
result as a new Array
.
impl<A, S, D> Neg for ArrayBase<S, D> where
D: Dimension,
A: Clone + Neg<Output = A>,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Neg<Output = A>,
S: DataOwned<Elem = A> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn neg(self) -> ArrayBase<S, D>
[src]
Perform an elementwise negation of self
and return the result.
impl<'a, A, S, D> Not for &'a ArrayBase<S, D> where
D: Dimension,
S: Data<Elem = A>,
&'a A: 'a,
&'a A: Not,
<&'a A as Not>::Output == A,
[src]
D: Dimension,
S: Data<Elem = A>,
&'a A: 'a,
&'a A: Not,
<&'a A as Not>::Output == A,
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the !
operator.
pub fn not(self) -> ArrayBase<OwnedRepr<A>, D>
[src]
Perform an elementwise unary not of reference self
and return the
result as a new Array
.
impl<A, S, D> Not for ArrayBase<S, D> where
D: Dimension,
A: Clone + Not<Output = A>,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Not<Output = A>,
S: DataOwned<Elem = A> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the !
operator.
pub fn not(self) -> ArrayBase<S, D>
[src]
Perform an elementwise unary not of self
and return the result.
impl<'a, A, B, S, S2, D> PartialEq<&'a ArrayBase<S2, D>> for ArrayBase<S, D> where
D: Dimension,
A: PartialEq<B>,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
D: Dimension,
A: PartialEq<B>,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Return true
if the array shapes and all elements of self
and
rhs
are equal. Return false
otherwise.
pub fn eq(&self, rhs: &&ArrayBase<S2, D>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<A, B, S, S2, D> PartialEq<ArrayBase<S2, D>> for ArrayBase<S, D> where
D: Dimension,
A: PartialEq<B>,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
D: Dimension,
A: PartialEq<B>,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Return true
if the array shapes and all elements of self
and
rhs
are equal. Return false
otherwise.
pub fn eq(&self, rhs: &ArrayBase<S2, D>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, A, B, S, S2, D> PartialEq<ArrayBase<S2, D>> for &'a ArrayBase<S, D> where
D: Dimension,
A: PartialEq<B>,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
D: Dimension,
A: PartialEq<B>,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Return true
if the array shapes and all elements of self
and
rhs
are equal. Return false
otherwise.
pub fn eq(&self, rhs: &ArrayBase<S2, D>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for f32 where
D: Dimension,
S: Data<Elem = f32>,
[src]
D: Dimension,
S: Data<Elem = f32>,
type Output = ArrayBase<OwnedRepr<f32>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for f64 where
D: Dimension,
S: Data<Elem = f64>,
[src]
D: Dimension,
S: Data<Elem = f64>,
type Output = ArrayBase<OwnedRepr<f64>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Rem<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Rem<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Rem<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> Rem<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Rem<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Rem<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
remainder
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Rem<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Rem<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Rem<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Rem<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Rem<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
remainder
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Rem<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Rem<&'a ArrayBase<S2, E>>>::Output
impl<S, D> Rem<ArrayBase<S, D>> for f64 where
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for f32 where
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Rem<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<A, B, S, S2, D, E> Rem<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Rem<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Rem<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
remainder
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Rem<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Rem<ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Rem<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Rem<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Rem<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
remainder
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the %
operator.
pub fn rem(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Rem<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Rem<ArrayBase<S2, E>>>::Output
impl<A, S, D, B> Rem<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + Rem<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Rem<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
remainder
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the %
operator.
pub fn rem(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, D, B> Rem<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + Rem<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + Rem<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
remainder
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the %
operator.
pub fn rem(self, x: B) -> <&'a ArrayBase<S, D> as Rem<B>>::Output
[src]
impl<'a, A, S, S2, D, E> RemAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + RemAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + RemAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self %= rhs
as elementwise remainder (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn rem_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> RemAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + RemAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + RemAssign<A>,
S: DataMut<Elem = A>,
Perform self %= rhs
as elementwise remainder (in place).
pub fn rem_assign(&mut self, rhs: A)
[src]
impl<S, D> Send for ArrayBase<S, D> where
D: Send,
S: Send + Data,
[src]
D: Send,
S: Send + Data,
ArrayBase
is Send
when the storage type is.
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shl<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Shl<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Shl<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> Shl<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shl<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shl<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
left shift
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Shl<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Shl<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Shl<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shl<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shl<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
left shift
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Shl<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Shl<&'a ArrayBase<S2, E>>>::Output
impl<S, D> Shl<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shl<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<'a, A, B, S, S2, D, E> Shl<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Shl<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Shl<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
left shift
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Shl<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Shl<ArrayBase<S2, E>>>::Output
impl<A, B, S, S2, D, E> Shl<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shl<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shl<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
left shift
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the <<
operator.
pub fn shl(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Shl<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Shl<ArrayBase<S2, E>>>::Output
impl<A, S, D, B> Shl<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + Shl<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Shl<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
left shift
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the <<
operator.
pub fn shl(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, D, B> Shl<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + Shl<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + Shl<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
left shift
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the <<
operator.
pub fn shl(self, x: B) -> <&'a ArrayBase<S, D> as Shl<B>>::Output
[src]
impl<'a, A, S, S2, D, E> ShlAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + ShlAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + ShlAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self <<= rhs
as elementwise left shift (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn shl_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> ShlAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + ShlAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + ShlAssign<A>,
S: DataMut<Elem = A>,
Perform self <<= rhs
as elementwise left shift (in place).
pub fn shl_assign(&mut self, rhs: A)
[src]
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Shr<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Shr<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Shr<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> Shr<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shr<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shr<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
right shift
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Shr<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Shr<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Shr<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shr<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shr<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
right shift
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Shr<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Shr<&'a ArrayBase<S2, E>>>::Output
impl<S, D> Shr<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Shr<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<'a, A, B, S, S2, D, E> Shr<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Shr<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Shr<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
right shift
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Shr<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Shr<ArrayBase<S2, E>>>::Output
impl<A, B, S, S2, D, E> Shr<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shr<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Shr<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
right shift
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the >>
operator.
pub fn shr(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Shr<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Shr<ArrayBase<S2, E>>>::Output
impl<A, S, D, B> Shr<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + Shr<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Shr<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
right shift
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the >>
operator.
pub fn shr(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, D, B> Shr<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + Shr<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + Shr<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
right shift
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the >>
operator.
pub fn shr(self, x: B) -> <&'a ArrayBase<S, D> as Shr<B>>::Output
[src]
impl<'a, A, S, S2, D, E> ShrAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + ShrAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + ShrAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self >>= rhs
as elementwise right shift (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn shr_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> ShrAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + ShrAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + ShrAssign<A>,
S: DataMut<Elem = A>,
Perform self >>= rhs
as elementwise right shift (in place).
pub fn shr_assign(&mut self, rhs: A)
[src]
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for u64 where
D: Dimension,
S: Data<Elem = u64>,
[src]
D: Dimension,
S: Data<Elem = u64>,
type Output = ArrayBase<OwnedRepr<u64>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u64 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for f32 where
D: Dimension,
S: Data<Elem = f32>,
[src]
D: Dimension,
S: Data<Elem = f32>,
type Output = ArrayBase<OwnedRepr<f32>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f32 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for Complex<f32> where
D: Dimension,
S: Data<Elem = Complex<f32>>,
[src]
D: Dimension,
S: Data<Elem = Complex<f32>>,
type Output = ArrayBase<OwnedRepr<Complex<f32>>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f32> as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f32> as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for i128 where
D: Dimension,
S: Data<Elem = i128>,
[src]
D: Dimension,
S: Data<Elem = i128>,
type Output = ArrayBase<OwnedRepr<i128>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i128 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for i16 where
D: Dimension,
S: Data<Elem = i16>,
[src]
D: Dimension,
S: Data<Elem = i16>,
type Output = ArrayBase<OwnedRepr<i16>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i16 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for i64 where
D: Dimension,
S: Data<Elem = i64>,
[src]
D: Dimension,
S: Data<Elem = i64>,
type Output = ArrayBase<OwnedRepr<i64>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i64 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for i8 where
D: Dimension,
S: Data<Elem = i8>,
[src]
D: Dimension,
S: Data<Elem = i8>,
type Output = ArrayBase<OwnedRepr<i8>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i8 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for u8 where
D: Dimension,
S: Data<Elem = u8>,
[src]
D: Dimension,
S: Data<Elem = u8>,
type Output = ArrayBase<OwnedRepr<u8>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u8 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for u128 where
D: Dimension,
S: Data<Elem = u128>,
[src]
D: Dimension,
S: Data<Elem = u128>,
type Output = ArrayBase<OwnedRepr<u128>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u128 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for u16 where
D: Dimension,
S: Data<Elem = u16>,
[src]
D: Dimension,
S: Data<Elem = u16>,
type Output = ArrayBase<OwnedRepr<u16>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u16 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for Complex<f64> where
D: Dimension,
S: Data<Elem = Complex<f64>>,
[src]
D: Dimension,
S: Data<Elem = Complex<f64>>,
type Output = ArrayBase<OwnedRepr<Complex<f64>>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f64> as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <Complex<f64> as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for i32 where
D: Dimension,
S: Data<Elem = i32>,
[src]
D: Dimension,
S: Data<Elem = i32>,
type Output = ArrayBase<OwnedRepr<i32>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <i32 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for u32 where
D: Dimension,
S: Data<Elem = u32>,
[src]
D: Dimension,
S: Data<Elem = u32>,
type Output = ArrayBase<OwnedRepr<u32>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <u32 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, S, D> Sub<&'a ArrayBase<S, D>> for f64 where
D: Dimension,
S: Data<Elem = f64>,
[src]
D: Dimension,
S: Data<Elem = f64>,
type Output = ArrayBase<OwnedRepr<f64>, D>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Sub<&'a ArrayBase<S, D>>>::Output
[src]
self,
rhs: &ArrayBase<S, D>
) -> <f64 as Sub<&'a ArrayBase<S, D>>>::Output
impl<'a, A, B, S, S2, D, E> Sub<&'a ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Sub<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Sub<B, Output = A>,
B: Clone,
S: Data<Elem = A>,
S2: Data<Elem = B>,
Perform elementwise
subtraction
between references self
and rhs
,
and return the result as a new Array
.
If their shapes disagree, self
and rhs
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<OwnedRepr<A>, <D as DimMax<E>>::Output>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Sub<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &'a ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Sub<&'a ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Sub<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Sub<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Sub<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
subtraction
between self
and reference rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Sub<&'a ArrayBase<S2, E>>>::Output
[src]
self,
rhs: &ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Sub<&'a ArrayBase<S2, E>>>::Output
impl<S, D> Sub<ArrayBase<S, D>> for u64 where
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for u32 where
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for Complex<f32> where
D: Dimension,
S: DataOwned<Elem = Complex<f32>> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = Complex<f32>> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for u16 where
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for i32 where
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for u128 where
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for i128 where
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i128> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for i8 where
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for u8 where
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = u8> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for i64 where
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for f32 where
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f32> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for f64 where
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = f64> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for Complex<f64> where
D: Dimension,
S: DataOwned<Elem = Complex<f64>> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = Complex<f64>> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<S, D> Sub<ArrayBase<S, D>> for i16 where
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
[src]
D: Dimension,
S: DataOwned<Elem = i16> + DataMut,
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: ArrayBase<S, D>) -> ArrayBase<S, D>
[src]
impl<A, B, S, S2, D, E> Sub<ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Sub<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
[src]
E: Dimension,
D: Dimension + DimMax<E>,
A: Clone + Sub<B, Output = A>,
B: Clone,
S: DataOwned<Elem = A> + DataMut,
S2: Data<Elem = B>,
Perform elementwise
subtraction
between self
and rhs
,
and return the result.
self
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S, <D as DimMax<E>>::Output>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Sub<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <ArrayBase<S, D> as Sub<ArrayBase<S2, E>>>::Output
impl<'a, A, B, S, S2, D, E> Sub<ArrayBase<S2, E>> for &'a ArrayBase<S, D> where
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Sub<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
[src]
E: Dimension + DimMax<D>,
D: Dimension,
A: Clone + Sub<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
Perform elementwise
subtraction
between reference self
and rhs
,
and return the result.
rhs
must be an Array
or ArcArray
.
If their shapes disagree, self
is broadcast to their broadcast shape,
cloning the data if needed.
Panics if broadcasting isn’t possible.
type Output = ArrayBase<S2, <E as DimMax<D>>::Output>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Sub<ArrayBase<S2, E>>>::Output
[src]
self,
rhs: ArrayBase<S2, E>
) -> <&'a ArrayBase<S, D> as Sub<ArrayBase<S2, E>>>::Output
impl<'a, A, S, D, B> Sub<B> for &'a ArrayBase<S, D> where
D: Dimension,
A: Clone + Sub<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
[src]
D: Dimension,
A: Clone + Sub<B, Output = A>,
B: ScalarOperand,
S: Data<Elem = A>,
Perform elementwise
subtraction
between the reference self
and the scalar x
,
and return the result as a new Array
.
type Output = ArrayBase<OwnedRepr<A>, D>
The resulting type after applying the -
operator.
pub fn sub(self, x: B) -> <&'a ArrayBase<S, D> as Sub<B>>::Output
[src]
impl<A, S, D, B> Sub<B> for ArrayBase<S, D> where
D: Dimension,
A: Clone + Sub<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
[src]
D: Dimension,
A: Clone + Sub<B, Output = A>,
B: ScalarOperand,
S: DataOwned<Elem = A> + DataMut,
Perform elementwise
subtraction
between self
and the scalar x
,
and return the result (based on self
).
self
must be an Array
or ArcArray
.
type Output = ArrayBase<S, D>
The resulting type after applying the -
operator.
pub fn sub(self, x: B) -> ArrayBase<S, D>
[src]
impl<'a, A, S, S2, D, E> SubAssign<&'a ArrayBase<S2, E>> for ArrayBase<S, D> where
E: Dimension,
D: Dimension,
A: Clone + SubAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
[src]
E: Dimension,
D: Dimension,
A: Clone + SubAssign<A>,
S: DataMut<Elem = A>,
S2: Data<Elem = A>,
Perform self -= rhs
as elementwise subtraction (in place).
If their shapes disagree, rhs
is broadcast to the shape of self
.
Panics if broadcasting isn’t possible.
pub fn sub_assign(&mut self, rhs: &ArrayBase<S2, E>)
[src]
impl<A, S, D> SubAssign<A> for ArrayBase<S, D> where
D: Dimension,
A: ScalarOperand + SubAssign<A>,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: ScalarOperand + SubAssign<A>,
S: DataMut<Elem = A>,
Perform self -= rhs
as elementwise subtraction (in place).
pub fn sub_assign(&mut self, rhs: A)
[src]
impl<S, D> Sync for ArrayBase<S, D> where
D: Sync,
S: Sync + Data,
[src]
D: Sync,
S: Sync + Data,
ArrayBase
is Sync
when the storage type is.
impl<'a, A, S, D> UpperExp for ArrayBase<S, D> where
D: Dimension,
A: UpperExp,
S: Data<Elem = A>,
[src]
D: Dimension,
A: UpperExp,
S: Data<Elem = A>,
Format the array using UpperExp
and apply the formatting parameters used
to each element.
The array is shown in multiline style.
Auto Trait Implementations
impl<S, D> RefUnwindSafe for ArrayBase<S, D> where
D: RefUnwindSafe,
S: RefUnwindSafe,
<S as RawData>::Elem: RefUnwindSafe,
D: RefUnwindSafe,
S: RefUnwindSafe,
<S as RawData>::Elem: RefUnwindSafe,
impl<S, D> Unpin for ArrayBase<S, D> where
D: Unpin,
S: Unpin,
D: Unpin,
S: Unpin,
impl<S, D> UnwindSafe for ArrayBase<S, D> where
D: UnwindSafe,
S: UnwindSafe,
<S as RawData>::Elem: RefUnwindSafe,
D: UnwindSafe,
S: UnwindSafe,
<S as RawData>::Elem: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<'a, A, D, T> AsArray<'a, A, D> for T where
T: Into<ArrayBase<ViewRepr<&'a A>, D>>,
D: Dimension,
A: 'a,
[src]
T: Into<ArrayBase<ViewRepr<&'a A>, D>>,
D: Dimension,
A: 'a,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
impl<T> Conv for T
impl<T> Conv for T
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> FmtForward for T
pub fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
Self: Binary,
pub fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
Self: Display,
pub fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
Self: LowerExp,
pub fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
Self: LowerHex,
pub fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
Self: Octal,
pub fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
Self: Pointer,
pub fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
Self: UpperExp,
pub fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
Self: UpperHex,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<P> IntoNdProducer for P where
P: NdProducer,
[src]
P: NdProducer,
type Item = <P as NdProducer>::Item
The element produced per iteration.
type Dim = <P as NdProducer>::Dim
Dimension type of the producer
type Output = P
pub fn into_producer(self) -> <P as IntoNdProducer>::Output
[src]
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
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>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> Pipe for T where
T: ?Sized,
T: ?Sized,
pub fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
R: 'a,
pub fn pipe_ref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
pub fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_as_mut<'a, U, R>(
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
pub fn pipe_deref_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
T: 'a + ?Sized,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
T: 'a + ?Sized,
R: 'a,
impl<T> Pipe for T
impl<T> PipeAsRef for T
pub fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Self: AsRef<T>,
T: 'a,
R: 'a,
pub fn pipe_as_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
impl<T> PipeBorrow for T
pub fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Self: Borrow<T>,
T: 'a,
R: 'a,
pub fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
impl<T> PipeDeref for T
pub fn pipe_deref<'a, R>(
&'a self,
func: impl FnOnce(&'a Self::Target) -> R
) -> R where
Self: Deref,
R: 'a,
&'a self,
func: impl FnOnce(&'a Self::Target) -> R
) -> R where
Self: Deref,
R: 'a,
pub fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
impl<T> PipeRef for T
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
R: 'a,
pub fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
R: 'a,
impl<T, Base> RefNum<Base> for T where
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,
[src]
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,
impl<T> Tap for T
pub fn tap(self, func: impl FnOnce(&Self)) -> Self
pub fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self
pub fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
pub fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
pub fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
pub fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
impl<T> Tap for T
pub fn tap<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
F: FnOnce(&Self) -> R,
pub fn tap_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
F: FnOnce(&Self) -> R,
pub fn tap_mut<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
F: FnOnce(&mut Self) -> R,
pub fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
F: FnOnce(&mut Self) -> R,
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
U: ?Sized,
pub fn tap_ref<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Self: AsRef<T>,
F: FnOnce(&T) -> R,
pub fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Self: AsRef<T>,
F: FnOnce(&T) -> R,
pub fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
pub fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
U: ?Sized,
pub fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Self: Borrow<T>,
F: FnOnce(&T) -> R,
pub fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Self: Borrow<T>,
F: FnOnce(&T) -> R,
pub fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
pub fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
impl<T> TapDeref for T
pub fn tap_deref<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Self: Deref,
F: FnOnce(&Self::Target) -> R,
pub fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Self: Deref,
F: FnOnce(&Self::Target) -> R,
pub fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
pub fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> TryConv for T
impl<T> TryConv for T
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,